private void partitionClass(GVCongruenceClass partition){
  Iterator<ValueGraphVertex> i=partition.iterator();
  ValueGraphVertex first=i.next();
  ArrayList<GVCongruenceClass> newClasses=new ArrayList<GVCongruenceClass>();
  ArrayList<ValueGraphVertex> toRemove=new ArrayList<ValueGraphVertex>();
  while (i.hasNext()) {
    ValueGraphVertex v=i.next();
    if (!checkCongruence(first,v)) {
      int index=findCongruenceMatch(newClasses,v);
      if (index > -1) {
        GVCongruenceClass match=B.get(index);
        match.addVertex(v);
        v.setValueNumber(match.getValueNumber());
      }
 else {
        GVCongruenceClass c=createCongruenceClass(v);
        newClasses.add(c);
        c.addVertex(v);
        v.setValueNumber(c.getValueNumber());
      }
      toRemove.add(v);
    }
  }
  for (  ValueGraphVertex v : toRemove) {
    partition.removeVertex(v);
  }
  if ((!newClasses.isEmpty()) && (partition.size() > 1)) {
    workList.push(partition);
  }
  for (  GVCongruenceClass c : newClasses) {
    if (c.size() > 1) {
      workList.push(c);
    }
    addDependentClassesToWorklist(c);
  }
}

private void partitionClass ( GVCongruenceClass partition ) { Iterator < ValueGraphVertex > i = partition . iterator ( ) ; ValueGraphVertex first = i . next ( ) ; ArrayList < GVCongruenceClass > newClasses = new ArrayList < GVCongruenceClass > ( ) ; ArrayList < ValueGraphVertex > toRemove = new ArrayList < ValueGraphVertex > ( ) ; while ( i . hasNext ( ) ) { ValueGraphVertex v = i . next ( ) ; if ( ! checkCongruence ( first , v ) ) { int index = findCongruenceMatch ( newClasses , v ) ; if ( index > - 1 ) { GVCongruenceClass match = B . get ( index ) ; match . addVertex ( v ) ; v . setValueNumber ( match . getValueNumber ( ) ) ; } else { GVCongruenceClass c = createCongruenceClass ( v ) ; newClasses . add ( c ) ; c . addVertex ( v ) ; v . setValueNumber ( c . getValueNumber ( ) ) ; } toRemove . add ( v ) ; } } for ( ValueGraphVertex v : toRemove ) { partition . removeVertex ( v ) ; } if ( ( ! newClasses . isEmpty ( ) ) && ( partition . size ( ) > 1 ) ) { workList . push ( partition ) ; } for ( GVCongruenceClass c : newClasses ) { if ( c . size ( ) > 1 ) { workList . push ( c ) ; } addDependentClassesToWorklist ( c ) ; } }
partition a congruence class .
