switch to spaces only..
authorbdemsky <bdemsky>
Wed, 27 Apr 2011 20:51:40 +0000 (20:51 +0000)
committerbdemsky <bdemsky>
Wed, 27 Apr 2011 20:51:40 +0000 (20:51 +0000)
233 files changed:
Robust/src/Analysis/CallGraph/BaseCallGraph.java
Robust/src/Analysis/CallGraph/JavaCallGraph.java
Robust/src/Analysis/Disjoint/AllocSite.java
Robust/src/Analysis/Disjoint/BuildStateMachines.java
Robust/src/Analysis/Disjoint/Canonical.java
Robust/src/Analysis/Disjoint/DisjointAnalysis.java
Robust/src/Analysis/Disjoint/EffectsAnalysis.java
Robust/src/Analysis/Disjoint/ExistPred.java
Robust/src/Analysis/Disjoint/ExistPredSet.java
Robust/src/Analysis/Disjoint/HeapRegionNode.java
Robust/src/Analysis/Disjoint/PointerMethod.java
Robust/src/Analysis/Disjoint/ProcessStateMachines.java
Robust/src/Analysis/Disjoint/ReachGraph.java
Robust/src/Analysis/Disjoint/ReachSet.java
Robust/src/Analysis/Disjoint/ReachState.java
Robust/src/Analysis/Disjoint/RefEdge.java
Robust/src/Analysis/Disjoint/RefSrcNode.java
Robust/src/Analysis/Disjoint/SMFEState.java
Robust/src/Analysis/Disjoint/StateMachineForEffects.java
Robust/src/Analysis/Disjoint/TaintSet.java
Robust/src/Analysis/FlatIRGraph/FlatIRGraph.java
Robust/src/Analysis/Locality/BranchAnalysis.java
Robust/src/Analysis/Locality/DCWrapper.java
Robust/src/Analysis/Locality/DelayComputation.java
Robust/src/Analysis/Locality/DiscoverConflicts.java
Robust/src/Analysis/Locality/GenerateConversions.java
Robust/src/Analysis/Locality/LocalityAnalysis.java
Robust/src/Analysis/Locality/LocalityBinding.java
Robust/src/Analysis/Locality/TempNodePair.java
Robust/src/Analysis/Locality/TypeAnalysis.java
Robust/src/Analysis/Loops/CSE.java
Robust/src/Analysis/Loops/CopyPropagation.java
Robust/src/Analysis/Loops/DeadCode.java
Robust/src/Analysis/Loops/DomTree.java
Robust/src/Analysis/Loops/GlobalFieldType.java
Robust/src/Analysis/Loops/LoopFinder.java
Robust/src/Analysis/Loops/LoopInvariant.java
Robust/src/Analysis/Loops/LoopOptimize.java
Robust/src/Analysis/Loops/UseDef.java
Robust/src/Analysis/Loops/WriteBarrier.java
Robust/src/Analysis/Loops/localCSE.java
Robust/src/Analysis/OoOJava/Accessible.java
Robust/src/Analysis/OoOJava/ConflictGraph.java
Robust/src/Analysis/OoOJava/ConflictNode.java
Robust/src/Analysis/OoOJava/OoOJavaAnalysis.java
Robust/src/Analysis/OoOJava/RBlockRelationAnalysis.java
Robust/src/Analysis/OoOJava/SESELock.java
Robust/src/Analysis/OoOJava/SESEWaitingQueue.java
Robust/src/Analysis/OoOJava/VarSrcTokTable.java
Robust/src/Analysis/OwnershipAnalysis/AllocationSite.java
Robust/src/Analysis/OwnershipAnalysis/ChangeTuple.java
Robust/src/Analysis/OwnershipAnalysis/ChangeTupleSet.java
Robust/src/Analysis/OwnershipAnalysis/EffectsSet.java
Robust/src/Analysis/OwnershipAnalysis/HeapRegionNode.java
Robust/src/Analysis/OwnershipAnalysis/MethodContext.java
Robust/src/Analysis/OwnershipAnalysis/MethodEffects.java
Robust/src/Analysis/OwnershipAnalysis/MethodEffectsAnalysis.java
Robust/src/Analysis/OwnershipAnalysis/OwnershipAnalysis.java
Robust/src/Analysis/OwnershipAnalysis/OwnershipGraph.java
Robust/src/Analysis/OwnershipAnalysis/OwnershipNode.java
Robust/src/Analysis/OwnershipAnalysis/ParameterDecomposition.java
Robust/src/Analysis/OwnershipAnalysis/ReachabilitySet.java
Robust/src/Analysis/OwnershipAnalysis/TokenTuple.java
Robust/src/Analysis/OwnershipAnalysis/TokenTupleSet.java
Robust/src/Analysis/Pointer/AllocFactory.java
Robust/src/Analysis/Pointer/BasicBlock.java
Robust/src/Analysis/Pointer/Delta.java
Robust/src/Analysis/Pointer/Edge.java
Robust/src/Analysis/Pointer/Graph.java
Robust/src/Analysis/Pointer/GraphManip.java
Robust/src/Analysis/Pointer/Pointer.java
Robust/src/Analysis/Pointer/Util.java
Robust/src/Analysis/Prefetch/IndexDescriptor.java
Robust/src/Analysis/Prefetch/LoopExit.java
Robust/src/Analysis/Prefetch/PrefetchAnalysis.java
Robust/src/Analysis/Prefetch/PrefetchPair.java
Robust/src/Analysis/SSJava/CompositeLocation.java
Robust/src/Analysis/SSJava/DefinitelyWrittenCheck.java
Robust/src/Analysis/SSJava/DeltaLocation.java
Robust/src/Analysis/SSJava/FlowDownCheck.java
Robust/src/Analysis/SSJava/Location.java
Robust/src/Analysis/Scheduling/ClassNode.java
Robust/src/Analysis/Scheduling/CombinationUtil.java
Robust/src/Analysis/Scheduling/CoreSimulator.java
Robust/src/Analysis/Scheduling/FIFORSchedule.java
Robust/src/Analysis/Scheduling/MCImplSynthesis.java
Robust/src/Analysis/Scheduling/ObjectInfo.java
Robust/src/Analysis/Scheduling/ObjectSimulator.java
Robust/src/Analysis/Scheduling/ScheduleAnalysis.java
Robust/src/Analysis/Scheduling/ScheduleEdge.java
Robust/src/Analysis/Scheduling/ScheduleNode.java
Robust/src/Analysis/Scheduling/ScheduleSimulator.java
Robust/src/Analysis/Scheduling/SchedulingUtil.java
Robust/src/Analysis/Scheduling/SimExecutionEdge.java
Robust/src/Analysis/Scheduling/TaskSimulator.java
Robust/src/Analysis/TaskStateAnalysis/ExecutionGraph.java
Robust/src/Analysis/TaskStateAnalysis/FEdge.java
Robust/src/Analysis/TaskStateAnalysis/FlagInfo.java
Robust/src/Analysis/TaskStateAnalysis/FlagState.java
Robust/src/Analysis/TaskStateAnalysis/GarbageAnalysis.java
Robust/src/Analysis/TaskStateAnalysis/OptionalTaskDescriptor.java
Robust/src/Analysis/TaskStateAnalysis/Predicate.java
Robust/src/Analysis/TaskStateAnalysis/SafetyAnalysis.java
Robust/src/Analysis/TaskStateAnalysis/TagAnalysis.java
Robust/src/Analysis/TaskStateAnalysis/TagBinding.java
Robust/src/Analysis/TaskStateAnalysis/TagEdge.java
Robust/src/Analysis/TaskStateAnalysis/TagState.java
Robust/src/Analysis/TaskStateAnalysis/TaskAnalysis.java
Robust/src/Analysis/TaskStateAnalysis/TaskBinding.java
Robust/src/Analysis/TaskStateAnalysis/TaskGraph.java
Robust/src/Analysis/TaskStateAnalysis/TaskIndex.java
Robust/src/Analysis/TaskStateAnalysis/TaskQueue.java
Robust/src/Analysis/TaskStateAnalysis/TaskQueueIterator.java
Robust/src/Analysis/TaskStateAnalysis/TaskTagAnalysis.java
Robust/src/ClassLibrary/Character.java
Robust/src/ClassLibrary/HashMap.java
Robust/src/ClassLibrary/HashMapIterator.java
Robust/src/ClassLibrary/InetAddress.java
Robust/src/ClassLibrary/Integer.java
Robust/src/ClassLibrary/LinkedList.java
Robust/src/ClassLibrary/Math.java
Robust/src/ClassLibrary/Queue.java
Robust/src/ClassLibrary/SocketInputStream.java
Robust/src/ClassLibrary/String.java
Robust/src/ClassLibrary/StringBuffer.java
Robust/src/ClassLibrary/Vector.java
Robust/src/ClassLibrary/gnu/Random.java
Robust/src/ClassLibrary/gnu/StringTokenizer.java
Robust/src/IR/AnnotationDescriptor.java
Robust/src/IR/ClassDescriptor.java
Robust/src/IR/Flat/BuildCode.java
Robust/src/IR/Flat/BuildCodeMultiCore.java
Robust/src/IR/Flat/BuildCodeTran.java
Robust/src/IR/Flat/BuildFlat.java
Robust/src/IR/Flat/BuildOoOJavaCode.java
Robust/src/IR/Flat/FieldShadow.java
Robust/src/IR/Flat/FlatCall.java
Robust/src/IR/Flat/FlatFlagActionNode.java
Robust/src/IR/Flat/FlatLiteralNode.java
Robust/src/IR/Flat/FlatMethod.java
Robust/src/IR/Flat/FlatNode.java
Robust/src/IR/Flat/FlatPrefetchNode.java
Robust/src/IR/Flat/FlatSESEEnterNode.java
Robust/src/IR/Flat/FlatWriteDynamicVarNode.java
Robust/src/IR/Flat/Inliner.java
Robust/src/IR/Flat/RuntimeConflictResolver.java
Robust/src/IR/Flat/TempObject.java
Robust/src/IR/Flat/TempTagPair.java
Robust/src/IR/MethodDescriptor.java
Robust/src/IR/SymbolTable.java
Robust/src/IR/TaskDescriptor.java
Robust/src/IR/Tree/ArrayInitializerNode.java
Robust/src/IR/Tree/BlockNode.java
Robust/src/IR/Tree/BuildIR.java
Robust/src/IR/Tree/ConstraintCheck.java
Robust/src/IR/Tree/CreateObjectNode.java
Robust/src/IR/Tree/DNFFlag.java
Robust/src/IR/Tree/FlagEffects.java
Robust/src/IR/Tree/JavaBuilder.java
Robust/src/IR/Tree/LiteralNode.java
Robust/src/IR/Tree/MethodInvokeNode.java
Robust/src/IR/Tree/NameNode.java
Robust/src/IR/Tree/OpNode.java
Robust/src/IR/Tree/ParseNode.java
Robust/src/IR/Tree/ParseNodeDOTVisitor.java
Robust/src/IR/Tree/SemanticCheck.java
Robust/src/IR/Tree/TertiaryNode.java
Robust/src/IR/TypeDescriptor.java
Robust/src/IR/TypeUtil.java
Robust/src/IR/Virtual.java
Robust/src/Interface/HTTPServices.java
Robust/src/Interface/HashStrings.java
Robust/src/Interface/IdentityRelation.java
Robust/src/Interface/Imap.java
Robust/src/Interface/JhttpServer.java
Robust/src/Interface/JhttpWorker.java
Robust/src/Interface/WebInterface.java
Robust/src/Lex/Comment.java
Robust/src/Lex/EscapedUnicodeReader.java
Robust/src/Lex/Lexer.java
Robust/src/Lex/Token.java
Robust/src/Main/Main.java
Robust/src/Runtime/DSTM/interface/abortreaders.c
Robust/src/Runtime/DSTM/interface/addPrefetchEnhance.c
Robust/src/Runtime/DSTM/interface/addUdpEnhance.c
Robust/src/Runtime/DSTM/interface/altmlookup.c
Robust/src/Runtime/DSTM/interface/altprelookup.c
Robust/src/Runtime/DSTM/interface/clocksyncserver.c
Robust/src/Runtime/DSTM/interface/clookup.c
Robust/src/Runtime/DSTM/interface/clookup2.c
Robust/src/Runtime/DSTM/interface/dht.c
Robust/src/Runtime/DSTM/interface/dsmlock.c
Robust/src/Runtime/DSTM/interface/dstm.h
Robust/src/Runtime/DSTM/interface/dstmserver.c
Robust/src/Runtime/DSTM/interface/gCollect.c
Robust/src/Runtime/DSTM/interface/llookup.c
Robust/src/Runtime/DSTM/interface/machinepile.c
Robust/src/Runtime/DSTM/interface/mlookup.c
Robust/src/Runtime/DSTM/interface/prefetch.c
Robust/src/Runtime/DSTM/interface/prelookup.c
Robust/src/Runtime/DSTM/interface/sandbox.c
Robust/src/Runtime/DSTM/interface/sockpool.c
Robust/src/Runtime/DSTM/interface/threadnotify.c
Robust/src/Runtime/DSTM/interface/trans.c
Robust/src/Runtime/GenericHashtable.c
Robust/src/Runtime/ObjectHash.c
Robust/src/Runtime/Queue.c
Robust/src/Runtime/SimpleHash.c
Robust/src/Runtime/chash.c
Robust/src/Runtime/checkpoint.c
Robust/src/Runtime/deque.c
Robust/src/Runtime/garbage.c
Robust/src/Runtime/garbage.h
Robust/src/Runtime/mem.c
Robust/src/Runtime/mlp_lock.h
Robust/src/Runtime/mlp_runtime.c
Robust/src/Runtime/object.c
Robust/src/Runtime/oojgarbage.c
Robust/src/Runtime/option.c
Robust/src/Runtime/runtime.c
Robust/src/Runtime/socket.c
Robust/src/Runtime/squeue.h
Robust/src/Runtime/task.c
Robust/src/Runtime/taskgarbage.c
Robust/src/Runtime/workschedule.c
Robust/src/Util/CodePrinter.java
Robust/src/Util/GraphNode.java
Robust/src/Util/Lattice.java
Robust/src/Util/MultiHash.java
Robust/src/Util/OptimizedView.java
Robust/src/Util/UtilAlgorithms.java
Robust/src/c.cfg
Robust/src/java.cfg

index 22a8dc6..0ad8e2f 100644 (file)
@@ -86,48 +86,48 @@ public class BaseCallGraph implements CallGraph {
       Iterator methodit=cn.getMethods();
       //Iterator through methods
       while(methodit.hasNext()) {
-       MethodDescriptor md=(MethodDescriptor)methodit.next();
-       if (md.isStatic()||md.getReturnType()==null)
-         continue;
-       Stack<ClassDescriptor> possInterfaces=new Stack<ClassDescriptor>();
-       ClassDescriptor tmpcd=cn;
-       while(tmpcd!=null) {
-         for(Iterator supit=tmpcd.getSuperInterfaces(); supit.hasNext(); ) {
-           possInterfaces.add((ClassDescriptor)supit.next());
-         }
-         tmpcd=tmpcd.getSuperDesc();
-       }
-       while(!possInterfaces.isEmpty()) {
-         ClassDescriptor IFdesc=possInterfaces.pop();
-         for(Iterator supit=IFdesc.getSuperInterfaces(); supit.hasNext(); ) {
-           possInterfaces.add((ClassDescriptor)supit.next());
-         }
-         Set possiblematches=IFdesc.getMethodTable().getSet(md.getSymbol());
-         for(Iterator matchit=possiblematches.iterator(); matchit.hasNext(); ) {
-           MethodDescriptor matchmd=(MethodDescriptor)matchit.next();
-           if (md.matches(matchmd)) {
-             if (!mapVirtual2ImplementationSet.containsKey(matchmd))
-               mapVirtual2ImplementationSet.put(matchmd,new HashSet());
-             ((HashSet)mapVirtual2ImplementationSet.get(matchmd)).add(md);
-             break;
-           }
-         }
-       }
-
-
-       ClassDescriptor superdesc=cn.getSuperDesc();
-       if (superdesc!=null) {
-         Set possiblematches=superdesc.getMethodTable().getSet(md.getSymbol());
-         for(Iterator matchit=possiblematches.iterator(); matchit.hasNext(); ) {
-           MethodDescriptor matchmd=(MethodDescriptor)matchit.next();
-           if (md.matches(matchmd)) {
-             if (!mapVirtual2ImplementationSet.containsKey(matchmd))
-               mapVirtual2ImplementationSet.put(matchmd,new HashSet());
-             ((HashSet)mapVirtual2ImplementationSet.get(matchmd)).add(md);
-             break;
-           }
-         }
-       }
+        MethodDescriptor md=(MethodDescriptor)methodit.next();
+        if (md.isStatic()||md.getReturnType()==null)
+          continue;
+        Stack<ClassDescriptor> possInterfaces=new Stack<ClassDescriptor>();
+        ClassDescriptor tmpcd=cn;
+        while(tmpcd!=null) {
+          for(Iterator supit=tmpcd.getSuperInterfaces(); supit.hasNext(); ) {
+            possInterfaces.add((ClassDescriptor)supit.next());
+          }
+          tmpcd=tmpcd.getSuperDesc();
+        }
+        while(!possInterfaces.isEmpty()) {
+          ClassDescriptor IFdesc=possInterfaces.pop();
+          for(Iterator supit=IFdesc.getSuperInterfaces(); supit.hasNext(); ) {
+            possInterfaces.add((ClassDescriptor)supit.next());
+          }
+          Set possiblematches=IFdesc.getMethodTable().getSet(md.getSymbol());
+          for(Iterator matchit=possiblematches.iterator(); matchit.hasNext(); ) {
+            MethodDescriptor matchmd=(MethodDescriptor)matchit.next();
+            if (md.matches(matchmd)) {
+              if (!mapVirtual2ImplementationSet.containsKey(matchmd))
+                mapVirtual2ImplementationSet.put(matchmd,new HashSet());
+              ((HashSet)mapVirtual2ImplementationSet.get(matchmd)).add(md);
+              break;
+            }
+          }
+        }
+
+
+        ClassDescriptor superdesc=cn.getSuperDesc();
+        if (superdesc!=null) {
+          Set possiblematches=superdesc.getMethodTable().getSet(md.getSymbol());
+          for(Iterator matchit=possiblematches.iterator(); matchit.hasNext(); ) {
+            MethodDescriptor matchmd=(MethodDescriptor)matchit.next();
+            if (md.matches(matchmd)) {
+              if (!mapVirtual2ImplementationSet.containsKey(matchmd))
+                mapVirtual2ImplementationSet.put(matchmd,new HashSet());
+              ((HashSet)mapVirtual2ImplementationSet.get(matchmd)).add(md);
+              break;
+            }
+          }
+        }
       }
     }
   }
@@ -144,8 +144,8 @@ public class BaseCallGraph implements CallGraph {
     Set s=(Set)mapVirtual2ImplementationSet.get(md);
     if (s!=null)
       for(Iterator it=s.iterator(); it.hasNext(); ) {
-       MethodDescriptor md2=(MethodDescriptor)it.next();
-       ns.addAll(getMethods(md2));
+        MethodDescriptor md2=(MethodDescriptor)it.next();
+        ns.addAll(getMethods(md2));
       }
     return ns;
   }
@@ -176,10 +176,10 @@ public class BaseCallGraph implements CallGraph {
     Set s=(Set)mapCaller2CalleeSet.get(d);
     if (s!=null)
       for(Iterator it=s.iterator(); it.hasNext(); ) {
-       MethodDescriptor md=(MethodDescriptor)it.next();
-       if( !found.contains(md) ) {
-         ns.addAll(getMoreMethodCalls(found, md));
-       }
+        MethodDescriptor md=(MethodDescriptor)it.next();
+        if( !found.contains(md) ) {
+          ns.addAll(getMoreMethodCalls(found, md));
+        }
       }
     return ns;
   }
@@ -200,13 +200,13 @@ public class BaseCallGraph implements CallGraph {
       Set s=(Set)mapCaller2CalleeSet.get(md);
 
       if (s!=null) {
-       for(Iterator it=s.iterator(); it.hasNext(); ) {
-         MethodDescriptor md2=(MethodDescriptor)it.next();
-         if( !callable.contains(md2) ) {
-           callable.add(md2);
-           tovisit.add(md2);
-         }
-       }
+        for(Iterator it=s.iterator(); it.hasNext(); ) {
+          MethodDescriptor md2=(MethodDescriptor)it.next();
+          if( !callable.contains(md2) ) {
+            callable.add(md2);
+            tovisit.add(md2);
+          }
+        }
       }
     }
     return callable;
@@ -225,16 +225,16 @@ public class BaseCallGraph implements CallGraph {
       Set s = (Set) mapCaller2CalleeSet.get(md);
 
       if (s != null) {
-       for (Iterator it = s.iterator(); it.hasNext(); ) {
-         MethodDescriptor md2 = (MethodDescriptor) it.next();
-         if (!callable.contains(md2)) {
-           callable.add(md2);
-           if (!methodsContainingSESEs.contains(md2)) {
-             // if current method has sese, do not need to go down
-             tovisit.add(md2);
-           }
-         }
-       }
+        for (Iterator it = s.iterator(); it.hasNext(); ) {
+          MethodDescriptor md2 = (MethodDescriptor) it.next();
+          if (!callable.contains(md2)) {
+            callable.add(md2);
+            if (!methodsContainingSESEs.contains(md2)) {
+              // if current method has sese, do not need to go down
+              tovisit.add(md2);
+            }
+          }
+        }
       }
     }
 //    callable.retainAll(methodsContainingSESEs);
@@ -249,8 +249,8 @@ public class BaseCallGraph implements CallGraph {
       Iterator methodit=cn.getMethods();
       //Iterator through methods
       while(methodit.hasNext()) {
-       MethodDescriptor md=(MethodDescriptor)methodit.next();
-       analyzeMethod( (Object)md, state.getMethodFlat(md) );
+        MethodDescriptor md=(MethodDescriptor)methodit.next();
+        analyzeMethod( (Object)md, state.getMethodFlat(md) );
       }
     }
     it=state.getTaskSymbolTable().getDescriptorsIterator();
@@ -270,31 +270,31 @@ public class BaseCallGraph implements CallGraph {
       toexplore.remove(fn);
       explored.add(fn);
       for(int i=0; i<fn.numNext(); i++) {
-       FlatNode fnnext=fn.getNext(i);
-       if (!explored.contains(fnnext))
-         toexplore.add(fnnext);
+        FlatNode fnnext=fn.getNext(i);
+        if (!explored.contains(fnnext))
+          toexplore.add(fnnext);
       }
       if (fn.kind()==FKind.FlatCall) {
-       FlatCall fc=(FlatCall)fn;
-       MethodDescriptor calledmethod=fc.getMethod();
-       Set methodsthatcouldbecalled=fc.getThis()==null?getMethods(calledmethod):
-                                     getMethods(calledmethod, fc.getThis().getType());
-
-       // add caller -> callee maps
-       if( !mapCaller2CalleeSet.containsKey(caller) ) {
-         mapCaller2CalleeSet.put(caller, new HashSet() );
-       }
-       ((HashSet)mapCaller2CalleeSet.get(caller)).addAll(methodsthatcouldbecalled);
-
-       // add callee -> caller maps
-       Iterator calleeItr = methodsthatcouldbecalled.iterator();
-       while( calleeItr.hasNext() ) {
-         MethodDescriptor callee = (MethodDescriptor) calleeItr.next();
-         if( !mapCallee2CallerSet.containsKey(callee) ) {
-           mapCallee2CallerSet.put(callee, new HashSet() );
-         }
-         ((HashSet)mapCallee2CallerSet.get(callee)).add(caller);
-       }
+        FlatCall fc=(FlatCall)fn;
+        MethodDescriptor calledmethod=fc.getMethod();
+        Set methodsthatcouldbecalled=fc.getThis()==null?getMethods(calledmethod):
+                                      getMethods(calledmethod, fc.getThis().getType());
+
+        // add caller -> callee maps
+        if( !mapCaller2CalleeSet.containsKey(caller) ) {
+          mapCaller2CalleeSet.put(caller, new HashSet() );
+        }
+        ((HashSet)mapCaller2CalleeSet.get(caller)).addAll(methodsthatcouldbecalled);
+
+        // add callee -> caller maps
+        Iterator calleeItr = methodsthatcouldbecalled.iterator();
+        while( calleeItr.hasNext() ) {
+          MethodDescriptor callee = (MethodDescriptor) calleeItr.next();
+          if( !mapCallee2CallerSet.containsKey(callee) ) {
+            mapCallee2CallerSet.put(callee, new HashSet() );
+          }
+          ((HashSet)mapCallee2CallerSet.get(callee)).add(caller);
+        }
       }
     }
   }
@@ -312,20 +312,20 @@ public class BaseCallGraph implements CallGraph {
       HashSet implemSet = (HashSet)          me.getValue();
 
       if( !labeledInDot.contains(virtual) ) {
-       labeledInDot.add(virtual);
-       bw.write("  "+virtual.getNum()+"[label=\""+virtual+"\"];\n");
+        labeledInDot.add(virtual);
+        bw.write("  "+virtual.getNum()+"[label=\""+virtual+"\"];\n");
       }
 
       Iterator implemItr = implemSet.iterator();
       while( implemItr.hasNext() ) {
-       Descriptor implem = (Descriptor) implemItr.next();
+        Descriptor implem = (Descriptor) implemItr.next();
 
-       if( !labeledInDot.contains(implem) ) {
-         labeledInDot.add(implem);
-         bw.write("  "+implem.getNum()+"[label=\""+implem+"\"];\n");
-       }
+        if( !labeledInDot.contains(implem) ) {
+          labeledInDot.add(implem);
+          bw.write("  "+implem.getNum()+"[label=\""+implem+"\"];\n");
+        }
 
-       bw.write("  "+virtual.getNum()+"->"+implem.getNum()+";\n");
+        bw.write("  "+virtual.getNum()+"->"+implem.getNum()+";\n");
       }
     }
     bw.write("}\n");
@@ -346,20 +346,20 @@ public class BaseCallGraph implements CallGraph {
       HashSet calleeSet = (HashSet)    me.getValue();
 
       if( !labeledInDot.contains(caller) ) {
-       labeledInDot.add(caller);
-       bw.write("  "+caller.getNum()+"[label=\"" +caller+"\"];\n");
+        labeledInDot.add(caller);
+        bw.write("  "+caller.getNum()+"[label=\"" +caller+"\"];\n");
       }
 
       Iterator calleeItr = calleeSet.iterator();
       while( calleeItr.hasNext() ) {
-       MethodDescriptor callee = (MethodDescriptor) calleeItr.next();
+        MethodDescriptor callee = (MethodDescriptor) calleeItr.next();
 
-       if( !labeledInDot.contains(callee) ) {
-         labeledInDot.add(callee);
-         bw.write("  "+callee.getNum()+"[label=\""+callee+"\"];\n");
-       }
+        if( !labeledInDot.contains(callee) ) {
+          labeledInDot.add(callee);
+          bw.write("  "+callee.getNum()+"[label=\""+callee+"\"];\n");
+        }
 
-       bw.write("  "+caller.getNum()+"->"+callee.getNum()+";\n");
+        bw.write("  "+caller.getNum()+"->"+callee.getNum()+";\n");
       }
     }
     bw.write("}\n");
@@ -382,20 +382,20 @@ public class BaseCallGraph implements CallGraph {
       HashSet callerSet = (HashSet)          me.getValue();
 
       if( !labeledInDot.contains(callee) ) {
-       labeledInDot.add(callee);
-       bw.write("  "+callee.getNum()+"[label=\""+callee+"\"];\n");
+        labeledInDot.add(callee);
+        bw.write("  "+callee.getNum()+"[label=\""+callee+"\"];\n");
       }
 
       Iterator callerItr = callerSet.iterator();
       while( callerItr.hasNext() ) {
-       Descriptor caller = (Descriptor) callerItr.next();
+        Descriptor caller = (Descriptor) callerItr.next();
 
-       if( !labeledInDot.contains(caller) ) {
-         labeledInDot.add(caller);
-         bw.write("  "+caller.getNum()+"[label=\""+caller+"\"];\n");
-       }
+        if( !labeledInDot.contains(caller) ) {
+          labeledInDot.add(caller);
+          bw.write("  "+caller.getNum()+"[label=\""+caller+"\"];\n");
+        }
 
-       bw.write("  "+caller.getNum()+"->"+callee.getNum()+";\n");
+        bw.write("  "+caller.getNum()+"->"+callee.getNum()+";\n");
       }
     }
     bw.write("}\n");
index 5b8a776..51256a8 100644 (file)
@@ -49,11 +49,11 @@ public class JavaCallGraph extends BaseCallGraph {
       Iterator methodit=cn.getMethods();
       //Iterator through methods
       while(methodit.hasNext()) {
-       MethodDescriptor md=(MethodDescriptor)methodit.next();
-       if (md.isStaticBlock()) {
-         tovisit.add(md);
-         discovered.add(md);
-       }
+        MethodDescriptor md=(MethodDescriptor)methodit.next();
+        if (md.isStaticBlock()) {
+          tovisit.add(md);
+          discovered.add(md);
+        }
       }
     }
 
@@ -63,36 +63,36 @@ public class JavaCallGraph extends BaseCallGraph {
       tovisit.remove(md);
       FlatMethod fm=state.getMethodFlat(md);
       if (fm==null)
-       continue;
+        continue;
       analyzeMethod(md, fm);
       for(Iterator<FlatNode> fnit=fm.getNodeSet().iterator(); fnit.hasNext(); ) {
-       FlatNode fn=fnit.next();
-       if (fn.kind()==FKind.FlatCall) {
-         FlatCall fcall=(FlatCall)fn;
-         Set callees=fcall.getThis()==null?getMethods(fcall.getMethod()):getMethods(fcall.getMethod(),fcall.getThis().getType());
+        FlatNode fn=fnit.next();
+        if (fn.kind()==FKind.FlatCall) {
+          FlatCall fcall=(FlatCall)fn;
+          Set callees=fcall.getThis()==null?getMethods(fcall.getMethod()):getMethods(fcall.getMethod(),fcall.getThis().getType());
 
-         if (fcall.getThis()!=null) {
-           MethodDescriptor methodd=fcall.getMethod();
+          if (fcall.getThis()!=null) {
+            MethodDescriptor methodd=fcall.getMethod();
 
-           if (methodd.getClassDesc()==tu.getClass(TypeUtil.ThreadClass)&&
-               methodd.getSymbol().equals("start")&&methodd.numParameters()==0&&!methodd.getModifiers().isStatic()) {
-             //Have call to start
-             HashSet ns=new HashSet();
-             ns.addAll(callees);
-             ns.addAll(getMethods(tu.getRun(), fcall.getThis().getType()));
-             ns.addAll(getMethods(tu.getStaticStart(), fcall.getThis().getType()));
-             callees=ns;
-           }
-         }
+            if (methodd.getClassDesc()==tu.getClass(TypeUtil.ThreadClass)&&
+                methodd.getSymbol().equals("start")&&methodd.numParameters()==0&&!methodd.getModifiers().isStatic()) {
+              //Have call to start
+              HashSet ns=new HashSet();
+              ns.addAll(callees);
+              ns.addAll(getMethods(tu.getRun(), fcall.getThis().getType()));
+              ns.addAll(getMethods(tu.getStaticStart(), fcall.getThis().getType()));
+              callees=ns;
+            }
+          }
 
-         for(Iterator mdit=callees.iterator(); mdit.hasNext(); ) {
-           MethodDescriptor callee=(MethodDescriptor)mdit.next();
-           if (!discovered.contains(callee)) {
-             discovered.add(callee);
-             tovisit.add(callee);
-           }
-         }
-       }
+          for(Iterator mdit=callees.iterator(); mdit.hasNext(); ) {
+            MethodDescriptor callee=(MethodDescriptor)mdit.next();
+            if (!discovered.contains(callee)) {
+              discovered.add(callee);
+              tovisit.add(callee);
+            }
+          }
+        }
       }
     }
   }
index 7c1961b..b41a540 100644 (file)
@@ -184,7 +184,7 @@ public class AllocSite extends Canonical implements Alloc {
 
     for( int i = 0; i < allocationDepth - 1; ++i ) {
       if( id.equals(ithOldest.get(i) ) ) {
-       return AGE_in_I;
+        return AGE_in_I;
       }
     }
 
@@ -194,7 +194,7 @@ public class AllocSite extends Canonical implements Alloc {
   public Integer getAge(Integer id) {
     for( int i = 0; i < allocationDepth; ++i ) {
       if( id.equals(ithOldest.get(i) ) ) {
-       return new Integer(i);
+        return new Integer(i);
       }
     }
 
@@ -212,7 +212,7 @@ public class AllocSite extends Canonical implements Alloc {
 
     for( int i = 0; i < allocationDepth - 1; ++i ) {
       if( id.equals(getIthOldestShadow(i) ) ) {
-       return SHADOWAGE_in_I;
+        return SHADOWAGE_in_I;
       }
     }
 
@@ -222,7 +222,7 @@ public class AllocSite extends Canonical implements Alloc {
   public Integer getShadowAge(Integer id) {
     for( int i = 0; i < allocationDepth - 1; ++i ) {
       if( id.equals(getIthOldestShadow(i) ) ) {
-       return new Integer(-i);
+        return new Integer(-i);
       }
     }
 
index 64b470d..b4e0b6a 100644 (file)
@@ -109,11 +109,11 @@ public class BuildStateMachines {
 
       Iterator<TempDescriptor> varItr = var2smfe.keySet().iterator();
       while( varItr.hasNext() ) {
-       TempDescriptor var = varItr.next();
+        TempDescriptor var = varItr.next();
 
-       StateMachineForEffects smfe = var2smfe.get(var);
+        StateMachineForEffects smfe = var2smfe.get(var);
 
-       smfe.writeAsDOT(prefix+"statemachine_"+fn.toString()+var.toString() );
+        smfe.writeAsDOT(prefix+"statemachine_"+fn.toString()+var.toString() );
       }
     }
   }
index 85a5c8a..ef17d83 100644 (file)
@@ -105,7 +105,7 @@ abstract public class Canonical {
 
     if( hasHash ) {
       if( oldHash != hash ) {
-       throw new Error("A CANONICAL HASH CHANGED");
+        throw new Error("A CANONICAL HASH CHANGED");
       }
     } else {
       hasHash = true;
@@ -270,9 +270,9 @@ abstract public class Canonical {
                                          rt1.isOutOfContext()
                                          );
       if( rt2 != null ) {
-       out.reachTuples.add(unionUpArity(rt1, rt2) );
+        out.reachTuples.add(unionUpArity(rt1, rt2) );
       } else {
-       out.reachTuples.add(rt1);
+        out.reachTuples.add(rt1);
       }
     }
 
@@ -284,7 +284,7 @@ abstract public class Canonical {
                                          rt2.isOutOfContext()
                                          );
       if( rt1 == null ) {
-       out.reachTuples.add(rt2);
+        out.reachTuples.add(rt2);
       }
     }
 
@@ -388,30 +388,30 @@ abstract public class Canonical {
       if( age == AllocSite.AGE_notInThisSite ||
           rt.isOutOfContext()
           ) {
-       out.reachTuples.add(rt);
+        out.reachTuples.add(rt);
 
       } else if( age == AllocSite.AGE_summary ) {
-       // remember the summary tuple, but don't add it
-       // we may combine it with the oldest tuple
-       rtSummary = rt;
+        // remember the summary tuple, but don't add it
+        // we may combine it with the oldest tuple
+        rtSummary = rt;
 
       } else if( age == AllocSite.AGE_oldest ) {
-       // found an oldest hrnID, again just remember
-       // for later
-       rtOldest = rt;
+        // found an oldest hrnID, again just remember
+        // for later
+        rtOldest = rt;
 
       } else {
-       assert age == AllocSite.AGE_in_I;
+        assert age == AllocSite.AGE_in_I;
 
-       Integer I = as.getAge(hrnID);
-       assert I != null;
+        Integer I = as.getAge(hrnID);
+        assert I != null;
 
-       // otherwise, we change this hrnID to the
-       // next older hrnID
-       Integer hrnIDToChangeTo = as.getIthOldest(I + 1);
-       ReachTuple rtAged =
-         Canonical.changeHrnIDTo(rt, hrnIDToChangeTo);
-       out.reachTuples.add(rtAged);
+        // otherwise, we change this hrnID to the
+        // next older hrnID
+        Integer hrnIDToChangeTo = as.getIthOldest(I + 1);
+        ReachTuple rtAged =
+          Canonical.changeHrnIDTo(rt, hrnIDToChangeTo);
+        out.reachTuples.add(rtAged);
       }
     }
 
@@ -482,13 +482,13 @@ abstract public class Canonical {
       ReachState state2 = rs2.containsIgnorePreds(state1);
 
       if( state2 != null ) {
-       out.reachStates.add(ReachState.factory(state1.reachTuples,
-                                              Canonical.join(state1.preds,
-                                                             state2.preds
-                                                             )
-                                              ) );
+        out.reachStates.add(ReachState.factory(state1.reachTuples,
+                                               Canonical.join(state1.preds,
+                                                              state2.preds
+                                                              )
+                                               ) );
       } else {
-       out.reachStates.add(state1);
+        out.reachStates.add(state1);
       }
     }
 
@@ -499,7 +499,7 @@ abstract public class Canonical {
       ReachState state1 = rs1.containsIgnorePreds(state2);
 
       if( state1 == null ) {
-       out.reachStates.add(state2);
+        out.reachStates.add(state2);
       }
     }
 
@@ -540,9 +540,9 @@ abstract public class Canonical {
       ReachState state1 = (ReachState) itr.next();
       ReachState state2 = rs2.containsIgnorePreds(state1);
       if( state2 != null ) {
-       // prefer the predicates on state1, an overapproximation
-       // of state1 preds AND state2 preds
-       out.reachStates.add(state1);
+        // prefer the predicates on state1, an overapproximation
+        // of state1 preds AND state2 preds
+        out.reachStates.add(state1);
       }
     }
 
@@ -626,21 +626,21 @@ abstract public class Canonical {
 
       Iterator<ChangeTuple> ctItr = cs.iterator();
       while( ctItr.hasNext() ) {
-       ChangeTuple ct = ctItr.next();
-
-       if( stateOrig.equalsIgnorePreds(ct.getStateToMatch() ) ) {
-         // use the new state, but the original predicates
-         ReachState stateNew =
-           ReachState.factory(ct.getStateToAdd().reachTuples,
-                              stateOrig.preds
-                              );
-         out.reachStates.add(stateNew);
-         changeFound = true;
-       }
+        ChangeTuple ct = ctItr.next();
+
+        if( stateOrig.equalsIgnorePreds(ct.getStateToMatch() ) ) {
+          // use the new state, but the original predicates
+          ReachState stateNew =
+            ReachState.factory(ct.getStateToAdd().reachTuples,
+                               stateOrig.preds
+                               );
+          out.reachStates.add(stateNew);
+          changeFound = true;
+        }
       }
 
       if( keepSourceState || !changeFound ) {
-       out.reachStates.add(stateOrig);
+        out.reachStates.add(stateOrig);
       }
     }
 
@@ -676,50 +676,50 @@ abstract public class Canonical {
 
       Iterator<ReachState> itrR = rsR.iterator();
       while( itrR.hasNext() ) {
-       ReachState r = itrR.next();
-
-       ReachState theUnion = ReachState.factory();
-
-       Iterator<ReachTuple> itrRelement = r.iterator();
-       while( itrRelement.hasNext() ) {
-         ReachTuple rtR = itrRelement.next();
-         ReachTuple rtO = o.containsHrnID(rtR.getHrnID(),
-                                          rtR.isOutOfContext()
-                                          );
-         if( rtO != null ) {
-           theUnion = Canonical.add(theUnion,
-                                    Canonical.unionUpArity(rtR,
-                                                           rtO
-                                                           )
-                                    );
-         } else {
-           theUnion = Canonical.add(theUnion,
-                                    rtR
-                                    );
-         }
-       }
-
-       Iterator<ReachTuple> itrOelement = o.iterator();
-       while( itrOelement.hasNext() ) {
-         ReachTuple rtO = itrOelement.next();
-         ReachTuple rtR = theUnion.containsHrnID(rtO.getHrnID(),
-                                                 rtO.isOutOfContext()
-                                                 );
-         if( rtR == null ) {
-           theUnion = Canonical.add(theUnion,
-                                    rtO
-                                    );
-         }
-       }
-
-       if( !theUnion.isEmpty() ) {
-         out =
-           Canonical.union(out,
-                           ChangeSet.factory(
-                             ChangeTuple.factory(o, theUnion)
-                             )
-                           );
-       }
+        ReachState r = itrR.next();
+
+        ReachState theUnion = ReachState.factory();
+
+        Iterator<ReachTuple> itrRelement = r.iterator();
+        while( itrRelement.hasNext() ) {
+          ReachTuple rtR = itrRelement.next();
+          ReachTuple rtO = o.containsHrnID(rtR.getHrnID(),
+                                           rtR.isOutOfContext()
+                                           );
+          if( rtO != null ) {
+            theUnion = Canonical.add(theUnion,
+                                     Canonical.unionUpArity(rtR,
+                                                            rtO
+                                                            )
+                                     );
+          } else {
+            theUnion = Canonical.add(theUnion,
+                                     rtR
+                                     );
+          }
+        }
+
+        Iterator<ReachTuple> itrOelement = o.iterator();
+        while( itrOelement.hasNext() ) {
+          ReachTuple rtO = itrOelement.next();
+          ReachTuple rtR = theUnion.containsHrnID(rtO.getHrnID(),
+                                                  rtO.isOutOfContext()
+                                                  );
+          if( rtR == null ) {
+            theUnion = Canonical.add(theUnion,
+                                     rtO
+                                     );
+          }
+        }
+
+        if( !theUnion.isEmpty() ) {
+          out =
+            Canonical.union(out,
+                            ChangeSet.factory(
+                              ChangeTuple.factory(o, theUnion)
+                              )
+                            );
+        }
       }
     }
 
@@ -789,15 +789,15 @@ abstract public class Canonical {
 
       Iterator<ReachState> itrP = rsP.iterator();
       while( itrP.hasNext() && !subsetExists ) {
-       ReachState stateP = itrP.next();
+        ReachState stateP = itrP.next();
 
-       if( stateP.isSubset(stateO) ) {
-         subsetExists = true;
-       }
+        if( stateP.isSubset(stateO) ) {
+          subsetExists = true;
+        }
       }
 
       if( subsetExists ) {
-       out.reachStates.add(stateO);
+        out.reachStates.add(stateO);
       }
     }
 
@@ -1004,76 +1004,76 @@ abstract public class Canonical {
       int age = as.getAgeCategory(rt.getHrnID() );
 
       if( age == AllocSite.AGE_notInThisSite ) {
-       // things not from the site just go back in
-       baseState = Canonical.addUpArity(baseState, rt);
+        // things not from the site just go back in
+        baseState = Canonical.addUpArity(baseState, rt);
 
       } else if( age == AllocSite.AGE_summary ) {
 
-       if( rt.isOutOfContext() ) {
-         // if its out-of-context, we only deal here with the ZERO-OR-MORE
-         // arity, if ARITY-ONE we'll branch the base state after the loop
-         if( rt.getArity() == ReachTuple.ARITY_ZEROORMORE ) {
-           // add two overly conservative symbols to reach state (PUNTING)
-
-           baseState = Canonical.addUpArity(baseState,
-                                            ReachTuple.factory(as.getSummary(),
-                                                               true,   // multi
-                                                               ReachTuple.ARITY_ZEROORMORE,
-                                                               false   // out-of-context
-                                                               )
-                                            );
-
-           baseState = Canonical.addUpArity(baseState,
-                                            ReachTuple.factory(as.getSummary(),
-                                                               true,   // multi
-                                                               ReachTuple.ARITY_ZEROORMORE,
-                                                               true    // out-of-context
-                                                               )
-                                            );
-         } else {
-           assert rt.getArity() == ReachTuple.ARITY_ONE;
-           found2Sooc = true;
-         }
-
-       } else {
-         // the in-context just becomes shadow
-         baseState = Canonical.addUpArity(baseState,
-                                          ReachTuple.factory(as.getSummaryShadow(),
-                                                             true,   // multi
-                                                             rt.getArity(),
-                                                             false    // out-of-context
-                                                             )
-                                          );
-       }
+        if( rt.isOutOfContext() ) {
+          // if its out-of-context, we only deal here with the ZERO-OR-MORE
+          // arity, if ARITY-ONE we'll branch the base state after the loop
+          if( rt.getArity() == ReachTuple.ARITY_ZEROORMORE ) {
+            // add two overly conservative symbols to reach state (PUNTING)
+
+            baseState = Canonical.addUpArity(baseState,
+                                             ReachTuple.factory(as.getSummary(),
+                                                                true,   // multi
+                                                                ReachTuple.ARITY_ZEROORMORE,
+                                                                false   // out-of-context
+                                                                )
+                                             );
+
+            baseState = Canonical.addUpArity(baseState,
+                                             ReachTuple.factory(as.getSummary(),
+                                                                true,   // multi
+                                                                ReachTuple.ARITY_ZEROORMORE,
+                                                                true    // out-of-context
+                                                                )
+                                             );
+          } else {
+            assert rt.getArity() == ReachTuple.ARITY_ONE;
+            found2Sooc = true;
+          }
+
+        } else {
+          // the in-context just becomes shadow
+          baseState = Canonical.addUpArity(baseState,
+                                           ReachTuple.factory(as.getSummaryShadow(),
+                                                              true,   // multi
+                                                              rt.getArity(),
+                                                              false    // out-of-context
+                                                              )
+                                           );
+        }
 
 
       } else {
-       // otherwise age is in range [0, k]
-       Integer I = as.getAge(rt.getHrnID() );
-       assert I != null;
-       assert !rt.isMultiObject();
-       assert rt.getArity() == ReachTuple.ARITY_ONE;
-
-       if( rt.isOutOfContext() ) {
-         // becomes the in-context version
-         baseState = Canonical.addUpArity(baseState,
-                                          ReachTuple.factory(rt.getHrnID(),
-                                                             false,   // multi
-                                                             ReachTuple.ARITY_ONE,
-                                                             false    // out-of-context
-                                                             )
-                                          );
-
-       } else {
-         // otherwise the ith symbol becomes shadowed
-         baseState = Canonical.addUpArity(baseState,
-                                          ReachTuple.factory(-rt.getHrnID(),
-                                                             false,   // multi
-                                                             ReachTuple.ARITY_ONE,
-                                                             false    // out-of-context
-                                                             )
-                                          );
-       }
+        // otherwise age is in range [0, k]
+        Integer I = as.getAge(rt.getHrnID() );
+        assert I != null;
+        assert !rt.isMultiObject();
+        assert rt.getArity() == ReachTuple.ARITY_ONE;
+
+        if( rt.isOutOfContext() ) {
+          // becomes the in-context version
+          baseState = Canonical.addUpArity(baseState,
+                                           ReachTuple.factory(rt.getHrnID(),
+                                                              false,   // multi
+                                                              ReachTuple.ARITY_ONE,
+                                                              false    // out-of-context
+                                                              )
+                                           );
+
+        } else {
+          // otherwise the ith symbol becomes shadowed
+          baseState = Canonical.addUpArity(baseState,
+                                           ReachTuple.factory(-rt.getHrnID(),
+                                                              false,   // multi
+                                                              ReachTuple.ARITY_ONE,
+                                                              false    // out-of-context
+                                                              )
+                                           );
+        }
       }
     }
 
@@ -1103,15 +1103,15 @@ abstract public class Canonical {
                           );
 
       for( int i = 0; i < as.getAllocationDepth(); ++i ) {
-       out = Canonical.add(out,
-                           Canonical.addUpArity(baseState,
-                                                ReachTuple.factory(as.getIthOldest(i),
-                                                                   false,    // multi
-                                                                   ReachTuple.ARITY_ONE,
-                                                                   true     // out-of-context
-                                                                   )
-                                                )
-                           );
+        out = Canonical.add(out,
+                            Canonical.addUpArity(baseState,
+                                                 ReachTuple.factory(as.getIthOldest(i),
+                                                                    false,    // multi
+                                                                    ReachTuple.ARITY_ONE,
+                                                                    true     // out-of-context
+                                                                    )
+                                                 )
+                            );
       }
 
     } else {
@@ -1193,20 +1193,20 @@ abstract public class Canonical {
       int age = as.getShadowAgeCategory(rt.getHrnID() );
 
       if( age == AllocSite.SHADOWAGE_notInThisSite ) {
-       // things not from the site just go back in
-       out = Canonical.addUpArity(out, rt);
+        // things not from the site just go back in
+        out = Canonical.addUpArity(out, rt);
 
       } else {
-       assert !rt.isOutOfContext();
-
-       // otherwise unshadow it
-       out = Canonical.addUpArity(out,
-                                  ReachTuple.factory(-rt.getHrnID(),
-                                                     rt.isMultiObject(),
-                                                     rt.getArity(),
-                                                     false
-                                                     )
-                                  );
+        assert !rt.isOutOfContext();
+
+        // otherwise unshadow it
+        out = Canonical.addUpArity(out,
+                                   ReachTuple.factory(-rt.getHrnID(),
+                                                      rt.isMultiObject(),
+                                                      rt.getArity(),
+                                                      false
+                                                      )
+                                   );
       }
     }
 
@@ -1370,14 +1370,14 @@ abstract public class Canonical {
       Taint t2 = ts2.containsIgnorePreds(t1);
 
       if( t2 != null ) {
-       Taint tNew = new Taint(t1);
-       tNew.preds = Canonical.join(t1.preds,
-                                   t2.preds
-                                   );
-       tNew = (Taint) makeCanonical(tNew);
-       out.taints.add(tNew);
+        Taint tNew = new Taint(t1);
+        tNew.preds = Canonical.join(t1.preds,
+                                    t2.preds
+                                    );
+        tNew = (Taint) makeCanonical(tNew);
+        out.taints.add(tNew);
       } else {
-       out.taints.add(t1);
+        out.taints.add(t1);
       }
     }
 
@@ -1388,7 +1388,7 @@ abstract public class Canonical {
       Taint t1 = ts1.containsIgnorePreds(t2);
 
       if( t1 == null ) {
-       out.taints.add(t2);
+        out.taints.add(t2);
       }
     }
 
@@ -1452,14 +1452,14 @@ abstract public class Canonical {
       Taint t2 = ts2.containsIgnorePreds(t1);
 
       if( t2 != null ) {
-       Taint tNew = new Taint(t1);
-       tNew.preds = Canonical.join(t1.preds,
-                                   t2.preds
-                                   );
-       tNew = (Taint) makeCanonical(tNew);
-       out.taints.add(tNew);
+        Taint tNew = new Taint(t1);
+        tNew.preds = Canonical.join(t1.preds,
+                                    t2.preds
+                                    );
+        tNew = (Taint) makeCanonical(tNew);
+        out.taints.add(tNew);
       } else {
-       out.taints.add(t1);
+        out.taints.add(t1);
       }
     }
 
@@ -1470,7 +1470,7 @@ abstract public class Canonical {
       Taint t1 = ts1.containsIgnorePreds(t2);
 
       if( t1 == null ) {
-       out.taints.add(t2);
+        out.taints.add(t2);
       }
     }
 
@@ -1504,7 +1504,7 @@ abstract public class Canonical {
           !t.getSESE().equals(sese) ||
           !t.getPreds().isEmpty()
           ) {
-       out.taints.add(t);
+        out.taints.add(t);
       }
     }
 
@@ -1534,7 +1534,7 @@ abstract public class Canonical {
       // it is out of context so it should go through, too
       if( t.getSESE() == null ||
           !seseSet.contains(t)) {
-       out.taints.add(t);
+        out.taints.add(t);
       }
     }
 
@@ -1560,7 +1560,7 @@ abstract public class Canonical {
       // unaffected, and if the taint has a non-empty predicate
       // it is out of context so it should go through, too
       if( t.getSESE()!=null && t.getSESE()!=sese) {
-       out.taints.add(t);
+        out.taints.add(t);
       }
     }
 
@@ -1591,7 +1591,7 @@ abstract public class Canonical {
 
       // only take non-stall site taints onward
       if( t.getStallSite() == null ) {
-       out.taints.add(t);
+        out.taints.add(t);
       }
     }
 
index d9c057a..37a5434 100644 (file)
@@ -122,10 +122,10 @@ public class DisjointAnalysis implements HeapAnalysis {
 
       AllocSite as = n.getAllocSite();
       if (as == null) {
-       out += "  " + n.toString() + ",\n";
+        out += "  " + n.toString() + ",\n";
       } else {
-       out += "  " + n.toString() + ": " + as.toStringVerbose()
-              + ",\n";
+        out += "  " + n.toString() + ": " + as.toStringVerbose()
+               + ",\n";
       }
     }
 
@@ -161,7 +161,7 @@ public class DisjointAnalysis implements HeapAnalysis {
       TaskDescriptor td = (TaskDescriptor) taskItr.next();
 
       if (!tabularOutput) {
-       bw.write("\n---------" + td + "--------\n");
+        bw.write("\n---------" + td + "--------\n");
       }
 
       HashSet<AllocSite> allocSites = getFlaggedAllocationSitesReachableFromTask(td);
@@ -176,52 +176,52 @@ public class DisjointAnalysis implements HeapAnalysis {
       FlatMethod fm = state.getMethodFlat(td);
       for (int i = 0; i < fm.numParameters(); ++i) {
 
-       // skip parameters with types that cannot reference
-       // into the heap
-       if( !shouldAnalysisTrack(fm.getParameter(i).getType() ) ) {
-         continue;
-       }
-
-       // for the ith parameter check for sharing classes to all
-       // higher numbered parameters
-       for (int j = i + 1; j < fm.numParameters(); ++j) {
-
-         // skip parameters with types that cannot reference
-         // into the heap
-         if( !shouldAnalysisTrack(fm.getParameter(j).getType() ) ) {
-           continue;
-         }
-
-
-         common = hasPotentialSharing(td, i, j);
-         if (!common.isEmpty()) {
-           foundSomeSharing = true;
-           ++numSharing;
-           if (!tabularOutput) {
-             bw.write("Potential sharing between parameters " + i
-                      + " and " + j + ".\n");
-             bw.write(prettyPrintNodeSet(common) + "\n");
-           }
-         }
-       }
-
-       // for the ith parameter, check for sharing classes against
-       // the set of allocation sites reachable from this
-       // task context
-       Iterator allocItr = allocSites.iterator();
-       while (allocItr.hasNext()) {
-         AllocSite as = (AllocSite) allocItr.next();
-         common = hasPotentialSharing(td, i, as);
-         if (!common.isEmpty()) {
-           foundSomeSharing = true;
-           ++numSharing;
-           if (!tabularOutput) {
-             bw.write("Potential sharing between parameter " + i
-                      + " and " + as.getFlatNew() + ".\n");
-             bw.write(prettyPrintNodeSet(common) + "\n");
-           }
-         }
-       }
+        // skip parameters with types that cannot reference
+        // into the heap
+        if( !shouldAnalysisTrack(fm.getParameter(i).getType() ) ) {
+          continue;
+        }
+
+        // for the ith parameter check for sharing classes to all
+        // higher numbered parameters
+        for (int j = i + 1; j < fm.numParameters(); ++j) {
+
+          // skip parameters with types that cannot reference
+          // into the heap
+          if( !shouldAnalysisTrack(fm.getParameter(j).getType() ) ) {
+            continue;
+          }
+
+
+          common = hasPotentialSharing(td, i, j);
+          if (!common.isEmpty()) {
+            foundSomeSharing = true;
+            ++numSharing;
+            if (!tabularOutput) {
+              bw.write("Potential sharing between parameters " + i
+                       + " and " + j + ".\n");
+              bw.write(prettyPrintNodeSet(common) + "\n");
+            }
+          }
+        }
+
+        // for the ith parameter, check for sharing classes against
+        // the set of allocation sites reachable from this
+        // task context
+        Iterator allocItr = allocSites.iterator();
+        while (allocItr.hasNext()) {
+          AllocSite as = (AllocSite) allocItr.next();
+          common = hasPotentialSharing(td, i, as);
+          if (!common.isEmpty()) {
+            foundSomeSharing = true;
+            ++numSharing;
+            if (!tabularOutput) {
+              bw.write("Potential sharing between parameter " + i
+                       + " and " + as.getFlatNew() + ".\n");
+              bw.write(prettyPrintNodeSet(common) + "\n");
+            }
+          }
+        }
       }
 
       // for each allocation site check for sharing classes with
@@ -230,36 +230,36 @@ public class DisjointAnalysis implements HeapAnalysis {
       HashSet<AllocSite> outerChecked = new HashSet<AllocSite>();
       Iterator allocItr1 = allocSites.iterator();
       while (allocItr1.hasNext()) {
-       AllocSite as1 = (AllocSite) allocItr1.next();
+        AllocSite as1 = (AllocSite) allocItr1.next();
 
-       Iterator allocItr2 = allocSites.iterator();
-       while (allocItr2.hasNext()) {
-         AllocSite as2 = (AllocSite) allocItr2.next();
+        Iterator allocItr2 = allocSites.iterator();
+        while (allocItr2.hasNext()) {
+          AllocSite as2 = (AllocSite) allocItr2.next();
 
-         if (!outerChecked.contains(as2)) {
-           common = hasPotentialSharing(td, as1, as2);
+          if (!outerChecked.contains(as2)) {
+            common = hasPotentialSharing(td, as1, as2);
 
-           if (!common.isEmpty()) {
-             foundSomeSharing = true;
-             ++numSharing;
-             if (!tabularOutput) {
-               bw.write("Potential sharing between "
-                        + as1.getFlatNew() + " and "
-                        + as2.getFlatNew() + ".\n");
-               bw.write(prettyPrintNodeSet(common) + "\n");
-             }
-           }
-         }
-       }
+            if (!common.isEmpty()) {
+              foundSomeSharing = true;
+              ++numSharing;
+              if (!tabularOutput) {
+                bw.write("Potential sharing between "
+                         + as1.getFlatNew() + " and "
+                         + as2.getFlatNew() + ".\n");
+                bw.write(prettyPrintNodeSet(common) + "\n");
+              }
+            }
+          }
+        }
 
-       outerChecked.add(as1);
+        outerChecked.add(as1);
       }
 
       if (!foundSomeSharing) {
-       if (!tabularOutput) {
-         bw.write("No sharing between flagged objects in Task " + td
-                  + ".\n");
-       }
+        if (!tabularOutput) {
+          bw.write("No sharing between flagged objects in Task " + td
+                   + ".\n");
+        }
       }
     }
 
@@ -316,21 +316,21 @@ public class DisjointAnalysis implements HeapAnalysis {
 
       Iterator allocItr2 = allocSites.iterator();
       while (allocItr2.hasNext()) {
-       AllocSite as2 = (AllocSite) allocItr2.next();
+        AllocSite as2 = (AllocSite) allocItr2.next();
 
-       if (!outerChecked.contains(as2)) {
-         Set<HeapRegionNode> common = hasPotentialSharing(d,
-                                                          as1, as2);
+        if (!outerChecked.contains(as2)) {
+          Set<HeapRegionNode> common = hasPotentialSharing(d,
+                                                           as1, as2);
 
-         if (!common.isEmpty()) {
-           foundSomeSharing = true;
-           bw.write("Potential sharing between "
-                    + as1.getDisjointAnalysisId() + " and "
-                    + as2.getDisjointAnalysisId() + ".\n");
-           bw.write(prettyPrintNodeSet(common) + "\n");
-           ++numSharing;
-         }
-       }
+          if (!common.isEmpty()) {
+            foundSomeSharing = true;
+            bw.write("Potential sharing between "
+                     + as1.getDisjointAnalysisId() + " and "
+                     + as2.getDisjointAnalysisId() + ".\n");
+            bw.write(prettyPrintNodeSet(common) + "\n");
+            ++numSharing;
+          }
+        }
       }
 
       outerChecked.add(as1);
@@ -755,7 +755,7 @@ public class DisjointAnalysis implements HeapAnalysis {
     if( sitesToFlag != null ) {
       treport = String.format("Disjoint reachability analysis flagged %d sites and took %.3f sec.", sitesToFlag.size(), dt);
       if(sitesToFlag.size()>0) {
-       treport+="\nFlagged sites:"+"\n"+sitesToFlag.toString();
+        treport+="\nFlagged sites:"+"\n"+sitesToFlag.toString();
       }
     } else {
       treport = String.format("Disjoint reachability analysis took %.3f sec.", dt);
@@ -766,32 +766,32 @@ public class DisjointAnalysis implements HeapAnalysis {
 
     try {
       if( writeFinalDOTs && !writeAllIncrementalDOTs ) {
-       writeFinalGraphs();
+        writeFinalGraphs();
       }
 
       if( state.DISJOINTWRITEIHMS && !suppressOutput ) {
-       writeFinalIHMs();
+        writeFinalIHMs();
       }
 
       if( state.DISJOINTWRITEINITCONTEXTS && !suppressOutput ) {
-       writeInitialContexts();
+        writeInitialContexts();
       }
 
       if( state.DISJOINTALIASFILE != null && !suppressOutput ) {
-       if( state.TASK ) {
-         writeAllSharing(state.DISJOINTALIASFILE, treport, justtime, state.DISJOINTALIASTAB, state.lines);
-       } else {
-         writeAllSharingJava(state.DISJOINTALIASFILE,
-                             treport,
-                             justtime,
-                             state.DISJOINTALIASTAB,
-                             state.lines
-                             );
-       }
+        if( state.TASK ) {
+          writeAllSharing(state.DISJOINTALIASFILE, treport, justtime, state.DISJOINTALIASTAB, state.lines);
+        } else {
+          writeAllSharingJava(state.DISJOINTALIASFILE,
+                              treport,
+                              justtime,
+                              state.DISJOINTALIASTAB,
+                              state.lines
+                              );
+        }
       }
 
       if( state.RCR ) {
-       buildStateMachines.writeStateMachines();
+        buildStateMachines.writeStateMachines();
       }
 
     } catch( IOException e ) {
@@ -824,23 +824,23 @@ public class DisjointAnalysis implements HeapAnalysis {
 
     if( state.TASK ) {
       if( !suppressOutput ) {
-       System.out.println("Bamboo mode...");
+        System.out.println("Bamboo mode...");
       }
 
       Iterator taskItr = state.getTaskSymbolTable().getDescriptorsIterator();
       while( taskItr.hasNext() ) {
-       TaskDescriptor td = (TaskDescriptor) taskItr.next();
-       if( !descriptorsToAnalyze.contains(td) ) {
-         // add all methods transitively reachable from the
-         // tasks as well
-         descriptorsToAnalyze.add(td);
-         descriptorsToAnalyze.addAll(callGraph.getAllMethods(td) );
-       }
+        TaskDescriptor td = (TaskDescriptor) taskItr.next();
+        if( !descriptorsToAnalyze.contains(td) ) {
+          // add all methods transitively reachable from the
+          // tasks as well
+          descriptorsToAnalyze.add(td);
+          descriptorsToAnalyze.addAll(callGraph.getAllMethods(td) );
+        }
       }
 
     } else {
       if( !suppressOutput ) {
-       System.out.println("Java mode...");
+        System.out.println("Java mode...");
       }
 
       // add all methods transitively reachable from the
@@ -876,11 +876,11 @@ public class DisjointAnalysis implements HeapAnalysis {
       // for the priority queue, give items at the head
       // of the sorted list a low number (highest priority)
       while( !sortedDescriptors.isEmpty() ) {
-       Descriptor d = sortedDescriptors.removeFirst();
-       mapDescriptorToPriority.put(d, new Integer(p) );
-       descriptorsToVisitQ.add(new DescriptorQWrapper(p, d) );
-       descriptorsToVisitSet.add(d);
-       ++p;
+        Descriptor d = sortedDescriptors.removeFirst();
+        mapDescriptorToPriority.put(d, new Integer(p) );
+        descriptorsToVisitQ.add(new DescriptorQWrapper(p, d) );
+        descriptorsToVisitSet.add(d);
+        ++p;
       }
 
     } else if( state.DISJOINTDVISITSTACK ||
@@ -889,16 +889,16 @@ public class DisjointAnalysis implements HeapAnalysis {
       // if we're doing the stack scheme, just throw the root
       // method or tasks on the stack
       if( state.TASK ) {
-       Iterator taskItr = state.getTaskSymbolTable().getDescriptorsIterator();
-       while( taskItr.hasNext() ) {
-         TaskDescriptor td = (TaskDescriptor) taskItr.next();
-         descriptorsToVisitStack.add(td);
-         descriptorsToVisitSet.add(td);
-       }
+        Iterator taskItr = state.getTaskSymbolTable().getDescriptorsIterator();
+        while( taskItr.hasNext() ) {
+          TaskDescriptor td = (TaskDescriptor) taskItr.next();
+          descriptorsToVisitStack.add(td);
+          descriptorsToVisitSet.add(td);
+        }
 
       } else {
-       descriptorsToVisitStack.add(mdAnalysisEntry);
-       descriptorsToVisitSet.add(mdAnalysisEntry);
+        descriptorsToVisitStack.add(mdAnalysisEntry);
+        descriptorsToVisitSet.add(mdAnalysisEntry);
       }
 
     } else {
@@ -913,10 +913,10 @@ public class DisjointAnalysis implements HeapAnalysis {
       if( state.DISJOINTDVISITSTACK ||
           state.DISJOINTDVISITSTACKEESONTOP
           ) {
-       d = descriptorsToVisitStack.pop();
+        d = descriptorsToVisitStack.pop();
 
       } else if( state.DISJOINTDVISITPQUE ) {
-       d = descriptorsToVisitQ.poll().getDescriptor();
+        d = descriptorsToVisitQ.poll().getDescriptor();
       }
 
       assert descriptorsToVisitSet.contains(d);
@@ -931,34 +931,34 @@ public class DisjointAnalysis implements HeapAnalysis {
       // that depend on this one to the "to visit" set.
 
       if( !suppressOutput ) {
-       System.out.println("Analyzing " + d);
+        System.out.println("Analyzing " + d);
       }
 
       if( state.DISJOINTDVISITSTACKEESONTOP ) {
-       assert calleesToEnqueue.isEmpty();
+        assert calleesToEnqueue.isEmpty();
       }
 
       ReachGraph rg     = analyzeMethod(d);
       ReachGraph rgPrev = getPartial(d);
 
       if( !rg.equals(rgPrev) ) {
-       setPartial(d, rg);
+        setPartial(d, rg);
 
-       if( state.DISJOINTDEBUGSCHEDULING ) {
-         System.out.println("  complete graph changed, scheduling callers for analysis:");
-       }
+        if( state.DISJOINTDEBUGSCHEDULING ) {
+          System.out.println("  complete graph changed, scheduling callers for analysis:");
+        }
 
-       // results for d changed, so enqueue dependents
-       // of d for further analysis
-       Iterator<Descriptor> depsItr = getDependents(d).iterator();
-       while( depsItr.hasNext() ) {
-         Descriptor dNext = depsItr.next();
-         enqueue(dNext);
+        // results for d changed, so enqueue dependents
+        // of d for further analysis
+        Iterator<Descriptor> depsItr = getDependents(d).iterator();
+        while( depsItr.hasNext() ) {
+          Descriptor dNext = depsItr.next();
+          enqueue(dNext);
 
-         if( state.DISJOINTDEBUGSCHEDULING ) {
-           System.out.println("    "+dNext);
-         }
-       }
+          if( state.DISJOINTDEBUGSCHEDULING ) {
+            System.out.println("    "+dNext);
+          }
+        }
       }
 
       // whether or not the method under analysis changed,
@@ -967,12 +967,12 @@ public class DisjointAnalysis implements HeapAnalysis {
       // the stack now (in other method-visiting modes they
       // are already enqueued at this point
       if( state.DISJOINTDVISITSTACKEESONTOP ) {
-       Iterator<Descriptor> depsItr = calleesToEnqueue.iterator();
-       while( depsItr.hasNext() ) {
-         Descriptor dNext = depsItr.next();
-         enqueue(dNext);
-       }
-       calleesToEnqueue.clear();
+        Iterator<Descriptor> depsItr = calleesToEnqueue.iterator();
+        while( depsItr.hasNext() ) {
+          Descriptor dNext = depsItr.next();
+          enqueue(dNext);
+        }
+        calleesToEnqueue.clear();
       }
 
     }
@@ -1014,10 +1014,10 @@ public class DisjointAnalysis implements HeapAnalysis {
 
       FlatNode fn;
       if( determinismDesired ) {
-       assert !flatNodesToVisitQ.isEmpty();
-       fn = flatNodesToVisitQ.remove();
+        assert !flatNodesToVisitQ.isEmpty();
+        fn = flatNodesToVisitQ.remove();
       } else {
-       fn = flatNodesToVisit.iterator().next();
+        fn = flatNodesToVisit.iterator().next();
       }
       flatNodesToVisit.remove(fn);
 
@@ -1028,31 +1028,31 @@ public class DisjointAnalysis implements HeapAnalysis {
       ReachGraph rg = new ReachGraph();
       TaskDescriptor taskDesc;
       if(fn instanceof FlatMethod && (taskDesc=((FlatMethod)fn).getTask())!=null) {
-       if(mapDescriptorToReachGraph.containsKey(taskDesc)) {
-         // retrieve existing reach graph if it is not first time
-         rg=mapDescriptorToReachGraph.get(taskDesc);
-       } else {
-         // create initial reach graph for a task
-         rg=createInitialTaskReachGraph((FlatMethod)fn);
-         rg.globalSweep();
-         mapDescriptorToReachGraph.put(taskDesc, rg);
-       }
+        if(mapDescriptorToReachGraph.containsKey(taskDesc)) {
+          // retrieve existing reach graph if it is not first time
+          rg=mapDescriptorToReachGraph.get(taskDesc);
+        } else {
+          // create initial reach graph for a task
+          rg=createInitialTaskReachGraph((FlatMethod)fn);
+          rg.globalSweep();
+          mapDescriptorToReachGraph.put(taskDesc, rg);
+        }
       }
 
       // start by merging all node's parents' graphs
       for( int i = 0; i < pm.numPrev(fn); ++i ) {
-       FlatNode pn = pm.getPrev(fn,i);
-       if( mapFlatNodeToReachGraph.containsKey(pn) ) {
-         ReachGraph rgParent = mapFlatNodeToReachGraph.get(pn);
-         rg.merge(rgParent);
-       }
+        FlatNode pn = pm.getPrev(fn,i);
+        if( mapFlatNodeToReachGraph.containsKey(pn) ) {
+          ReachGraph rgParent = mapFlatNodeToReachGraph.get(pn);
+          rg.merge(rgParent);
+        }
       }
 
 
       if( takeDebugSnapshots &&
           d.getSymbol().equals(descSymbolDebug)
           ) {
-       debugSnapshot(rg, fn, true);
+        debugSnapshot(rg, fn, true);
       }
 
 
@@ -1063,8 +1063,8 @@ public class DisjointAnalysis implements HeapAnalysis {
       if( takeDebugSnapshots &&
           d.getSymbol().equals(descSymbolDebug)
           ) {
-       debugSnapshot(rg, fn, false);
-       ++snapNodeCounter;
+        debugSnapshot(rg, fn, false);
+        ++snapNodeCounter;
       }
 
 
@@ -1073,16 +1073,16 @@ public class DisjointAnalysis implements HeapAnalysis {
       // with the update and enqueue the children
       ReachGraph rgPrev = mapFlatNodeToReachGraph.get(fn);
       if( !rg.equals(rgPrev) ) {
-       mapFlatNodeToReachGraph.put(fn, rg);
+        mapFlatNodeToReachGraph.put(fn, rg);
 
-       for( int i = 0; i < pm.numNext(fn); i++ ) {
-         FlatNode nn = pm.getNext(fn, i);
+        for( int i = 0; i < pm.numNext(fn); i++ ) {
+          FlatNode nn = pm.getNext(fn, i);
 
-         flatNodesToVisit.add(nn);
-         if( determinismDesired ) {
-           flatNodesToVisitQ.add(nn);
-         }
-       }
+          flatNodesToVisit.add(nn);
+          if( determinismDesired ) {
+            flatNodesToVisitQ.add(nn);
+          }
+        }
       }
     }
 
@@ -1116,8 +1116,8 @@ public class DisjointAnalysis implements HeapAnalysis {
       if( snapVisitCounter == visitStartCapture + numVisitsToCapture &&
           stopAfterCapture
           ) {
-       System.out.println("!!! Stopping analysis after debug snap captures. !!!");
-       System.exit(0);
+        System.out.println("!!! Stopping analysis after debug snap captures. !!!");
+        System.exit(0);
       }
     }
 
@@ -1183,13 +1183,13 @@ public class DisjointAnalysis implements HeapAnalysis {
       Set entrySet = heapsFromCallers.entrySet();
       Iterator itr = entrySet.iterator();
       while( itr.hasNext() ) {
-       Map.Entry me        = (Map.Entry)itr.next();
-       FlatCall fc        = (FlatCall)   me.getKey();
-       ReachGraph rgContrib = (ReachGraph) me.getValue();
+        Map.Entry me        = (Map.Entry)itr.next();
+        FlatCall fc        = (FlatCall)   me.getKey();
+        ReachGraph rgContrib = (ReachGraph) me.getValue();
 
-       assert fc.getMethod().equals(d);
+        assert fc.getMethod().equals(d);
 
-       rg.merge(rgContrib);
+        rg.merge(rgContrib);
       }
 
       // additionally, we are enforcing STRICT MONOTONICITY for the
@@ -1205,22 +1205,22 @@ public class DisjointAnalysis implements HeapAnalysis {
     case FKind.FlatOpNode:
       FlatOpNode fon = (FlatOpNode) fn;
       if( fon.getOp().getOp() == Operation.ASSIGN ) {
-       lhs = fon.getDest();
-       rhs = fon.getLeft();
+        lhs = fon.getDest();
+        rhs = fon.getLeft();
 
-       // before transfer, do effects analysis support
-       if( doEffectsAnalysis && fmContaining != fmAnalysisEntry ) {
-         if(rblockRel.isPotentialStallSite(fn)) {
-           // x gets status of y
+        // before transfer, do effects analysis support
+        if( doEffectsAnalysis && fmContaining != fmAnalysisEntry ) {
+          if(rblockRel.isPotentialStallSite(fn)) {
+            // x gets status of y
 //            if(!rg.isAccessible(rhs)){
-           if(!accessible.isAccessible(fn, rhs)) {
-             rg.makeInaccessible(lhs);
-           }
-         }
-       }
+            if(!accessible.isAccessible(fn, rhs)) {
+              rg.makeInaccessible(lhs);
+            }
+          }
+        }
 
-       // transfer func
-       rg.assignTempXEqualToTempY(lhs, rhs);
+        // transfer func
+        rg.assignTempXEqualToTempY(lhs, rhs);
       }
       break;
 
@@ -1234,13 +1234,13 @@ public class DisjointAnalysis implements HeapAnalysis {
 
       // before transfer, do effects analysis support
       if( doEffectsAnalysis && fmContaining != fmAnalysisEntry ) {
-       if(rblockRel.isPotentialStallSite(fn)) {
-         // x gets status of y
+        if(rblockRel.isPotentialStallSite(fn)) {
+          // x gets status of y
 //          if(!rg.isAccessible(rhs)){
-         if(!accessible.isAccessible(fn,rhs)) {
-           rg.makeInaccessible(lhs);
-         }
-       }
+          if(!accessible.isAccessible(fn,rhs)) {
+            rg.makeInaccessible(lhs);
+          }
+        }
       }
 
       // transfer func
@@ -1258,29 +1258,29 @@ public class DisjointAnalysis implements HeapAnalysis {
       // a stall-site taint
       if( doEffectsAnalysis && fmContaining != fmAnalysisEntry ) {
 
-       if(rblockRel.isPotentialStallSite(fn)) {
-         // x=y.f, stall y if not accessible
-         // contributes read effects on stall site of y
+        if(rblockRel.isPotentialStallSite(fn)) {
+          // x=y.f, stall y if not accessible
+          // contributes read effects on stall site of y
 //          if(!rg.isAccessible(rhs)) {
-         if(!accessible.isAccessible(fn,rhs)) {
-           rg.taintStallSite(fn, rhs);
-         }
+          if(!accessible.isAccessible(fn,rhs)) {
+            rg.taintStallSite(fn, rhs);
+          }
 
-         // after this, x and y are accessbile.
-         rg.makeAccessible(lhs);
-         rg.makeAccessible(rhs);
-       }
+          // after this, x and y are accessbile.
+          rg.makeAccessible(lhs);
+          rg.makeAccessible(rhs);
+        }
       }
 
       if( shouldAnalysisTrack(fld.getType() ) ) {
-       // transfer func
-       rg.assignTempXEqualToTempYFieldF(lhs, rhs, fld, fn);
+        // transfer func
+        rg.assignTempXEqualToTempYFieldF(lhs, rhs, fld, fn);
       }
 
       // after transfer, use updated graph to
       // do effects analysis
       if( doEffectsAnalysis && fmContaining != fmAnalysisEntry ) {
-       effectsAnalysis.analyzeFlatFieldNode(rg, rhs, fld, fn);
+        effectsAnalysis.analyzeFlatFieldNode(rg, rhs, fld, fn);
       }
       break;
 
@@ -1297,33 +1297,33 @@ public class DisjointAnalysis implements HeapAnalysis {
       // stall-site taints
       if( doEffectsAnalysis && fmContaining != fmAnalysisEntry ) {
 
-       if(rblockRel.isPotentialStallSite(fn)) {
-         // x.y=f , stall x and y if they are not accessible
-         // also contribute write effects on stall site of x
+        if(rblockRel.isPotentialStallSite(fn)) {
+          // x.y=f , stall x and y if they are not accessible
+          // also contribute write effects on stall site of x
 //          if(!rg.isAccessible(lhs)) {
-         if(!accessible.isAccessible(fn,lhs)) {
-           rg.taintStallSite(fn, lhs);
-         }
+          if(!accessible.isAccessible(fn,lhs)) {
+            rg.taintStallSite(fn, lhs);
+          }
 
 //          if(!rg.isAccessible(rhs)) {
-         if(!accessible.isAccessible(fn,rhs)) {
-           rg.taintStallSite(fn, rhs);
-         }
+          if(!accessible.isAccessible(fn,rhs)) {
+            rg.taintStallSite(fn, rhs);
+          }
 
-         // accessible status update
-         rg.makeAccessible(lhs);
-         rg.makeAccessible(rhs);
-       }
+          // accessible status update
+          rg.makeAccessible(lhs);
+          rg.makeAccessible(rhs);
+        }
       }
 
       if( shouldAnalysisTrack(fld.getType() ) ) {
-       // transfer func
-       strongUpdate = rg.assignTempXFieldFEqualToTempY(lhs, fld, rhs, fn);
+        // transfer func
+        strongUpdate = rg.assignTempXFieldFEqualToTempY(lhs, fld, rhs, fn);
       }
 
       // use transformed graph to do effects analysis
       if( doEffectsAnalysis && fmContaining != fmAnalysisEntry ) {
-       effectsAnalysis.analyzeFlatSetFieldNode(rg, lhs, fld, fn, strongUpdate);
+        effectsAnalysis.analyzeFlatSetFieldNode(rg, lhs, fld, fn, strongUpdate);
       }
       break;
 
@@ -1342,28 +1342,28 @@ public class DisjointAnalysis implements HeapAnalysis {
       // before transfer func, possibly inject
       // stall-site taint
       if( doEffectsAnalysis && fmContaining != fmAnalysisEntry ) {
-       if(rblockRel.isPotentialStallSite(fn)) {
-         // x=y.f, stall y if not accessible
-         // contributes read effects on stall site of y
-         // after this, x and y are accessbile.
+        if(rblockRel.isPotentialStallSite(fn)) {
+          // x=y.f, stall y if not accessible
+          // contributes read effects on stall site of y
+          // after this, x and y are accessbile.
 //          if(!rg.isAccessible(rhs)) {
-         if(!accessible.isAccessible(fn,rhs)) {
-           rg.taintStallSite(fn, rhs);
-         }
+          if(!accessible.isAccessible(fn,rhs)) {
+            rg.taintStallSite(fn, rhs);
+          }
 
-         rg.makeAccessible(lhs);
-         rg.makeAccessible(rhs);
-       }
+          rg.makeAccessible(lhs);
+          rg.makeAccessible(rhs);
+        }
       }
 
       if( shouldAnalysisTrack(lhs.getType() ) ) {
-       // transfer func
-       rg.assignTempXEqualToTempYFieldF(lhs, rhs, fdElement, fn);
+        // transfer func
+        rg.assignTempXEqualToTempYFieldF(lhs, rhs, fdElement, fn);
       }
 
       // use transformed graph to do effects analysis
       if( doEffectsAnalysis && fmContaining != fmAnalysisEntry ) {
-       effectsAnalysis.analyzeFlatFieldNode(rg, rhs, fdElement, fn);
+        effectsAnalysis.analyzeFlatFieldNode(rg, rhs, fdElement, fn);
       }
       break;
 
@@ -1383,37 +1383,37 @@ public class DisjointAnalysis implements HeapAnalysis {
       // stall-site taints
       if( doEffectsAnalysis && fmContaining != fmAnalysisEntry ) {
 
-       if(rblockRel.isPotentialStallSite(fn)) {
-         // x.y=f , stall x and y if they are not accessible
-         // also contribute write effects on stall site of x
+        if(rblockRel.isPotentialStallSite(fn)) {
+          // x.y=f , stall x and y if they are not accessible
+          // also contribute write effects on stall site of x
 //          if(!rg.isAccessible(lhs)) {
-         if(!accessible.isAccessible(fn,lhs)) {
-           rg.taintStallSite(fn, lhs);
-         }
+          if(!accessible.isAccessible(fn,lhs)) {
+            rg.taintStallSite(fn, lhs);
+          }
 
 //          if(!rg.isAccessible(rhs)) {
-         if(!accessible.isAccessible(fn,rhs)) {
-           rg.taintStallSite(fn, rhs);
-         }
+          if(!accessible.isAccessible(fn,rhs)) {
+            rg.taintStallSite(fn, rhs);
+          }
 
-         // accessible status update
-         rg.makeAccessible(lhs);
-         rg.makeAccessible(rhs);
-       }
+          // accessible status update
+          rg.makeAccessible(lhs);
+          rg.makeAccessible(rhs);
+        }
       }
 
       if( shouldAnalysisTrack(rhs.getType() ) ) {
-       // transfer func, BUT
-       // skip this node if it cannot create new reachability paths
-       if( !arrayReferencees.doesNotCreateNewReaching(fsen) ) {
-         rg.assignTempXFieldFEqualToTempY(lhs, fdElement, rhs, fn);
-       }
+        // transfer func, BUT
+        // skip this node if it cannot create new reachability paths
+        if( !arrayReferencees.doesNotCreateNewReaching(fsen) ) {
+          rg.assignTempXFieldFEqualToTempY(lhs, fdElement, rhs, fn);
+        }
       }
 
       // use transformed graph to do effects analysis
       if( doEffectsAnalysis && fmContaining != fmAnalysisEntry ) {
-       effectsAnalysis.analyzeFlatSetFieldNode(rg, lhs, fdElement, fn,
-                                               false);
+        effectsAnalysis.analyzeFlatSetFieldNode(rg, lhs, fdElement, fn,
+                                                false);
       }
       break;
 
@@ -1421,18 +1421,18 @@ public class DisjointAnalysis implements HeapAnalysis {
       FlatNew fnn = (FlatNew) fn;
       lhs = fnn.getDst();
       if( shouldAnalysisTrack(lhs.getType() ) ) {
-       AllocSite as = getAllocSiteFromFlatNewPRIVATE(fnn);
+        AllocSite as = getAllocSiteFromFlatNewPRIVATE(fnn);
 
-       // before transform, support effects analysis
-       if (doEffectsAnalysis && fmContaining != fmAnalysisEntry) {
-         if (rblockRel.isPotentialStallSite(fn)) {
-           // after creating new object, lhs is accessible
-           rg.makeAccessible(lhs);
-         }
-       }
+        // before transform, support effects analysis
+        if (doEffectsAnalysis && fmContaining != fmAnalysisEntry) {
+          if (rblockRel.isPotentialStallSite(fn)) {
+            // after creating new object, lhs is accessible
+            rg.makeAccessible(lhs);
+          }
+        }
 
-       // transfer func
-       rg.assignTempEqualToNewAlloc(lhs, as);
+        // transfer func
+        rg.assignTempEqualToNewAlloc(lhs, as);
       }
       break;
 
@@ -1441,11 +1441,11 @@ public class DisjointAnalysis implements HeapAnalysis {
 
       if( doEffectsAnalysis && fmContaining != fmAnalysisEntry ) {
 
-       // always remove ALL stall site taints at enter
-       rg.removeAllStallSiteTaints();
+        // always remove ALL stall site taints at enter
+        rg.removeAllStallSiteTaints();
 
-       // inject taints for in-set vars
-       rg.taintInSetVars(sese);
+        // inject taints for in-set vars
+        rg.taintInSetVars(sese);
 
       }
       break;
@@ -1456,15 +1456,15 @@ public class DisjointAnalysis implements HeapAnalysis {
 
       if( doEffectsAnalysis && fmContaining != fmAnalysisEntry ) {
 
-       // @ sese exit make all live variables
-       // inaccessible to later parent statements
-       rg.makeInaccessible(liveness.getLiveInTemps(fmContaining, fn) );
+        // @ sese exit make all live variables
+        // inaccessible to later parent statements
+        rg.makeInaccessible(liveness.getLiveInTemps(fmContaining, fn) );
 
-       // always remove ALL stall site taints at exit
-       rg.removeAllStallSiteTaints();
+        // always remove ALL stall site taints at exit
+        rg.removeAllStallSiteTaints();
 
-       // remove in-set var taints for the exiting rblock
-       rg.removeInContextTaints(sese);
+        // remove in-set var taints for the exiting rblock
+        rg.removeInContextTaints(sese);
       }
       break;
 
@@ -1472,9 +1472,9 @@ public class DisjointAnalysis implements HeapAnalysis {
     case FKind.FlatCall: {
       Descriptor mdCaller;
       if( fmContaining.getMethod() != null ) {
-       mdCaller = fmContaining.getMethod();
+        mdCaller = fmContaining.getMethod();
       } else {
-       mdCaller = fmContaining.getTask();
+        mdCaller = fmContaining.getTask();
       }
       FlatCall fc       = (FlatCall) fn;
       MethodDescriptor mdCallee = fc.getMethod();
@@ -1482,15 +1482,15 @@ public class DisjointAnalysis implements HeapAnalysis {
 
 
       if( mdCallee.getSymbol().equals("genReach") ) {
-       rg.writeGraph("genReach"+d,
-                     true,     // write labels (variables)
-                     true,     // selectively hide intermediate temp vars
-                     true,     // prune unreachable heap regions
-                     false,    // hide reachability altogether
-                     true,     // hide subset reachability states
-                     true,     // hide predicates
-                     true);    // hide edge taints
-       break;
+        rg.writeGraph("genReach"+d,
+                      true,     // write labels (variables)
+                      true,     // selectively hide intermediate temp vars
+                      true,     // prune unreachable heap regions
+                      false,    // hide reachability altogether
+                      true,     // hide subset reachability states
+                      true,     // hide predicates
+                      true);    // hide edge taints
+        break;
       }
 
 
@@ -1502,29 +1502,29 @@ public class DisjointAnalysis implements HeapAnalysis {
       boolean writeDebugDOTs = false;
       boolean stopAfter      = false;
       if( debugCallSite ) {
-       ++ReachGraph.debugCallSiteVisitCounter;
-       System.out.println("    $$$ Debug call site visit "+
-                          ReachGraph.debugCallSiteVisitCounter+
-                          " $$$"
-                          );
-       if(
-         (ReachGraph.debugCallSiteVisitCounter >=
-          ReachGraph.debugCallSiteVisitStartCapture)  &&
-
-         (ReachGraph.debugCallSiteVisitCounter <
-          ReachGraph.debugCallSiteVisitStartCapture +
-          ReachGraph.debugCallSiteNumVisitsToCapture)
-         ) {
-         writeDebugDOTs = true;
-         System.out.println("      $$$ Capturing this call site visit $$$");
-         if( ReachGraph.debugCallSiteStopAfter &&
-             (ReachGraph.debugCallSiteVisitCounter ==
-              ReachGraph.debugCallSiteVisitStartCapture +
-              ReachGraph.debugCallSiteNumVisitsToCapture - 1)
-             ) {
-           stopAfter = true;
-         }
-       }
+        ++ReachGraph.debugCallSiteVisitCounter;
+        System.out.println("    $$$ Debug call site visit "+
+                           ReachGraph.debugCallSiteVisitCounter+
+                           " $$$"
+                           );
+        if(
+          (ReachGraph.debugCallSiteVisitCounter >=
+           ReachGraph.debugCallSiteVisitStartCapture)  &&
+
+          (ReachGraph.debugCallSiteVisitCounter <
+           ReachGraph.debugCallSiteVisitStartCapture +
+           ReachGraph.debugCallSiteNumVisitsToCapture)
+          ) {
+          writeDebugDOTs = true;
+          System.out.println("      $$$ Capturing this call site visit $$$");
+          if( ReachGraph.debugCallSiteStopAfter &&
+              (ReachGraph.debugCallSiteVisitCounter ==
+               ReachGraph.debugCallSiteVisitStartCapture +
+               ReachGraph.debugCallSiteNumVisitsToCapture - 1)
+              ) {
+            stopAfter = true;
+          }
+        }
       }
 
 
@@ -1553,23 +1553,23 @@ public class DisjointAnalysis implements HeapAnalysis {
       heapForThisCall_cur.merge(heapForThisCall_old);
 
       if( !heapForThisCall_cur.equals(heapForThisCall_old) ) {
-       // if heap at call site changed, update the contribution,
-       // and reschedule the callee for analysis
-       addIHMcontribution(mdCallee, fc, heapForThisCall_cur);
+        // if heap at call site changed, update the contribution,
+        // and reschedule the callee for analysis
+        addIHMcontribution(mdCallee, fc, heapForThisCall_cur);
 
-       // map a FlatCall to its enclosing method/task descriptor
-       // so we can write that info out later
-       fc2enclosing.put(fc, mdCaller);
+        // map a FlatCall to its enclosing method/task descriptor
+        // so we can write that info out later
+        fc2enclosing.put(fc, mdCaller);
 
-       if( state.DISJOINTDEBUGSCHEDULING ) {
-         System.out.println("  context changed, scheduling callee: "+mdCallee);
-       }
+        if( state.DISJOINTDEBUGSCHEDULING ) {
+          System.out.println("  context changed, scheduling callee: "+mdCallee);
+        }
 
-       if( state.DISJOINTDVISITSTACKEESONTOP ) {
-         calleesToEnqueue.add(mdCallee);
-       } else {
-         enqueue(mdCallee);
-       }
+        if( state.DISJOINTDVISITSTACKEESONTOP ) {
+          calleesToEnqueue.add(mdCallee);
+        } else {
+          enqueue(mdCallee);
+        }
 
       }
 
@@ -1579,78 +1579,78 @@ public class DisjointAnalysis implements HeapAnalysis {
       // callees, so find the set of callees...
       Set<MethodDescriptor> setPossibleCallees;
       if( determinismDesired ) {
-       // use an ordered set
-       setPossibleCallees = new TreeSet<MethodDescriptor>(dComp);
+        // use an ordered set
+        setPossibleCallees = new TreeSet<MethodDescriptor>(dComp);
       } else {
-       // otherwise use a speedy hashset
-       setPossibleCallees = new HashSet<MethodDescriptor>();
+        // otherwise use a speedy hashset
+        setPossibleCallees = new HashSet<MethodDescriptor>();
       }
 
       if( mdCallee.isStatic() ) {
-       setPossibleCallees.add(mdCallee);
+        setPossibleCallees.add(mdCallee);
       } else {
-       TypeDescriptor typeDesc = fc.getThis().getType();
-       setPossibleCallees.addAll(callGraph.getMethods(mdCallee,
-                                                      typeDesc)
-                                 );
+        TypeDescriptor typeDesc = fc.getThis().getType();
+        setPossibleCallees.addAll(callGraph.getMethods(mdCallee,
+                                                       typeDesc)
+                                  );
       }
 
       ReachGraph rgMergeOfPossibleCallers = new ReachGraph();
 
       Iterator<MethodDescriptor> mdItr = setPossibleCallees.iterator();
       while( mdItr.hasNext() ) {
-       MethodDescriptor mdPossible = mdItr.next();
-       FlatMethod fmPossible = state.getMethodFlat(mdPossible);
-
-       addDependent(mdPossible,  // callee
-                    d);          // caller
-
-       // don't alter the working graph (rg) until we compute a
-       // result for every possible callee, merge them all together,
-       // then set rg to that
-       ReachGraph rgPossibleCaller = new ReachGraph();
-       rgPossibleCaller.merge(rg);
-
-       ReachGraph rgPossibleCallee = getPartial(mdPossible);
-
-       if( rgPossibleCallee == null ) {
-         // if this method has never been analyzed just schedule it
-         // for analysis and skip over this call site for now
-         if( state.DISJOINTDVISITSTACKEESONTOP ) {
-           calleesToEnqueue.add(mdPossible);
-         } else {
-           enqueue(mdPossible);
-         }
-
-         if( state.DISJOINTDEBUGSCHEDULING ) {
-           System.out.println("  callee hasn't been analyzed, scheduling: "+mdPossible);
-         }
-
-       } else {
-         // calculate the method call transform
-         rgPossibleCaller.resolveMethodCall(fc,
-                                            fmPossible,
-                                            rgPossibleCallee,
-                                            callerNodeIDsCopiedToCallee,
-                                            writeDebugDOTs
-                                            );
-
-         if( doEffectsAnalysis && fmContaining != fmAnalysisEntry ) {
+        MethodDescriptor mdPossible = mdItr.next();
+        FlatMethod fmPossible = state.getMethodFlat(mdPossible);
+
+        addDependent(mdPossible,  // callee
+                     d);          // caller
+
+        // don't alter the working graph (rg) until we compute a
+        // result for every possible callee, merge them all together,
+        // then set rg to that
+        ReachGraph rgPossibleCaller = new ReachGraph();
+        rgPossibleCaller.merge(rg);
+
+        ReachGraph rgPossibleCallee = getPartial(mdPossible);
+
+        if( rgPossibleCallee == null ) {
+          // if this method has never been analyzed just schedule it
+          // for analysis and skip over this call site for now
+          if( state.DISJOINTDVISITSTACKEESONTOP ) {
+            calleesToEnqueue.add(mdPossible);
+          } else {
+            enqueue(mdPossible);
+          }
+
+          if( state.DISJOINTDEBUGSCHEDULING ) {
+            System.out.println("  callee hasn't been analyzed, scheduling: "+mdPossible);
+          }
+
+        } else {
+          // calculate the method call transform
+          rgPossibleCaller.resolveMethodCall(fc,
+                                             fmPossible,
+                                             rgPossibleCallee,
+                                             callerNodeIDsCopiedToCallee,
+                                             writeDebugDOTs
+                                             );
+
+          if( doEffectsAnalysis && fmContaining != fmAnalysisEntry ) {
 //            if( !rgPossibleCallee.isAccessible( ReachGraph.tdReturn ) ) {
-           if( !accessible.isAccessible(fn, ReachGraph.tdReturn) ) {
-             rgPossibleCaller.makeInaccessible(fc.getReturnTemp() );
-           }
-         }
+            if( !accessible.isAccessible(fn, ReachGraph.tdReturn) ) {
+              rgPossibleCaller.makeInaccessible(fc.getReturnTemp() );
+            }
+          }
 
-       }
+        }
 
-       rgMergeOfPossibleCallers.merge(rgPossibleCaller);
+        rgMergeOfPossibleCallers.merge(rgPossibleCaller);
       }
 
 
       if( stopAfter ) {
-       System.out.println("$$$ Exiting after requested captures of call site. $$$");
-       System.exit(0);
+        System.out.println("$$$ Exiting after requested captures of call site. $$$");
+        System.exit(0);
       }
 
 
@@ -1665,10 +1665,10 @@ public class DisjointAnalysis implements HeapAnalysis {
       //need to consider more
       FlatNode nextFN=fmCallee.getNext(0);
       if( nextFN instanceof FlatSESEEnterNode ) {
-       FlatSESEEnterNode calleeSESE=(FlatSESEEnterNode)nextFN;
-       if(!calleeSESE.getIsLeafSESE()) {
-         rg.makeInaccessible(liveness.getLiveInTemps(fmContaining, fn) );
-       }
+        FlatSESEEnterNode calleeSESE=(FlatSESEEnterNode)nextFN;
+        if(!calleeSESE.getIsLeafSESE()) {
+          rg.makeInaccessible(liveness.getLiveInTemps(fmContaining, fn) );
+        }
       }
 
     } break;
@@ -1681,13 +1681,13 @@ public class DisjointAnalysis implements HeapAnalysis {
       // before transfer, do effects analysis support
       if( doEffectsAnalysis && fmContaining != fmAnalysisEntry ) {
 //        if(!rg.isAccessible(rhs)){
-       if(!accessible.isAccessible(fn,rhs)) {
-         rg.makeInaccessible(ReachGraph.tdReturn);
-       }
+        if(!accessible.isAccessible(fn,rhs)) {
+          rg.makeInaccessible(ReachGraph.tdReturn);
+        }
       }
 
       if( rhs != null && shouldAnalysisTrack(rhs.getType() ) ) {
-       rg.assignReturnEqualToTemp(rhs);
+        rg.assignReturnEqualToTemp(rhs);
       }
 
       setRetNodes.add(frn);
@@ -1754,9 +1754,9 @@ public class DisjointAnalysis implements HeapAnalysis {
 
       String graphName;
       if( d instanceof TaskDescriptor ) {
-       graphName = "COMPLETEtask"+d;
+        graphName = "COMPLETEtask"+d;
       } else {
-       graphName = "COMPLETE"+d;
+        graphName = "COMPLETE"+d;
       }
 
       rg.writeGraph(graphName,
@@ -1779,18 +1779,18 @@ public class DisjointAnalysis implements HeapAnalysis {
 
       Iterator fc2rgItr = IHMs.entrySet().iterator();
       while( fc2rgItr.hasNext() ) {
-       Map.Entry me2 = (Map.Entry)fc2rgItr.next();
-       FlatCall fc  = (FlatCall)   me2.getKey();
-       ReachGraph rg  = (ReachGraph) me2.getValue();
-
-       rg.writeGraph("IHMPARTFOR"+d+"FROM"+fc2enclosing.get(fc)+fc,
-                     true,    // write labels (variables)
-                     true,    // selectively hide intermediate temp vars
-                     true,    // hide reachability altogether
-                     true,    // prune unreachable heap regions
-                     true,    // hide subset reachability states
-                     false,   // hide predicates
-                     true);   // hide edge taints
+        Map.Entry me2 = (Map.Entry)fc2rgItr.next();
+        FlatCall fc  = (FlatCall)   me2.getKey();
+        ReachGraph rg  = (ReachGraph) me2.getValue();
+
+        rg.writeGraph("IHMPARTFOR"+d+"FROM"+fc2enclosing.get(fc)+fc,
+                      true,    // write labels (variables)
+                      true,    // selectively hide intermediate temp vars
+                      true,    // hide reachability altogether
+                      true,    // prune unreachable heap regions
+                      true,    // hide subset reachability states
+                      false,   // hide predicates
+                      true);   // hide edge taints
       }
     }
   }
@@ -1829,15 +1829,15 @@ public class DisjointAnalysis implements HeapAnalysis {
     // descriptor we've already written out
     if( writeAllIncrementalDOTs ) {
       if( !mapDescriptorToNumUpdates.containsKey(d) ) {
-       mapDescriptorToNumUpdates.put(d, new Integer(0) );
+        mapDescriptorToNumUpdates.put(d, new Integer(0) );
       }
       Integer n = mapDescriptorToNumUpdates.get(d);
 
       String graphName;
       if( d instanceof TaskDescriptor ) {
-       graphName = d+"COMPLETEtask"+String.format("%05d", n);
+        graphName = d+"COMPLETEtask"+String.format("%05d", n);
       } else {
-       graphName = d+"COMPLETE"+String.format("%05d", n);
+        graphName = d+"COMPLETE"+String.format("%05d", n);
       }
 
       rg.writeGraph(graphName,
@@ -1872,9 +1872,9 @@ public class DisjointAnalysis implements HeapAnalysis {
 
       // the newest nodes are single objects
       for( int i = 0; i < allocationDepth; ++i ) {
-       Integer id = generateUniqueHeapRegionNodeID();
-       as.setIthOldest(i, id);
-       mapHrnIdToAllocSite.put(id, as);
+        Integer id = generateUniqueHeapRegionNodeID();
+        as.setIthOldest(i, id);
+        mapHrnIdToAllocSite.put(id, as);
       }
 
       // the oldest node is a summary node
@@ -1982,7 +1982,7 @@ public class DisjointAnalysis implements HeapAnalysis {
       Descriptor d = itr.next();
 
       if( !discovered.contains(d) ) {
-       dfsVisit(d, toSort, sorted, discovered);
+        dfsVisit(d, toSort, sorted, discovered);
       }
     }
 
@@ -2010,31 +2010,31 @@ public class DisjointAnalysis implements HeapAnalysis {
       // the call graph is not aware that we have a fabricated
       // analysis entry that calls the program source's entry
       if( md == mdSourceEntry ) {
-       if( !discovered.contains(mdAnalysisEntry) ) {
-         addDependent(mdSourceEntry,   // callee
-                      mdAnalysisEntry  // caller
-                      );
-         dfsVisit(mdAnalysisEntry, toSort, sorted, discovered);
-       }
+        if( !discovered.contains(mdAnalysisEntry) ) {
+          addDependent(mdSourceEntry,   // callee
+                       mdAnalysisEntry  // caller
+                       );
+          dfsVisit(mdAnalysisEntry, toSort, sorted, discovered);
+        }
       }
 
       // otherwise call graph guides DFS
       Iterator itr = callGraph.getCallerSet(md).iterator();
       while( itr.hasNext() ) {
-       Descriptor dCaller = (Descriptor) itr.next();
+        Descriptor dCaller = (Descriptor) itr.next();
 
-       // only consider callers in the original set to analyze
-       if( !toSort.contains(dCaller) ) {
-         continue;
-       }
+        // only consider callers in the original set to analyze
+        if( !toSort.contains(dCaller) ) {
+          continue;
+        }
 
-       if( !discovered.contains(dCaller) ) {
-         addDependent(md,      // callee
-                      dCaller  // caller
-                      );
+        if( !discovered.contains(dCaller) ) {
+          addDependent(md,      // callee
+                       dCaller  // caller
+                       );
 
-         dfsVisit(dCaller, toSort, sorted, discovered);
-       }
+          dfsVisit(dCaller, toSort, sorted, discovered);
+        }
       }
     }
 
@@ -2050,13 +2050,13 @@ public class DisjointAnalysis implements HeapAnalysis {
       if( state.DISJOINTDVISITSTACK ||
           state.DISJOINTDVISITSTACKEESONTOP
           ) {
-       descriptorsToVisitStack.add(d);
+        descriptorsToVisitStack.add(d);
 
       } else if( state.DISJOINTDVISITPQUE ) {
-       Integer priority = mapDescriptorToPriority.get(d);
-       descriptorsToVisitQ.add(new DescriptorQWrapper(priority,
-                                                      d)
-                               );
+        Integer priority = mapDescriptorToPriority.get(d);
+        descriptorsToVisitQ.add(new DescriptorQWrapper(priority,
+                                                       d)
+                                );
       }
 
       descriptorsToVisitSet.add(d);
@@ -2170,11 +2170,11 @@ public class DisjointAnalysis implements HeapAnalysis {
     if(!typeDesc.isImmutable()) {
       ClassDescriptor classDesc = typeDesc.getClassDesc();
       for (Iterator it = classDesc.getFields(); it.hasNext(); ) {
-       FieldDescriptor field = (FieldDescriptor) it.next();
-       TypeDescriptor fieldType = field.getType();
-       if (shouldAnalysisTrack(fieldType)) {
-         fieldSet.add(field);
-       }
+        FieldDescriptor field = (FieldDescriptor) it.next();
+        TypeDescriptor fieldType = field.getType();
+        if (shouldAnalysisTrack(fieldType)) {
+          fieldSet.add(field);
+        }
       }
     }
     return fieldSet;
@@ -2192,59 +2192,59 @@ public class DisjointAnalysis implements HeapAnalysis {
       TempDescriptor tempDesc=new TempDescriptor(typeDesc.getSymbol(),typeDesc);
       HeapRegionNode hrnSummary;
       if(!mapToExistingNode.containsKey(typeDesc)) {
-       AllocSite as;
-       if(i==dimCount) {
-         as = alloc;
-       } else {
-         as = createParameterAllocSite(rg, tempDesc, false);
-       }
-       // make a new reference to allocated node
-       hrnSummary =
-         rg.createNewHeapRegionNode(as.getSummary(),                       // id or null to generate a new one
-                                    false,                       // single object?
-                                    true,                       // summary?
-                                    false,                       // out-of-context?
-                                    as.getType(),                       // type
-                                    as,                       // allocation site
-                                    alpha,                       // inherent reach
-                                    alpha,                       // current reach
-                                    ExistPredSet.factory(rg.predTrue),                       // predicates
-                                    tempDesc.toString()                       // description
-                                    );
-       rg.id2hrn.put(as.getSummary(),hrnSummary);
-
-       mapToExistingNode.put(typeDesc, hrnSummary);
+        AllocSite as;
+        if(i==dimCount) {
+          as = alloc;
+        } else {
+          as = createParameterAllocSite(rg, tempDesc, false);
+        }
+        // make a new reference to allocated node
+        hrnSummary =
+          rg.createNewHeapRegionNode(as.getSummary(),                       // id or null to generate a new one
+                                     false,                       // single object?
+                                     true,                       // summary?
+                                     false,                       // out-of-context?
+                                     as.getType(),                       // type
+                                     as,                       // allocation site
+                                     alpha,                       // inherent reach
+                                     alpha,                       // current reach
+                                     ExistPredSet.factory(rg.predTrue),                       // predicates
+                                     tempDesc.toString()                       // description
+                                     );
+        rg.id2hrn.put(as.getSummary(),hrnSummary);
+
+        mapToExistingNode.put(typeDesc, hrnSummary);
       } else {
-       hrnSummary=mapToExistingNode.get(typeDesc);
+        hrnSummary=mapToExistingNode.get(typeDesc);
       }
 
       if(prevNode==null) {
-       // make a new reference between new summary node and source
-       RefEdge edgeToSummary = new RefEdge(srcHRN,       // source
-                                           hrnSummary,             // dest
-                                           typeDesc,             // type
-                                           fd.getSymbol(),             // field name
-                                           alpha,             // beta
-                                           ExistPredSet.factory(rg.predTrue),       // predicates
-                                           null
-                                           );
-
-       rg.addRefEdge(srcHRN, hrnSummary, edgeToSummary);
-       prevNode=hrnSummary;
-       arrayEntryNode=hrnSummary;
+        // make a new reference between new summary node and source
+        RefEdge edgeToSummary = new RefEdge(srcHRN,       // source
+                                            hrnSummary,             // dest
+                                            typeDesc,             // type
+                                            fd.getSymbol(),             // field name
+                                            alpha,             // beta
+                                            ExistPredSet.factory(rg.predTrue),       // predicates
+                                            null
+                                            );
+
+        rg.addRefEdge(srcHRN, hrnSummary, edgeToSummary);
+        prevNode=hrnSummary;
+        arrayEntryNode=hrnSummary;
       } else {
-       // make a new reference between summary nodes of array
-       RefEdge edgeToSummary = new RefEdge(prevNode,             // source
-                                           hrnSummary,             // dest
-                                           typeDesc,             // type
-                                           arrayElementFieldName,             // field name
-                                           alpha,             // beta
-                                           ExistPredSet.factory(rg.predTrue),             // predicates
-                                           null
-                                           );
+        // make a new reference between summary nodes of array
+        RefEdge edgeToSummary = new RefEdge(prevNode,             // source
+                                            hrnSummary,             // dest
+                                            typeDesc,             // type
+                                            arrayElementFieldName,             // field name
+                                            alpha,             // beta
+                                            ExistPredSet.factory(rg.predTrue),             // predicates
+                                            null
+                                            );
 
-       rg.addRefEdge(prevNode, hrnSummary, edgeToSummary);
-       prevNode=hrnSummary;
+        rg.addRefEdge(prevNode, hrnSummary, edgeToSummary);
+        prevNode=hrnSummary;
       }
 
     }
@@ -2255,47 +2255,47 @@ public class DisjointAnalysis implements HeapAnalysis {
       TypeDescriptor typeDesc=type.dereference();
       typeDesc.setArrayCount(0);
       if(!mapToExistingNode.containsKey(typeDesc)) {
-       TempDescriptor tempDesc=new TempDescriptor(type.getSymbol(),typeDesc);
-       AllocSite as = createParameterAllocSite(rg, tempDesc, false);
-       // make a new reference to allocated node
-       HeapRegionNode hrnSummary =
-         rg.createNewHeapRegionNode(as.getSummary(),                       // id or null to generate a new one
-                                    false,                       // single object?
-                                    true,                       // summary?
-                                    false,                       // out-of-context?
-                                    typeDesc,                       // type
-                                    as,                       // allocation site
-                                    alpha,                       // inherent reach
-                                    alpha,                       // current reach
-                                    ExistPredSet.factory(rg.predTrue),                       // predicates
-                                    tempDesc.toString()                       // description
-                                    );
-       rg.id2hrn.put(as.getSummary(),hrnSummary);
-       mapToExistingNode.put(typeDesc, hrnSummary);
-       RefEdge edgeToSummary = new RefEdge(prevNode,             // source
-                                           hrnSummary, // dest
-                                           typeDesc, // type
-                                           arrayElementFieldName, // field name
-                                           alpha, // beta
-                                           ExistPredSet.factory(rg.predTrue),             // predicates
-                                           null
-                                           );
-       rg.addRefEdge(prevNode, hrnSummary, edgeToSummary);
-       prevNode=hrnSummary;
+        TempDescriptor tempDesc=new TempDescriptor(type.getSymbol(),typeDesc);
+        AllocSite as = createParameterAllocSite(rg, tempDesc, false);
+        // make a new reference to allocated node
+        HeapRegionNode hrnSummary =
+          rg.createNewHeapRegionNode(as.getSummary(),                       // id or null to generate a new one
+                                     false,                       // single object?
+                                     true,                       // summary?
+                                     false,                       // out-of-context?
+                                     typeDesc,                       // type
+                                     as,                       // allocation site
+                                     alpha,                       // inherent reach
+                                     alpha,                       // current reach
+                                     ExistPredSet.factory(rg.predTrue),                       // predicates
+                                     tempDesc.toString()                       // description
+                                     );
+        rg.id2hrn.put(as.getSummary(),hrnSummary);
+        mapToExistingNode.put(typeDesc, hrnSummary);
+        RefEdge edgeToSummary = new RefEdge(prevNode,             // source
+                                            hrnSummary, // dest
+                                            typeDesc, // type
+                                            arrayElementFieldName, // field name
+                                            alpha, // beta
+                                            ExistPredSet.factory(rg.predTrue),             // predicates
+                                            null
+                                            );
+        rg.addRefEdge(prevNode, hrnSummary, edgeToSummary);
+        prevNode=hrnSummary;
       } else {
-       HeapRegionNode hrnSummary=mapToExistingNode.get(typeDesc);
-       if(prevNode.getReferenceTo(hrnSummary, typeDesc, arrayElementFieldName)==null) {
-         RefEdge edgeToSummary = new RefEdge(prevNode,               // source
-                                             hrnSummary, // dest
-                                             typeDesc, // type
-                                             arrayElementFieldName, // field name
-                                             alpha, // beta
-                                             ExistPredSet.factory(rg.predTrue),               // predicates
-                                             null
-                                             );
-         rg.addRefEdge(prevNode, hrnSummary, edgeToSummary);
-       }
-       prevNode=hrnSummary;
+        HeapRegionNode hrnSummary=mapToExistingNode.get(typeDesc);
+        if(prevNode.getReferenceTo(hrnSummary, typeDesc, arrayElementFieldName)==null) {
+          RefEdge edgeToSummary = new RefEdge(prevNode,               // source
+                                              hrnSummary, // dest
+                                              typeDesc, // type
+                                              arrayElementFieldName, // field name
+                                              alpha, // beta
+                                              ExistPredSet.factory(rg.predTrue),               // predicates
+                                              null
+                                              );
+          rg.addRefEdge(prevNode, hrnSummary, edgeToSummary);
+        }
+        prevNode=hrnSummary;
       }
     }
 
@@ -2341,118 +2341,118 @@ public class DisjointAnalysis implements HeapAnalysis {
       // set-up a work set for class field
       ClassDescriptor classDesc = paramTypeDesc.getClassDesc();
       for (Iterator it = classDesc.getFields(); it.hasNext(); ) {
-       FieldDescriptor fd = (FieldDescriptor) it.next();
-       TypeDescriptor fieldType = fd.getType();
-       if (shouldAnalysisTrack(fieldType)) {
-         HashMap<HeapRegionNode, FieldDescriptor> newMap = new HashMap<HeapRegionNode, FieldDescriptor>();
-         newMap.put(hrnNewest, fd);
-         workSet.add(newMap);
-       }
+        FieldDescriptor fd = (FieldDescriptor) it.next();
+        TypeDescriptor fieldType = fd.getType();
+        if (shouldAnalysisTrack(fieldType)) {
+          HashMap<HeapRegionNode, FieldDescriptor> newMap = new HashMap<HeapRegionNode, FieldDescriptor>();
+          newMap.put(hrnNewest, fd);
+          workSet.add(newMap);
+        }
       }
 
       int uniqueIdentifier = 0;
       while (!workSet.isEmpty()) {
-       HashMap<HeapRegionNode, FieldDescriptor> map = workSet
-                                                      .iterator().next();
-       workSet.remove(map);
-
-       Set<HeapRegionNode> key = map.keySet();
-       HeapRegionNode srcHRN = key.iterator().next();
-       FieldDescriptor fd = map.get(srcHRN);
-       TypeDescriptor type = fd.getType();
-       String doneSetIdentifier = srcHRN.getIDString() + "_" + fd;
-
-       if (!doneSet.contains(doneSetIdentifier)) {
-         doneSet.add(doneSetIdentifier);
-         if (!mapTypeToExistingSummaryNode.containsKey(type)) {
-           // create new summary Node
-           TempDescriptor td = new TempDescriptor("temp"
-                                                  + uniqueIdentifier, type);
-
-           AllocSite allocSite;
-           if(type.equals(paramTypeDesc)) {
-             //corresponding allocsite has already been created for a parameter variable.
-             allocSite=as;
-           } else {
-             allocSite = createParameterAllocSite(rg, td, false);
-           }
-           String strDesc = allocSite.toStringForDOT()
-                            + "\\nsummary";
-           TypeDescriptor allocType=allocSite.getType();
-
-           HeapRegionNode hrnSummary;
-           if(allocType.isArray() && allocType.getArrayCount()>0) {
-             hrnSummary=createMultiDeimensionalArrayHRN(rg,allocSite,srcHRN,fd,mapToFirstDimensionArrayNode,mapTypeToExistingSummaryNode,hrnNewest.getAlpha());
-           } else {
-             hrnSummary =
-               rg.createNewHeapRegionNode(allocSite.getSummary(),                         // id or null to generate a new one
-                                          false,                         // single object?
-                                          true,                         // summary?
-                                          false,                         // out-of-context?
-                                          allocSite.getType(),                         // type
-                                          allocSite,                         // allocation site
-                                          hrnNewest.getAlpha(),                         // inherent reach
-                                          hrnNewest.getAlpha(),                         // current reach
-                                          ExistPredSet.factory(rg.predTrue),                         // predicates
-                                          strDesc                         // description
-                                          );
-             rg.id2hrn.put(allocSite.getSummary(),hrnSummary);
-
-             // make a new reference to summary node
-             RefEdge edgeToSummary = new RefEdge(srcHRN,       // source
-                                                 hrnSummary,       // dest
-                                                 type,       // type
-                                                 fd.getSymbol(),       // field name
-                                                 hrnNewest.getAlpha(),       // beta
-                                                 ExistPredSet.factory(rg.predTrue),       // predicates
-                                                 null
-                                                 );
-
-             rg.addRefEdge(srcHRN, hrnSummary, edgeToSummary);
-           }
-           uniqueIdentifier++;
-
-           mapTypeToExistingSummaryNode.put(type, hrnSummary);
-
-           // set-up a work set for  fields of the class
-           Set<FieldDescriptor> fieldTobeAnalyzed=getFieldSetTobeAnalyzed(type);
-           for (Iterator iterator = fieldTobeAnalyzed.iterator(); iterator
-                .hasNext(); ) {
-             FieldDescriptor fieldDescriptor = (FieldDescriptor) iterator
-                                               .next();
-             HeapRegionNode newDstHRN;
-             if(mapToFirstDimensionArrayNode.containsKey(hrnSummary)) {
-               //related heap region node is already exsited.
-               newDstHRN=mapToFirstDimensionArrayNode.get(hrnSummary);
-             } else {
-               newDstHRN=hrnSummary;
-             }
-             doneSetIdentifier = newDstHRN.getIDString() + "_" + fieldDescriptor;
-             if(!doneSet.contains(doneSetIdentifier)) {
-               // add new work item
-               HashMap<HeapRegionNode, FieldDescriptor> newMap =
-                 new HashMap<HeapRegionNode, FieldDescriptor>();
-               newMap.put(newDstHRN, fieldDescriptor);
-               workSet.add(newMap);
-             }
-           }
-
-         } else {
-           // if there exists corresponding summary node
-           HeapRegionNode hrnDst=mapTypeToExistingSummaryNode.get(type);
-
-           RefEdge edgeToSummary = new RefEdge(srcHRN,         // source
-                                               hrnDst,         // dest
-                                               fd.getType(),         // type
-                                               fd.getSymbol(),         // field name
-                                               srcHRN.getAlpha(),         // beta
-                                               ExistPredSet.factory(rg.predTrue),         // predicates
-                                               null
-                                               );
-           rg.addRefEdge(srcHRN, hrnDst, edgeToSummary);
-
-         }
-       }
+        HashMap<HeapRegionNode, FieldDescriptor> map = workSet
+                                                       .iterator().next();
+        workSet.remove(map);
+
+        Set<HeapRegionNode> key = map.keySet();
+        HeapRegionNode srcHRN = key.iterator().next();
+        FieldDescriptor fd = map.get(srcHRN);
+        TypeDescriptor type = fd.getType();
+        String doneSetIdentifier = srcHRN.getIDString() + "_" + fd;
+
+        if (!doneSet.contains(doneSetIdentifier)) {
+          doneSet.add(doneSetIdentifier);
+          if (!mapTypeToExistingSummaryNode.containsKey(type)) {
+            // create new summary Node
+            TempDescriptor td = new TempDescriptor("temp"
+                                                   + uniqueIdentifier, type);
+
+            AllocSite allocSite;
+            if(type.equals(paramTypeDesc)) {
+              //corresponding allocsite has already been created for a parameter variable.
+              allocSite=as;
+            } else {
+              allocSite = createParameterAllocSite(rg, td, false);
+            }
+            String strDesc = allocSite.toStringForDOT()
+                             + "\\nsummary";
+            TypeDescriptor allocType=allocSite.getType();
+
+            HeapRegionNode hrnSummary;
+            if(allocType.isArray() && allocType.getArrayCount()>0) {
+              hrnSummary=createMultiDeimensionalArrayHRN(rg,allocSite,srcHRN,fd,mapToFirstDimensionArrayNode,mapTypeToExistingSummaryNode,hrnNewest.getAlpha());
+            } else {
+              hrnSummary =
+                rg.createNewHeapRegionNode(allocSite.getSummary(),                         // id or null to generate a new one
+                                           false,                         // single object?
+                                           true,                         // summary?
+                                           false,                         // out-of-context?
+                                           allocSite.getType(),                         // type
+                                           allocSite,                         // allocation site
+                                           hrnNewest.getAlpha(),                         // inherent reach
+                                           hrnNewest.getAlpha(),                         // current reach
+                                           ExistPredSet.factory(rg.predTrue),                         // predicates
+                                           strDesc                         // description
+                                           );
+              rg.id2hrn.put(allocSite.getSummary(),hrnSummary);
+
+              // make a new reference to summary node
+              RefEdge edgeToSummary = new RefEdge(srcHRN,       // source
+                                                  hrnSummary,       // dest
+                                                  type,       // type
+                                                  fd.getSymbol(),       // field name
+                                                  hrnNewest.getAlpha(),       // beta
+                                                  ExistPredSet.factory(rg.predTrue),       // predicates
+                                                  null
+                                                  );
+
+              rg.addRefEdge(srcHRN, hrnSummary, edgeToSummary);
+            }
+            uniqueIdentifier++;
+
+            mapTypeToExistingSummaryNode.put(type, hrnSummary);
+
+            // set-up a work set for  fields of the class
+            Set<FieldDescriptor> fieldTobeAnalyzed=getFieldSetTobeAnalyzed(type);
+            for (Iterator iterator = fieldTobeAnalyzed.iterator(); iterator
+                 .hasNext(); ) {
+              FieldDescriptor fieldDescriptor = (FieldDescriptor) iterator
+                                                .next();
+              HeapRegionNode newDstHRN;
+              if(mapToFirstDimensionArrayNode.containsKey(hrnSummary)) {
+                //related heap region node is already exsited.
+                newDstHRN=mapToFirstDimensionArrayNode.get(hrnSummary);
+              } else {
+                newDstHRN=hrnSummary;
+              }
+              doneSetIdentifier = newDstHRN.getIDString() + "_" + fieldDescriptor;
+              if(!doneSet.contains(doneSetIdentifier)) {
+                // add new work item
+                HashMap<HeapRegionNode, FieldDescriptor> newMap =
+                  new HashMap<HeapRegionNode, FieldDescriptor>();
+                newMap.put(newDstHRN, fieldDescriptor);
+                workSet.add(newMap);
+              }
+            }
+
+          } else {
+            // if there exists corresponding summary node
+            HeapRegionNode hrnDst=mapTypeToExistingSummaryNode.get(type);
+
+            RefEdge edgeToSummary = new RefEdge(srcHRN,         // source
+                                                hrnDst,         // dest
+                                                fd.getType(),         // type
+                                                fd.getSymbol(),         // field name
+                                                srcHRN.getAlpha(),         // beta
+                                                ExistPredSet.factory(rg.predTrue),         // predicates
+                                                null
+                                                );
+            rg.addRefEdge(srcHRN, hrnDst, edgeToSummary);
+
+          }
+        }
       }
     }
 
@@ -2493,17 +2493,17 @@ public class DisjointAnalysis implements HeapAnalysis {
       FlatNode n = toVisit.iterator().next();
 
       if( n instanceof FlatNew ) {
-       s.add(getAllocSiteFromFlatNewPRIVATE( (FlatNew) n) );
+        s.add(getAllocSiteFromFlatNewPRIVATE( (FlatNew) n) );
       }
 
       toVisit.remove(n);
       visited.add(n);
 
       for( int i = 0; i < pm.numNext(n); ++i ) {
-       FlatNode child = pm.getNext(n, i);
-       if( !visited.contains(child) ) {
-         toVisit.add(child);
-       }
+        FlatNode child = pm.getNext(n, i);
+        if( !visited.contains(child) ) {
+          toVisit.add(child);
+        }
       }
     }
 
@@ -2526,24 +2526,24 @@ public class DisjointAnalysis implements HeapAnalysis {
       HashSet<AllocSite> asSet = getAllocationSiteSet(d);
       Iterator asItr = asSet.iterator();
       while (asItr.hasNext()) {
-       AllocSite as = (AllocSite) asItr.next();
-       if (as.getDisjointAnalysisId() != null) {
-         out.add(as);
-       }
+        AllocSite as = (AllocSite) asItr.next();
+        if (as.getDisjointAnalysisId() != null) {
+          out.add(as);
+        }
       }
 
       // enqueue callees of this method to be searched for
       // allocation sites also
       Set callees = callGraph.getCalleeSet(d);
       if (callees != null) {
-       Iterator methItr = callees.iterator();
-       while (methItr.hasNext()) {
-         MethodDescriptor md = (MethodDescriptor) methItr.next();
+        Iterator methItr = callees.iterator();
+        while (methItr.hasNext()) {
+          MethodDescriptor md = (MethodDescriptor) methItr.next();
 
-         if (!visited.contains(md)) {
-           toVisit.add(md);
-         }
-       }
+          if (!visited.contains(md)) {
+            toVisit.add(md);
+          }
+        }
       }
     }
 
@@ -2569,28 +2569,28 @@ public class DisjointAnalysis implements HeapAnalysis {
       HashSet<AllocSite> asSet = getAllocationSiteSet(d);
       Iterator asItr = asSet.iterator();
       while( asItr.hasNext() ) {
-       AllocSite as = (AllocSite) asItr.next();
-       TypeDescriptor typed = as.getType();
-       if( typed != null ) {
-         ClassDescriptor cd = typed.getClassDesc();
-         if( cd != null && cd.hasFlags() ) {
-           asSetTotal.add(as);
-         }
-       }
+        AllocSite as = (AllocSite) asItr.next();
+        TypeDescriptor typed = as.getType();
+        if( typed != null ) {
+          ClassDescriptor cd = typed.getClassDesc();
+          if( cd != null && cd.hasFlags() ) {
+            asSetTotal.add(as);
+          }
+        }
       }
 
       // enqueue callees of this method to be searched for
       // allocation sites also
       Set callees = callGraph.getCalleeSet(d);
       if( callees != null ) {
-       Iterator methItr = callees.iterator();
-       while( methItr.hasNext() ) {
-         MethodDescriptor md = (MethodDescriptor) methItr.next();
+        Iterator methItr = callees.iterator();
+        while( methItr.hasNext() ) {
+          MethodDescriptor md = (MethodDescriptor) methItr.next();
 
-         if( !visited.contains(md) ) {
-           toVisit.add(md);
-         }
-       }
+          if( !visited.contains(md) ) {
+            toVisit.add(md);
+          }
+        }
       }
     }
 
@@ -2639,16 +2639,16 @@ public class DisjointAnalysis implements HeapAnalysis {
                          " @@@");
       String graphName;
       if( in ) {
-       graphName = String.format("snap%03d_%04din",
-                                 snapVisitCounter,
-                                 snapNodeCounter);
+        graphName = String.format("snap%03d_%04din",
+                                  snapVisitCounter,
+                                  snapNodeCounter);
       } else {
-       graphName = String.format("snap%03d_%04dout",
-                                 snapVisitCounter,
-                                 snapNodeCounter);
+        graphName = String.format("snap%03d_%04dout",
+                                  snapVisitCounter,
+                                  snapNodeCounter);
       }
       if( fn != null ) {
-       graphName = graphName + fn;
+        graphName = graphName + fn;
       }
       rg.writeGraph(graphName,
                     true,    // write labels (variables)
index 0825957..fbf21ea 100644 (file)
@@ -83,12 +83,12 @@ public class EffectsAnalysis {
 
       Hashtable<Taint, Set<Effect>> te = sese2te.get(sese);
       if( te == null ) {
-       te = new Hashtable<Taint, Set<Effect>>();
+        te = new Hashtable<Taint, Set<Effect>>();
       }
 
       Set<Effect> effects = te.get(tNoPreds);
       if (effects == null) {
-       effects = new HashSet<Effect>();
+        effects = new HashSet<Effect>();
       }
       effects.add(e);
       te.put(tNoPreds, effects);
@@ -101,12 +101,12 @@ public class EffectsAnalysis {
 
       Hashtable<Taint, Set<Effect>> te = stallSite2te.get(stallSite);
       if( te == null ) {
-       te = new Hashtable<Taint, Set<Effect>>();
+        te = new Hashtable<Taint, Set<Effect>>();
       }
 
       Set<Effect> effects = te.get(tNoPreds);
       if (effects == null) {
-       effects = new HashSet<Effect>();
+        effects = new HashSet<Effect>();
       }
       effects.add(e);
       te.put(tNoPreds, effects);
@@ -139,8 +139,8 @@ public class EffectsAnalysis {
       Effect effect        = new Effect(affectedAlloc, Effect.read, fld);
 
       for (Iterator<Taint> taintSetIter = taintSet.iterator(); taintSetIter.hasNext(); ) {
-       Taint taint = taintSetIter.next();
-       add(taint, effect, currentProgramPoint);
+        Taint taint = taintSetIter.next();
+        add(taint, effect, currentProgramPoint);
       }
     }
   }
@@ -152,9 +152,9 @@ public class EffectsAnalysis {
       Effect effect        = new Effect(affectedAlloc, Effect.read, fld);
 
       if (taintSet!=null)
-       for (Taint taint : taintSet.getTaints()) {
-         add(taint, effect, currentProgramPoint);
-       }
+        for (Taint taint : taintSet.getTaints()) {
+          add(taint, effect, currentProgramPoint);
+        }
     }
   }
 
@@ -173,16 +173,16 @@ public class EffectsAnalysis {
       Effect effectSU      = null;
 
       if (strongUpdate) {
-       effectSU = new Effect(affectedAlloc, Effect.strongupdate, fld);
+        effectSU = new Effect(affectedAlloc, Effect.strongupdate, fld);
       }
 
       for (Iterator<Taint> taintSetIter = taintSet.iterator(); taintSetIter.hasNext(); ) {
-       Taint taint = taintSetIter.next();
-       add(taint, effect, currentProgramPoint);
+        Taint taint = taintSetIter.next();
+        add(taint, effect, currentProgramPoint);
 
-       if (strongUpdate) {
-         add(taint, effectSU, currentProgramPoint);
-       }
+        if (strongUpdate) {
+          add(taint, effectSU, currentProgramPoint);
+        }
       }
     }
   }
@@ -194,9 +194,9 @@ public class EffectsAnalysis {
       Alloc affectedAlloc = edge.getDst().getAllocSite();
       Effect effect = new Effect(affectedAlloc, Effect.write, fld);
       if (taintSet!=null)
-       for (Taint taint : taintSet.getTaints()) {
-         add(taint, effect, currentProgramPoint);
-       }
+        for (Taint taint : taintSet.getTaints()) {
+          add(taint, effect, currentProgramPoint);
+        }
     }
   }
 
@@ -213,16 +213,16 @@ public class EffectsAnalysis {
 
       Iterator meItr = taint2effects.entrySet().iterator();
       while( meItr.hasNext() ) {
-       Map.Entry me      = (Map.Entry)meItr.next();
-       Taint taint   = (Taint)       me.getKey();
-       Set<Effect> effects = (Set<Effect>)me.getValue();
+        Map.Entry me      = (Map.Entry)meItr.next();
+        Taint taint   = (Taint)       me.getKey();
+        Set<Effect> effects = (Set<Effect>)me.getValue();
 
-       Iterator<Effect> eItr = effects.iterator();
-       while( eItr.hasNext() ) {
-         Effect e = eItr.next();
+        Iterator<Effect> eItr = effects.iterator();
+        while( eItr.hasNext() ) {
+          Effect e = eItr.next();
 
-         bw.write(taint+"-->"+e+"\n");
-       }
+          bw.write(taint+"-->"+e+"\n");
+        }
       }
 
       bw.close();
index a1c3131..fc34a97 100644 (file)
@@ -243,30 +243,30 @@ public class ExistPred extends Canonical {
       // first find node
       HeapRegionNode hrn = rg.id2hrn.get(n_hrnID);
       if( hrn == null ) {
-       return null;
+        return null;
       }
 
       if( !calleeReachableNodes.contains(n_hrnID) ) {
-       return null;
+        return null;
       }
 
       // when the state is null we're done!
       if( ne_state == null ) {
-       return hrn.getPreds();
+        return hrn.getPreds();
 
       } else {
-       // otherwise look for state too
+        // otherwise look for state too
 
-       // TODO: contains OR containsSuperSet OR containsWithZeroes??
-       ReachState stateCaller = hrn.getAlpha().containsIgnorePreds(ne_state);
+        // TODO: contains OR containsSuperSet OR containsWithZeroes??
+        ReachState stateCaller = hrn.getAlpha().containsIgnorePreds(ne_state);
 
-       if( stateCaller == null ) {
-         return null;
+        if( stateCaller == null ) {
+          return null;
 
-       } else {
-         // it was here, return the predicates on the state!!
-         return stateCaller.getPreds();
-       }
+        } else {
+          // it was here, return the predicates on the state!!
+          return stateCaller.getPreds();
+        }
       }
 
       // unreachable program point!
@@ -278,61 +278,61 @@ public class ExistPred extends Canonical {
       // reference edge exists
       VariableNode vnSrc = null;
       if( e_tdSrc != null ) {
-       vnSrc = rg.td2vn.get(e_tdSrc);
+        vnSrc = rg.td2vn.get(e_tdSrc);
       }
       HeapRegionNode hrnSrc = null;
       if( e_hrnSrcID != null ) {
-       hrnSrc = rg.id2hrn.get(e_hrnSrcID);
+        hrnSrc = rg.id2hrn.get(e_hrnSrcID);
       }
       assert(vnSrc == null) || (hrnSrc == null);
 
       // the source is not present in graph
       if( vnSrc == null && hrnSrc == null ) {
-       return null;
+        return null;
       }
 
       RefSrcNode rsn;
       if( vnSrc != null ) {
-       rsn = vnSrc;
-       assert e_srcOutCalleeContext;
-       assert !e_srcOutCallerContext;
+        rsn = vnSrc;
+        assert e_srcOutCalleeContext;
+        assert !e_srcOutCallerContext;
 
       } else {
 
-       assert !(e_srcOutCalleeContext && e_srcOutCallerContext);
+        assert !(e_srcOutCalleeContext && e_srcOutCallerContext);
 
-       if( e_srcOutCalleeContext ) {
-         if( calleeReachableNodes.contains(e_hrnSrcID) ) {
-           return null;
-         }
+        if( e_srcOutCalleeContext ) {
+          if( calleeReachableNodes.contains(e_hrnSrcID) ) {
+            return null;
+          }
 
-       } else if( e_srcOutCallerContext ) {
-         if( !hrnSrc.isOutOfContext() ) {
-           return null;
-         }
+        } else if( e_srcOutCallerContext ) {
+          if( !hrnSrc.isOutOfContext() ) {
+            return null;
+          }
 
-       } else {
+        } else {
 
-         if( !calleeReachableNodes.contains(e_hrnSrcID) ) {
-           return null;
-         }
-         if( hrnSrc.isOutOfContext() ) {
-           return null;
-         }
+          if( !calleeReachableNodes.contains(e_hrnSrcID) ) {
+            return null;
+          }
+          if( hrnSrc.isOutOfContext() ) {
+            return null;
+          }
 
-       }
+        }
 
-       rsn = hrnSrc;
+        rsn = hrnSrc;
       }
 
       // is the destination present?
       HeapRegionNode hrnDst = rg.id2hrn.get(e_hrnDstID);
       if( hrnDst == null ) {
-       return null;
+        return null;
       }
 
       if( !calleeReachableNodes.contains(e_hrnDstID) ) {
-       return null;
+        return null;
       }
 
       // is there an edge between them with the given
@@ -342,40 +342,40 @@ public class ExistPred extends Canonical {
                                         e_type,
                                         e_field);
       if( edge == null ) {
-       return null;
+        return null;
       }
 
       // when the state and taint are null we're done!
       if( ne_state == null &&
           e_taint  == null ) {
-       return edge.getPreds();
+        return edge.getPreds();
 
       } else if( ne_state != null ) {
-       // otherwise look for state too
+        // otherwise look for state too
 
-       // TODO: contains OR containsSuperSet OR containsWithZeroes??
-       ReachState stateCaller = edge.getBeta().containsIgnorePreds(ne_state);
+        // TODO: contains OR containsSuperSet OR containsWithZeroes??
+        ReachState stateCaller = edge.getBeta().containsIgnorePreds(ne_state);
 
-       if( stateCaller == null ) {
-         return null;
+        if( stateCaller == null ) {
+          return null;
 
-       } else {
-         // it was here, return the predicates on the state!!
-         return stateCaller.getPreds();
-       }
+        } else {
+          // it was here, return the predicates on the state!!
+          return stateCaller.getPreds();
+        }
 
       } else {
-       // otherwise look for taint
+        // otherwise look for taint
 
-       Taint tCaller = edge.getTaints().containsIgnorePreds(e_taint);
+        Taint tCaller = edge.getTaints().containsIgnorePreds(e_taint);
 
-       if( tCaller == null ) {
-         return null;
+        if( tCaller == null ) {
+          return null;
 
-       } else {
-         // it was here, return the predicates on the taint!!
-         return tCaller.getPreds();
-       }
+        } else {
+          // it was here, return the predicates on the taint!!
+          return tCaller.getPreds();
+        }
       }
 
       // unreachable program point!
@@ -403,7 +403,7 @@ public class ExistPred extends Canonical {
 
     if( ne_state == null ) {
       if( pred.ne_state != null ) {
-       return false;
+        return false;
       }
     } else if( !ne_state.equals(pred.ne_state) ) {
       return false;
@@ -411,7 +411,7 @@ public class ExistPred extends Canonical {
 
     if( n_hrnID == null ) {
       if( pred.n_hrnID != null ) {
-       return false;
+        return false;
       }
     } else if( !n_hrnID.equals(pred.n_hrnID) ) {
       return false;
@@ -419,7 +419,7 @@ public class ExistPred extends Canonical {
 
     if( e_tdSrc == null ) {
       if( pred.e_tdSrc != null ) {
-       return false;
+        return false;
       }
     } else if( !e_tdSrc.equals(pred.e_tdSrc) ) {
       return false;
@@ -427,23 +427,23 @@ public class ExistPred extends Canonical {
 
     if( e_hrnSrcID == null ) {
       if( pred.e_hrnSrcID != null ) {
-       return false;
+        return false;
       }
     } else {
       if( !e_hrnSrcID.equals(pred.e_hrnSrcID) ) {
-       return false;
+        return false;
       }
       if( e_srcOutCalleeContext != pred.e_srcOutCalleeContext ) {
-       return false;
+        return false;
       }
       if( e_srcOutCallerContext != pred.e_srcOutCallerContext ) {
-       return false;
+        return false;
       }
     }
 
     if( e_hrnDstID == null ) {
       if( pred.e_hrnDstID != null ) {
-       return false;
+        return false;
       }
     } else if( !e_hrnDstID.equals(pred.e_hrnDstID) ) {
       return false;
@@ -451,7 +451,7 @@ public class ExistPred extends Canonical {
 
     if( e_type == null ) {
       if( pred.e_type != null ) {
-       return false;
+        return false;
       }
     } else if( !e_type.equals(pred.e_type) ) {
       return false;
@@ -459,7 +459,7 @@ public class ExistPred extends Canonical {
 
     if( e_field == null ) {
       if( pred.e_field != null ) {
-       return false;
+        return false;
       }
     } else if( !e_field.equals(pred.e_field) ) {
       return false;
@@ -467,7 +467,7 @@ public class ExistPred extends Canonical {
 
     if( e_taint == null ) {
       if( pred.e_taint != null ) {
-       return false;
+        return false;
       }
     } else if( !e_taint.equals(pred.e_taint) ) {
       return false;
@@ -486,7 +486,7 @@ public class ExistPred extends Canonical {
       int hash = n_hrnID.intValue()*17;
 
       if( ne_state != null ) {
-       hash ^= ne_state.hashCode();
+        hash ^= ne_state.hashCode();
       }
 
       return hash;
@@ -498,29 +498,29 @@ public class ExistPred extends Canonical {
       hash += e_type.hashCode()*17;
 
       if( e_field != null ) {
-       hash += e_field.hashCode()*7;
+        hash += e_field.hashCode()*7;
       }
 
       if( e_tdSrc != null ) {
-       hash ^= e_tdSrc.hashCode()*11;
+        hash ^= e_tdSrc.hashCode()*11;
       } else {
-       hash ^= e_hrnSrcID.hashCode()*11;
-       if( e_srcOutCalleeContext ) {
-         hash ^= 0xf1aeb;
-       }
-       if( e_srcOutCallerContext ) {
-         hash ^= 0x875d;
-       }
+        hash ^= e_hrnSrcID.hashCode()*11;
+        if( e_srcOutCalleeContext ) {
+          hash ^= 0xf1aeb;
+        }
+        if( e_srcOutCallerContext ) {
+          hash ^= 0x875d;
+        }
       }
 
       hash += e_hrnDstID.hashCode();
 
       if( ne_state != null ) {
-       hash ^= ne_state.hashCode();
+        hash ^= ne_state.hashCode();
       }
 
       if( e_taint != null ) {
-       hash ^= e_taint.hashCode();
+        hash ^= e_taint.hashCode();
       }
 
       return hash;
@@ -538,7 +538,7 @@ public class ExistPred extends Canonical {
     if( predType == TYPE_NODE ) {
       String s = n_hrnID.toString();
       if( ne_state != null ) {
-       s += "w"+ne_state;
+        s += "w"+ne_state;
       }
       return s;
     }
@@ -547,27 +547,27 @@ public class ExistPred extends Canonical {
       String s = "(";
 
       if( e_tdSrc != null ) {
-       s += e_tdSrc.toString();
+        s += e_tdSrc.toString();
       } else {
-       s += e_hrnSrcID.toString();
+        s += e_hrnSrcID.toString();
       }
 
       if( e_srcOutCalleeContext ) {
-       s += "(ooCLEEc)";
+        s += "(ooCLEEc)";
       }
 
       if( e_srcOutCallerContext ) {
-       s += "(ooCLERc)";
+        s += "(ooCLERc)";
       }
 
       s += "-->"+e_hrnDstID+")";
 
       if( ne_state != null ) {
-       s += "w"+ne_state;
+        s += "w"+ne_state;
       }
 
       if( e_taint != null ) {
-       s += "w"+e_taint;
+        s += "w"+e_taint;
       }
 
       return s;
index 28d6d57..d2fa286 100644 (file)
@@ -71,12 +71,12 @@ public class ExistPredSet extends Canonical {
                                      calleeReachableNodes);
 
       if( predsFromSatisfier != null ) {
-       if( predsOut == null ) {
-         predsOut = predsFromSatisfier;
-       } else {
-         predsOut = Canonical.join(predsOut,
-                                   predsFromSatisfier);
-       }
+        if( predsOut == null ) {
+          predsOut = predsFromSatisfier;
+        } else {
+          predsOut = Canonical.join(predsOut,
+                                    predsFromSatisfier);
+        }
       }
     }
 
@@ -117,7 +117,7 @@ public class ExistPredSet extends Canonical {
       ExistPred pred = predItr.next();
       s += pred.toString();
       if( predItr.hasNext() ) {
-       s += " ||\\n";
+        s += " ||\\n";
       }
     }
     s += "]";
@@ -132,7 +132,7 @@ public class ExistPredSet extends Canonical {
       ExistPred pred = predItr.next();
       s += pred.toString();
       if( predItr.hasNext() ) {
-       s += " || ";
+        s += " || ";
       }
     }
     s += "]";
index b960398..ed7e101 100644 (file)
@@ -197,7 +197,7 @@ public class HeapRegionNode extends RefSrcNode {
           edge.typeEquals(type)     &&
           edge.fieldEquals(field)
           ) {
-       return edge;
+        return edge;
       }
     }
 
@@ -262,11 +262,11 @@ public class HeapRegionNode extends RefSrcNode {
 
       Iterator<ReachTuple> rtItr = state.iterator();
       while( rtItr.hasNext() ) {
-       ReachTuple rt = rtItr.next();
+        ReachTuple rt = rtItr.next();
 
-       if( !rt.isOutOfContext() ) {
-         return false;
-       }
+        if( !rt.isOutOfContext() ) {
+          return false;
+        }
       }
     }
 
index 88f23b9..501ecdf 100644 (file)
@@ -25,37 +25,37 @@ public class PointerMethod {
       toprocess.remove(fn);
       HashSet<FlatNode> myset=new HashSet<FlatNode>();
       if (!analysisCares(fn)) {
-       for(int i=0; i<fn.numPrev(); i++) {
-         if (map.containsKey(fn.getPrev(i)))
-           myset.addAll(map.get(fn.getPrev(i)));
-       }
+        for(int i=0; i<fn.numPrev(); i++) {
+          if (map.containsKey(fn.getPrev(i)))
+            myset.addAll(map.get(fn.getPrev(i)));
+        }
       } else {
-       myset.add(fn);
+        myset.add(fn);
       }
       if (!map.containsKey(fn)||!map.get(fn).equals(myset)) {
-       map.put(fn, myset);
-       for(int i=0; i<fn.numNext(); i++) {
-         toprocess.add(fn.getNext(i));
-       }
+        map.put(fn, myset);
+        for(int i=0; i<fn.numNext(); i++) {
+          toprocess.add(fn.getNext(i));
+        }
       }
     }
     for(Iterator<FlatNode> it=map.keySet().iterator(); it.hasNext(); ) {
       FlatNode fn=it.next();
       if (analysisCares(fn)) {
-       HashSet<FlatNode> myset=new HashSet<FlatNode>();
-       for(int i=0; i<fn.numPrev(); i++) {
-         if (map.containsKey(fn.getPrev(i)))
-           myset.addAll(map.get(fn.getPrev(i)));
-       }
-       if (!prevmap.containsKey(fn))
-         prevmap.put(fn, new Vector());
-       for(Iterator<FlatNode> it2=myset.iterator(); it2.hasNext(); ) {
-         FlatNode fnprev=it2.next();
-         if (!nextmap.containsKey(fnprev))
-           nextmap.put(fnprev, new Vector());
-         nextmap.get(fnprev).add(fn);
-         prevmap.get(fn).add(fnprev);
-       }
+        HashSet<FlatNode> myset=new HashSet<FlatNode>();
+        for(int i=0; i<fn.numPrev(); i++) {
+          if (map.containsKey(fn.getPrev(i)))
+            myset.addAll(map.get(fn.getPrev(i)));
+        }
+        if (!prevmap.containsKey(fn))
+          prevmap.put(fn, new Vector());
+        for(Iterator<FlatNode> it2=myset.iterator(); it2.hasNext(); ) {
+          FlatNode fnprev=it2.next();
+          if (!nextmap.containsKey(fnprev))
+            nextmap.put(fnprev, new Vector());
+          nextmap.get(fnprev).add(fn);
+          prevmap.get(fn).add(fnprev);
+        }
       }
     }
   }
index 76ef30c..4c0ef14 100644 (file)
@@ -41,27 +41,27 @@ public class ProcessStateMachines {
       mergeAgain=false;
       HashMap<Pair<SMFEState, FieldDescriptor>, Set<SMFEState>> revMap=buildReverse(backMap);
       for(Map.Entry<Pair<SMFEState,FieldDescriptor>, Set<SMFEState>> entry : revMap.entrySet()) {
-       if (entry.getValue().size()>1) {
-         SMFEState first=null;
-         for(SMFEState state : entry.getValue()) {
-           if (removedStates.contains(state))
-             continue;
-           if (first==null) {
-             first=state;
-           } else {
-             mergeAgain=true;
-             System.out.println("MERGING:"+first+" and "+state);
-             //Make sure we don't merge the initial state someplace else
-             if (state==sm.initialState) {
-               state=first;
-               first=sm.initialState;
-             }
-             mergeTwoStates(first, state, backMap);
-             removedStates.add(state);
-             sm.fn2state.remove(state.whereDefined);
-           }
-         }
-       }
+        if (entry.getValue().size()>1) {
+          SMFEState first=null;
+          for(SMFEState state : entry.getValue()) {
+            if (removedStates.contains(state))
+              continue;
+            if (first==null) {
+              first=state;
+            } else {
+              mergeAgain=true;
+              System.out.println("MERGING:"+first+" and "+state);
+              //Make sure we don't merge the initial state someplace else
+              if (state==sm.initialState) {
+                state=first;
+                first=sm.initialState;
+              }
+              mergeTwoStates(first, state, backMap);
+              removedStates.add(state);
+              sm.fn2state.remove(state.whereDefined);
+            }
+          }
+        }
       }
     } while(mergeAgain);
   }
@@ -72,9 +72,9 @@ public class ProcessStateMachines {
     for(Map.Entry<SMFEState, Set<Pair<SMFEState, FieldDescriptor>>>entry : backMap.entrySet()) {
       SMFEState state=entry.getKey();
       for(Pair<SMFEState, FieldDescriptor> pair : entry.getValue()) {
-       if (!revMap.containsKey(pair))
-         revMap.put(pair, new HashSet<SMFEState>());
-       revMap.get(pair).add(state);
+        if (!revMap.containsKey(pair))
+          revMap.put(pair, new HashSet<SMFEState>());
+        revMap.get(pair).add(state);
       }
     }
     return revMap;
@@ -93,36 +93,36 @@ public class ProcessStateMachines {
       Effect e=entry.getKey();
       Set<SMFEState> states=entry.getValue();
       if (state1.e2states.containsKey(e)) {
-       for(SMFEState statetoadd : states) {
-         if (!state1.e2states.get(e).add(statetoadd)) {
-           //already added...reduce reference count
-           statetoadd.refCount--;
-         }
-       }
+        for(SMFEState statetoadd : states) {
+          if (!state1.e2states.get(e).add(statetoadd)) {
+            //already added...reduce reference count
+            statetoadd.refCount--;
+          }
+        }
       } else {
-       state1.e2states.put(e, states);
+        state1.e2states.put(e, states);
       }
       Set<SMFEState> states1=state1.e2states.get(e);
 
       //move now-self edges
       if (states1.contains(state2)) {
-       states1.remove(state2);
-       states1.add(state1);
+        states1.remove(state2);
+        states1.add(state1);
       }
 
       //fix up the backmap of the edges we point to
       for(SMFEState st : states1) {
-       HashSet<Pair<SMFEState, FieldDescriptor>> toRemove=new HashSet<Pair<SMFEState, FieldDescriptor>>();
-       HashSet<Pair<SMFEState, FieldDescriptor>> toAdd=new HashSet<Pair<SMFEState, FieldDescriptor>>();
-       for(Pair<SMFEState, FieldDescriptor> backpair : backMap.get(st)) {
-         if (backpair.getFirst()==state2) {
-           Pair<SMFEState, FieldDescriptor> newpair=new Pair<SMFEState, FieldDescriptor>(state1, backpair.getSecond());
-           toRemove.add(backpair);
-           toAdd.add(newpair);
-         }
-       }
-       backMap.get(st).removeAll(toRemove);
-       backMap.get(st).addAll(toAdd);
+        HashSet<Pair<SMFEState, FieldDescriptor>> toRemove=new HashSet<Pair<SMFEState, FieldDescriptor>>();
+        HashSet<Pair<SMFEState, FieldDescriptor>> toAdd=new HashSet<Pair<SMFEState, FieldDescriptor>>();
+        for(Pair<SMFEState, FieldDescriptor> backpair : backMap.get(st)) {
+          if (backpair.getFirst()==state2) {
+            Pair<SMFEState, FieldDescriptor> newpair=new Pair<SMFEState, FieldDescriptor>(state1, backpair.getSecond());
+            toRemove.add(backpair);
+            toAdd.add(newpair);
+          }
+        }
+        backMap.get(st).removeAll(toRemove);
+        backMap.get(st).addAll(toAdd);
       }
     }
 
@@ -130,14 +130,14 @@ public class ProcessStateMachines {
     for(Pair<SMFEState,FieldDescriptor> fromStatePair : backMap.get(state2)) {
       SMFEState fromState=fromStatePair.getFirst();
       for(Map.Entry<Effect, Set<SMFEState>> fromEntry : fromState.e2states.entrySet()) {
-       Effect e=fromEntry.getKey();
-       Set<SMFEState> states=fromEntry.getValue();
-       if (states.contains(state2)) {
-         states.remove(state2);
-         if(states.add(state1) && !fromState.equals(state2)) {
-           state1.refCount++;
-         }
-       }
+        Effect e=fromEntry.getKey();
+        Set<SMFEState> states=fromEntry.getValue();
+        if (states.contains(state2)) {
+          states.remove(state2);
+          if(states.add(state1) && !fromState.equals(state2)) {
+            state1.refCount++;
+          }
+        }
       }
     }
     //Clear out unreachable state's backmap
@@ -158,15 +158,15 @@ public class ProcessStateMachines {
       FlatNode fn=fnit.next();
       SMFEState state=sm.fn2state.get(fn);
       for(Iterator<Effect> efit=state.effects.iterator(); efit.hasNext(); ) {
-       Effect e=efit.next();
-       //Is it a conflicting effecting
-       if (state.getConflicts().contains(e))
-         continue;
-       //Does it still have transitions
-       if (state.e2states.containsKey(e))
-         continue;
-       //If no to both, remove it
-       efit.remove();
+        Effect e=efit.next();
+        //Is it a conflicting effecting
+        if (state.getConflicts().contains(e))
+          continue;
+        //Does it still have transitions
+        if (state.e2states.containsKey(e))
+          continue;
+        //If no to both, remove it
+        efit.remove();
       }
     }
   }
@@ -177,19 +177,19 @@ public class ProcessStateMachines {
       FlatNode fn=fnit.next();
       SMFEState state=sm.fn2state.get(fn);
       if (canReachConflicts.contains(state)) {
-       for(Iterator<Effect> efit=state.e2states.keySet().iterator(); efit.hasNext(); ) {
-         Effect e=efit.next();
-         Set<SMFEState> stateset=state.e2states.get(e);
-         for(Iterator<SMFEState> stit=stateset.iterator(); stit.hasNext(); ) {
-           SMFEState tostate=stit.next();
-           if(!canReachConflicts.contains(tostate))
-             stit.remove();
-         }
-         if (stateset.isEmpty())
-           efit.remove();
-       }
+        for(Iterator<Effect> efit=state.e2states.keySet().iterator(); efit.hasNext(); ) {
+          Effect e=efit.next();
+          Set<SMFEState> stateset=state.e2states.get(e);
+          for(Iterator<SMFEState> stit=stateset.iterator(); stit.hasNext(); ) {
+            SMFEState tostate=stit.next();
+            if(!canReachConflicts.contains(tostate))
+              stit.remove();
+          }
+          if (stateset.isEmpty())
+            efit.remove();
+        }
       } else {
-       fnit.remove();
+        fnit.remove();
       }
     }
   }
@@ -206,17 +206,17 @@ public class ProcessStateMachines {
     while(!toprocess.isEmpty()) {
       SMFEState state=toprocess.pop();
       if (!state.getConflicts().isEmpty()&&conflictStates!=null) {
-       conflictStates.add(state);
+        conflictStates.add(state);
       }
       for(Effect e : state.getEffectsAllowed()) {
-       for(SMFEState stateout : state.transitionsTo(e)) {
-         if (!backMap.containsKey(stateout)) {
-           toprocess.add(stateout);
-           backMap.put(stateout, new HashSet<Pair<SMFEState,FieldDescriptor>>());
-         }
-         Pair<SMFEState, FieldDescriptor> p=new Pair<SMFEState, FieldDescriptor>(state, e.getField());
-         backMap.get(stateout).add(p);
-       }
+        for(SMFEState stateout : state.transitionsTo(e)) {
+          if (!backMap.containsKey(stateout)) {
+            toprocess.add(stateout);
+            backMap.put(stateout, new HashSet<Pair<SMFEState,FieldDescriptor>>());
+          }
+          Pair<SMFEState, FieldDescriptor> p=new Pair<SMFEState, FieldDescriptor>(state, e.getField());
+          backMap.get(stateout).add(p);
+        }
       }
     }
     return backMap;
@@ -235,11 +235,11 @@ public class ProcessStateMachines {
       SMFEState state=toprocess.pop();
 
       for(Pair<SMFEState,FieldDescriptor> instatepair : backMap.get(state)) {
-       SMFEState instate=instatepair.getFirst();
-       if (!canReachConflicts.contains(instate)) {
-         toprocess.add(instate);
-         canReachConflicts.add(instate);
-       }
+        SMFEState instate=instatepair.getFirst();
+        if (!canReachConflicts.contains(instate)) {
+          toprocess.add(instate);
+          canReachConflicts.add(instate);
+        }
       }
     }
     return canReachConflicts;
@@ -251,9 +251,9 @@ public class ProcessStateMachines {
       StateMachineForEffects sm=bsm.getStateMachine(machinePair);
       Set<FlatSESEEnterNode> taskSet=taskAnalysis.getPossibleExecutingRBlocks(fn);
       for(FlatSESEEnterNode sese : taskSet) {
-       if (!groupMap.containsKey(sese))
-         groupMap.put(sese, new HashSet<StateMachineForEffects>());
-       groupMap.get(sese).add(sm);
+        if (!groupMap.containsKey(sese))
+          groupMap.put(sese, new HashSet<StateMachineForEffects>());
+        groupMap.get(sese).add(sm);
       }
     }
   }
@@ -265,8 +265,8 @@ public class ProcessStateMachines {
       StateMachineForEffects sm=bsm.getStateMachine(machinePair);
       Set<FlatSESEEnterNode> taskSet=taskAnalysis.getPossibleExecutingRBlocks(fn);
       for(FlatSESEEnterNode sese : taskSet) {
-       Set<StateMachineForEffects> smgroup=groupMap.get(sese);
-       computeConflictingEffects(sm, smgroup);
+        Set<StateMachineForEffects> smgroup=groupMap.get(sese);
+        computeConflictingEffects(sm, smgroup);
       }
     }
   }
@@ -275,34 +275,34 @@ public class ProcessStateMachines {
     boolean isStall=sm.getStallorSESE().kind()!=FKind.FlatSESEEnterNode;
     for(SMFEState state : sm.getStates()) {
       for(Effect e : state.getEffectsAllowed()) {
-       Alloc a=e.getAffectedAllocSite();
-       FieldDescriptor fd=e.getField();
-       int type=e.getType();
-       boolean hasConflict=false;
-       if (!isStall&&Effect.isWrite(type)) {
-         hasConflict=true;
-       } else {
-         for(StateMachineForEffects othersm : smgroup) {
-           boolean otherIsStall=othersm.getStallorSESE().kind()!=FKind.FlatSESEEnterNode;
-           //Stall sites can't conflict with each other
-           if (isStall&&otherIsStall) continue;
-
-           int effectType=othersm.getEffects(a, fd);
-           if (Effect.isWrite(type)&&effectType!=0) {
-             //Original effect is a write and we have some effect on the same field/alloc site
-             hasConflict=true;
-             break;
-           }
-           if (Effect.isWrite(effectType)) {
-             //We are a write
-             hasConflict=true;
-             break;
-           }
-         }
-       }
-       if (hasConflict) {
-         state.addConflict(e);
-       }
+        Alloc a=e.getAffectedAllocSite();
+        FieldDescriptor fd=e.getField();
+        int type=e.getType();
+        boolean hasConflict=false;
+        if (!isStall&&Effect.isWrite(type)) {
+          hasConflict=true;
+        } else {
+          for(StateMachineForEffects othersm : smgroup) {
+            boolean otherIsStall=othersm.getStallorSESE().kind()!=FKind.FlatSESEEnterNode;
+            //Stall sites can't conflict with each other
+            if (isStall&&otherIsStall) continue;
+
+            int effectType=othersm.getEffects(a, fd);
+            if (Effect.isWrite(type)&&effectType!=0) {
+              //Original effect is a write and we have some effect on the same field/alloc site
+              hasConflict=true;
+              break;
+            }
+            if (Effect.isWrite(effectType)) {
+              //We are a write
+              hasConflict=true;
+              break;
+            }
+          }
+        }
+        if (hasConflict) {
+          state.addConflict(e);
+        }
       }
     }
   }
@@ -324,11 +324,11 @@ public class ProcessStateMachines {
       if( (effectType & Effect.read)  != 0 &&
           (effectType & Effect.write) != 0
           ) {
-       allocAndFieldRW.add(new Effect(af.getFirst(),
-                                      Effect.read,
-                                      af.getSecond()
-                                      )
-                           );
+        allocAndFieldRW.add(new Effect(af.getFirst(),
+                                       Effect.read,
+                                       af.getSecond()
+                                       )
+                            );
       }
     }
 
@@ -337,9 +337,9 @@ public class ProcessStateMachines {
     // as... POSSIBLY EVIL!!!!!
     for( SMFEState state : sm.getStates() ) {
       for( Effect effect : state.getTransitionEffects() ) {
-       if( allocAndFieldRW.contains(effect) ) {
-         sm.addPossiblyEvilEffect(effect);
-       }
+        if( allocAndFieldRW.contains(effect) ) {
+          sm.addPossiblyEvilEffect(effect);
+        }
       }
     }
   }
index b2c85fb..4db4c91 100644 (file)
@@ -147,21 +147,21 @@ public class ReachGraph {
 
     if( inherent == null ) {
       if( markForAnalysis ) {
-       inherent =
-         Canonical.changePredsTo(
-           ReachSet.factory(
-             ReachState.factory(
-               ReachTuple.factory(id,
-                                  !isSingleObject,
-                                  ReachTuple.ARITY_ONE,
-                                  false                                                        // out-of-context
-                                  )
-               )
-             ),
-           predsTrue
-           );
+        inherent =
+          Canonical.changePredsTo(
+            ReachSet.factory(
+              ReachState.factory(
+                ReachTuple.factory(id,
+                                   !isSingleObject,
+                                   ReachTuple.ARITY_ONE,
+                                   false                                                        // out-of-context
+                                   )
+                )
+              ),
+            predsTrue
+            );
       } else {
-       inherent = rsetWithEmptyState;
+        inherent = rsetWithEmptyState;
       }
     }
 
@@ -267,14 +267,14 @@ public class ReachGraph {
           (edge.typeEquals(type) && edge.fieldEquals(field))
           ) {
 
-       HeapRegionNode referencee = edge.getDst();
+        HeapRegionNode referencee = edge.getDst();
 
-       removeRefEdge(referencer,
-                     referencee,
-                     edge.getType(),
-                     edge.getField() );
+        removeRefEdge(referencer,
+                      referencee,
+                      edge.getType(),
+                      edge.getField() );
 
-       atLeastOneEdgeRemoved = true;
+        atLeastOneEdgeRemoved = true;
       }
     }
 
@@ -298,12 +298,12 @@ public class ReachGraph {
           (edge.typeEquals(type) && edge.fieldEquals(field))
           ) {
 
-       RefSrcNode referencer = edge.getSrc();
+        RefSrcNode referencer = edge.getSrc();
 
-       removeRefEdge(referencer,
-                     referencee,
-                     edge.getType(),
-                     edge.getField() );
+        removeRefEdge(referencer,
+                      referencee,
+                      edge.getType(),
+                      edge.getField() );
       }
     }
   }
@@ -319,10 +319,10 @@ public class ReachGraph {
       RefEdge edge = i.next();
       RefSrcNode referencer = edge.getSrc();
       if( !(referencer instanceof VariableNode) ) {
-       removeRefEdge(referencer,
-                     referencee,
-                     edge.getType(),
-                     edge.getField() );
+        removeRefEdge(referencer,
+                      referencee,
+                      edge.getType(),
+                      edge.getField() );
       }
     }
   }
@@ -407,25 +407,25 @@ public class ReachGraph {
       RefEdge edgeNew    = edgeY.copy();
 
       if( !isSuperiorType(x.getType(), edgeY.getType() ) ) {
-       impossibleEdges.add(edgeY);
-       continue;
+        impossibleEdges.add(edgeY);
+        continue;
       }
 
       edgeNew.setSrc(lnX);
 
       if( tdCast == null ) {
-       edgeNew.setType(mostSpecificType(y.getType(),
-                                        edgeY.getType(),
-                                        referencee.getType()
-                                        )
-                       );
+        edgeNew.setType(mostSpecificType(y.getType(),
+                                         edgeY.getType(),
+                                         referencee.getType()
+                                         )
+                        );
       } else {
-       edgeNew.setType(mostSpecificType(y.getType(),
-                                        edgeY.getType(),
-                                        referencee.getType(),
-                                        tdCast
-                                        )
-                       );
+        edgeNew.setType(mostSpecificType(y.getType(),
+                                         edgeY.getType(),
+                                         referencee.getType(),
+                                         tdCast
+                                         )
+                        );
       }
 
       edgeNew.setField(null);
@@ -466,47 +466,47 @@ public class ReachGraph {
       Iterator<RefEdge> itrHrnFhrn = hrnY.iteratorToReferencees();
 
       while( itrHrnFhrn.hasNext() ) {
-       RefEdge edgeHrn = itrHrnFhrn.next();
-       HeapRegionNode hrnHrn  = edgeHrn.getDst();
-       ReachSet betaHrn = edgeHrn.getBeta();
-
-       // prune edges that are not a matching field
-       if( edgeHrn.getType() != null &&
-           !edgeHrn.getField().equals(f.getSymbol() )
-           ) {
-         continue;
-       }
-
-       // check for impossible edges
-       if( !isSuperiorType(x.getType(), edgeHrn.getType() ) ) {
-         impossibleEdges.add(edgeHrn);
-         continue;
-       }
-
-       TypeDescriptor tdNewEdge =
-         mostSpecificType(edgeHrn.getType(),
-                          hrnHrn.getType()
-                          );
-
-       TaintSet taints = Canonical.unionORpreds(edgeHrn.getTaints(),
-                                                edgeY.getTaints()
-                                                );
-       if( state.RCR ) {
-         // the DFJ way to generate taints changes for field statements
-         taints = Canonical.changeWhereDefined(taints,
-                                               currentProgramPoint);
-       }
-
-       RefEdge edgeNew = new RefEdge(lnX,
-                                     hrnHrn,
-                                     tdNewEdge,
-                                     null,
-                                     Canonical.intersection(betaY, betaHrn),
-                                     predsTrue,
-                                     taints
-                                     );
-
-       addEdgeOrMergeWithExisting(edgeNew);
+        RefEdge edgeHrn = itrHrnFhrn.next();
+        HeapRegionNode hrnHrn  = edgeHrn.getDst();
+        ReachSet betaHrn = edgeHrn.getBeta();
+
+        // prune edges that are not a matching field
+        if( edgeHrn.getType() != null &&
+            !edgeHrn.getField().equals(f.getSymbol() )
+            ) {
+          continue;
+        }
+
+        // check for impossible edges
+        if( !isSuperiorType(x.getType(), edgeHrn.getType() ) ) {
+          impossibleEdges.add(edgeHrn);
+          continue;
+        }
+
+        TypeDescriptor tdNewEdge =
+          mostSpecificType(edgeHrn.getType(),
+                           hrnHrn.getType()
+                           );
+
+        TaintSet taints = Canonical.unionORpreds(edgeHrn.getTaints(),
+                                                 edgeY.getTaints()
+                                                 );
+        if( state.RCR ) {
+          // the DFJ way to generate taints changes for field statements
+          taints = Canonical.changeWhereDefined(taints,
+                                                currentProgramPoint);
+        }
+
+        RefEdge edgeNew = new RefEdge(lnX,
+                                      hrnHrn,
+                                      tdNewEdge,
+                                      null,
+                                      Canonical.intersection(betaY, betaHrn),
+                                      predsTrue,
+                                      taints
+                                      );
+
+        addEdgeOrMergeWithExisting(edgeNew);
       }
     }
 
@@ -520,7 +520,7 @@ public class ReachGraph {
     // you must global sweep to clean up broken reachability
     if( !impossibleEdges.isEmpty() ) {
       if( !DISABLE_GLOBAL_SWEEP ) {
-       globalSweep();
+        globalSweep();
       }
     }
 
@@ -561,18 +561,18 @@ public class ReachGraph {
               (hrnX.isSingleObject() && lnX.getNumReferencees() == 1)    // case 2
           )
           ) {
-       if( !DISABLE_STRONG_UPDATES ) {
-         strongUpdateCond = true;
-
-         boolean atLeastOne =
-           clearRefEdgesFrom(hrnX,
-                             f.getType(),
-                             f.getSymbol(),
-                             false);
-         if( atLeastOne ) {
-           edgeRemovedByStrongUpdate = true;
-         }
-       }
+        if( !DISABLE_STRONG_UPDATES ) {
+          strongUpdateCond = true;
+
+          boolean atLeastOne =
+            clearRefEdgesFrom(hrnX,
+                              f.getType(),
+                              f.getSymbol(),
+                              false);
+          if( atLeastOne ) {
+            edgeRemovedByStrongUpdate = true;
+          }
+        }
       }
     }
 
@@ -588,38 +588,38 @@ public class ReachGraph {
 
       Iterator<RefEdge> itrYhrn = lnY.iteratorToReferencees();
       while( itrYhrn.hasNext() ) {
-       RefEdge edgeY = itrYhrn.next();
-       HeapRegionNode hrnY  = edgeY.getDst();
-       ReachSet O     = edgeY.getBeta();
-
-       // check for impossible edges
-       if( !isSuperiorType(f.getType(), edgeY.getType() ) ) {
-         impossibleEdges.add(edgeY);
-         continue;
-       }
-
-       // propagate tokens over nodes starting from hrnSrc, and it will
-       // take care of propagating back up edges from any touched nodes
-       ChangeSet Cy = Canonical.unionUpArityToChangeSet(O, R);
-       propagateTokensOverNodes(hrnY, Cy, nodesWithNewAlpha, edgesWithNewBeta);
-
-       // then propagate back just up the edges from hrn
-       ChangeSet Cx = Canonical.unionUpArityToChangeSet(R, O);
-       HashSet<RefEdge> todoEdges = new HashSet<RefEdge>();
-
-       Hashtable<RefEdge, ChangeSet> edgePlannedChanges =
-         new Hashtable<RefEdge, ChangeSet>();
-
-       Iterator<RefEdge> referItr = hrnX.iteratorToReferencers();
-       while( referItr.hasNext() ) {
-         RefEdge edgeUpstream = referItr.next();
-         todoEdges.add(edgeUpstream);
-         edgePlannedChanges.put(edgeUpstream, Cx);
-       }
-
-       propagateTokensOverEdges(todoEdges,
-                                edgePlannedChanges,
-                                edgesWithNewBeta);
+        RefEdge edgeY = itrYhrn.next();
+        HeapRegionNode hrnY  = edgeY.getDst();
+        ReachSet O     = edgeY.getBeta();
+
+        // check for impossible edges
+        if( !isSuperiorType(f.getType(), edgeY.getType() ) ) {
+          impossibleEdges.add(edgeY);
+          continue;
+        }
+
+        // propagate tokens over nodes starting from hrnSrc, and it will
+        // take care of propagating back up edges from any touched nodes
+        ChangeSet Cy = Canonical.unionUpArityToChangeSet(O, R);
+        propagateTokensOverNodes(hrnY, Cy, nodesWithNewAlpha, edgesWithNewBeta);
+
+        // then propagate back just up the edges from hrn
+        ChangeSet Cx = Canonical.unionUpArityToChangeSet(R, O);
+        HashSet<RefEdge> todoEdges = new HashSet<RefEdge>();
+
+        Hashtable<RefEdge, ChangeSet> edgePlannedChanges =
+          new Hashtable<RefEdge, ChangeSet>();
+
+        Iterator<RefEdge> referItr = hrnX.iteratorToReferencers();
+        while( referItr.hasNext() ) {
+          RefEdge edgeUpstream = referItr.next();
+          todoEdges.add(edgeUpstream);
+          edgePlannedChanges.put(edgeUpstream, Cx);
+        }
+
+        propagateTokensOverEdges(todoEdges,
+                                 edgePlannedChanges,
+                                 edgesWithNewBeta);
       }
     }
 
@@ -644,46 +644,46 @@ public class ReachGraph {
 
       Iterator<RefEdge> itrYhrn = lnY.iteratorToReferencees();
       while( itrYhrn.hasNext() ) {
-       RefEdge edgeY = itrYhrn.next();
-       HeapRegionNode hrnY  = edgeY.getDst();
-
-       // skip impossible edges here, we already marked them
-       // when computing reachability propagations above
-       if( !isSuperiorType(f.getType(), edgeY.getType() ) ) {
-         continue;
-       }
-
-       // prepare the new reference edge hrnX.f -> hrnY
-       TypeDescriptor tdNewEdge =
-         mostSpecificType(y.getType(),
-                          edgeY.getType(),
-                          hrnY.getType()
-                          );
-
-       TaintSet taints = edgeY.getTaints();
-
-       if( state.RCR ) {
-         // the DFJ way to generate taints changes for field statements
-         taints = Canonical.changeWhereDefined(taints,
-                                               currentProgramPoint);
-       }
-
-       RefEdge edgeNew =
-         new RefEdge(hrnX,
-                     hrnY,
-                     tdNewEdge,
-                     f.getSymbol(),
-                     Canonical.changePredsTo(
-                       Canonical.pruneBy(edgeY.getBeta(),
-                                         hrnX.getAlpha()
-                                         ),
-                       predsTrue
-                       ),
-                     predsTrue,
-                     taints
-                     );
-
-       addEdgeOrMergeWithExisting(edgeNew);
+        RefEdge edgeY = itrYhrn.next();
+        HeapRegionNode hrnY  = edgeY.getDst();
+
+        // skip impossible edges here, we already marked them
+        // when computing reachability propagations above
+        if( !isSuperiorType(f.getType(), edgeY.getType() ) ) {
+          continue;
+        }
+
+        // prepare the new reference edge hrnX.f -> hrnY
+        TypeDescriptor tdNewEdge =
+          mostSpecificType(y.getType(),
+                           edgeY.getType(),
+                           hrnY.getType()
+                           );
+
+        TaintSet taints = edgeY.getTaints();
+
+        if( state.RCR ) {
+          // the DFJ way to generate taints changes for field statements
+          taints = Canonical.changeWhereDefined(taints,
+                                                currentProgramPoint);
+        }
+
+        RefEdge edgeNew =
+          new RefEdge(hrnX,
+                      hrnY,
+                      tdNewEdge,
+                      f.getSymbol(),
+                      Canonical.changePredsTo(
+                        Canonical.pruneBy(edgeY.getBeta(),
+                                          hrnX.getAlpha()
+                                          ),
+                        predsTrue
+                        ),
+                      predsTrue,
+                      taints
+                      );
+
+        addEdgeOrMergeWithExisting(edgeNew);
       }
     }
 
@@ -697,7 +697,7 @@ public class ReachGraph {
     // reachability with a global sweep
     if( edgeRemovedByStrongUpdate || !impossibleEdges.isEmpty() ) {
       if( !DISABLE_GLOBAL_SWEEP ) {
-       globalSweep();
+        globalSweep();
       }
     }
 
@@ -804,16 +804,16 @@ public class ReachGraph {
       // only do the transfer if the i-1 node exists
       Integer idImin1th = as.getIthOldest(i - 1);
       if( id2hrn.containsKey(idImin1th) ) {
-       HeapRegionNode hrnImin1 = id2hrn.get(idImin1th);
-       if( hrnImin1.isWiped() ) {
-         // there is no info on this node, just skip
-         continue;
-       }
+        HeapRegionNode hrnImin1 = id2hrn.get(idImin1th);
+        if( hrnImin1.isWiped() ) {
+          // there is no info on this node, just skip
+          continue;
+        }
 
-       // either retrieve or make target of transfer
-       HeapRegionNode hrnI = getIthNode(as, i, false);
+        // either retrieve or make target of transfer
+        HeapRegionNode hrnI = getIthNode(as, i, false);
 
-       transferOnto(hrnImin1, hrnI);
+        transferOnto(hrnImin1, hrnI);
       }
 
     }
@@ -834,7 +834,7 @@ public class ReachGraph {
 
       Iterator<RefEdge> itrEdges = hrnToAge.iteratorToReferencers();
       while( itrEdges.hasNext() ) {
-       ageTuplesFrom(as, itrEdges.next() );
+        ageTuplesFrom(as, itrEdges.next() );
       }
     }
 
@@ -940,22 +940,22 @@ public class ReachGraph {
                                   );
 
       if( edgeSummary == null ) {
-       // the merge is trivial, nothing to be done
-       addRefEdge(hrnSummary, hrnReferencee, edgeMerged);
+        // the merge is trivial, nothing to be done
+        addRefEdge(hrnSummary, hrnReferencee, edgeMerged);
 
       } else {
-       // otherwise an edge from the referencer to hrnSummary exists already
-       // and the edge referencer->hrn should be merged with it
-       edgeSummary.setBeta(
-         Canonical.unionORpreds(edgeMerged.getBeta(),
-                                edgeSummary.getBeta()
-                                )
-         );
-       edgeSummary.setPreds(
-         Canonical.join(edgeMerged.getPreds(),
-                        edgeSummary.getPreds()
-                        )
-         );
+        // otherwise an edge from the referencer to hrnSummary exists already
+        // and the edge referencer->hrn should be merged with it
+        edgeSummary.setBeta(
+          Canonical.unionORpreds(edgeMerged.getBeta(),
+                                 edgeSummary.getBeta()
+                                 )
+          );
+        edgeSummary.setPreds(
+          Canonical.join(edgeMerged.getPreds(),
+                         edgeSummary.getPreds()
+                         )
+          );
       }
     }
 
@@ -974,22 +974,22 @@ public class ReachGraph {
                                     );
 
       if( edgeSummary == null ) {
-       // the merge is trivial, nothing to be done
-       addRefEdge(onReferencer, hrnSummary, edgeMerged);
+        // the merge is trivial, nothing to be done
+        addRefEdge(onReferencer, hrnSummary, edgeMerged);
 
       } else {
-       // otherwise an edge from the referencer to alpha_S exists already
-       // and the edge referencer->alpha_K should be merged with it
-       edgeSummary.setBeta(
-         Canonical.unionORpreds(edgeMerged.getBeta(),
-                                edgeSummary.getBeta()
-                                )
-         );
-       edgeSummary.setPreds(
-         Canonical.join(edgeMerged.getPreds(),
-                        edgeSummary.getPreds()
-                        )
-         );
+        // otherwise an edge from the referencer to alpha_S exists already
+        // and the edge referencer->alpha_K should be merged with it
+        edgeSummary.setBeta(
+          Canonical.unionORpreds(edgeMerged.getBeta(),
+                                 edgeSummary.getBeta()
+                                 )
+          );
+        edgeSummary.setPreds(
+          Canonical.join(edgeMerged.getPreds(),
+                         edgeSummary.getPreds()
+                         )
+          );
       }
     }
 
@@ -1120,56 +1120,56 @@ public class ReachGraph {
 
       Iterator<RefEdge> referItr = n.iteratorToReferencers();
       while( referItr.hasNext() ) {
-       RefEdge edge = referItr.next();
-       todoEdges.add(edge);
-
-       if( !edgePlannedChanges.containsKey(edge) ) {
-         edgePlannedChanges.put(edge,
-                                ChangeSet.factory()
-                                );
-       }
-
-       edgePlannedChanges.put(edge,
-                              Canonical.union(edgePlannedChanges.get(edge),
-                                              C
-                                              )
-                              );
+        RefEdge edge = referItr.next();
+        todoEdges.add(edge);
+
+        if( !edgePlannedChanges.containsKey(edge) ) {
+          edgePlannedChanges.put(edge,
+                                 ChangeSet.factory()
+                                 );
+        }
+
+        edgePlannedChanges.put(edge,
+                               Canonical.union(edgePlannedChanges.get(edge),
+                                               C
+                                               )
+                               );
       }
 
       Iterator<RefEdge> refeeItr = n.iteratorToReferencees();
       while( refeeItr.hasNext() ) {
-       RefEdge edgeF = refeeItr.next();
-       HeapRegionNode m     = edgeF.getDst();
-
-       ChangeSet changesToPass = ChangeSet.factory();
-
-       Iterator<ChangeTuple> itrCprime = C.iterator();
-       while( itrCprime.hasNext() ) {
-         ChangeTuple c = itrCprime.next();
-         if( edgeF.getBeta().containsIgnorePreds(c.getStateToMatch() )
-             != null
-             ) {
-           changesToPass = Canonical.add(changesToPass, c);
-         }
-       }
-
-       if( !changesToPass.isEmpty() ) {
-         if( !nodePlannedChanges.containsKey(m) ) {
-           nodePlannedChanges.put(m, ChangeSet.factory() );
-         }
-
-         ChangeSet currentChanges = nodePlannedChanges.get(m);
-
-         if( !changesToPass.isSubset(currentChanges) ) {
-
-           nodePlannedChanges.put(m,
-                                  Canonical.union(currentChanges,
-                                                  changesToPass
-                                                  )
-                                  );
-           todoNodes.add(m);
-         }
-       }
+        RefEdge edgeF = refeeItr.next();
+        HeapRegionNode m     = edgeF.getDst();
+
+        ChangeSet changesToPass = ChangeSet.factory();
+
+        Iterator<ChangeTuple> itrCprime = C.iterator();
+        while( itrCprime.hasNext() ) {
+          ChangeTuple c = itrCprime.next();
+          if( edgeF.getBeta().containsIgnorePreds(c.getStateToMatch() )
+              != null
+              ) {
+            changesToPass = Canonical.add(changesToPass, c);
+          }
+        }
+
+        if( !changesToPass.isEmpty() ) {
+          if( !nodePlannedChanges.containsKey(m) ) {
+            nodePlannedChanges.put(m, ChangeSet.factory() );
+          }
+
+          ChangeSet currentChanges = nodePlannedChanges.get(m);
+
+          if( !changesToPass.isSubset(currentChanges) ) {
+
+            nodePlannedChanges.put(m,
+                                   Canonical.union(currentChanges,
+                                                   changesToPass
+                                                   )
+                                   );
+            todoNodes.add(m);
+          }
+        }
       }
 
       todoNodes.remove(n);
@@ -1216,9 +1216,9 @@ public class ReachGraph {
       todoEdges.remove(edgeE);
 
       if( !edgePlannedChanges.containsKey(edgeE) ) {
-       edgePlannedChanges.put(edgeE,
-                              ChangeSet.factory()
-                              );
+        edgePlannedChanges.put(edgeE,
+                               ChangeSet.factory()
+                               );
       }
 
       ChangeSet C = edgePlannedChanges.get(edgeE);
@@ -1227,40 +1227,40 @@ public class ReachGraph {
 
       Iterator<ChangeTuple> itrC = C.iterator();
       while( itrC.hasNext() ) {
-       ChangeTuple c = itrC.next();
-       if( edgeE.getBeta().containsIgnorePreds(c.getStateToMatch() )
-           != null
-           ) {
-         changesToPass = Canonical.add(changesToPass, c);
-       }
+        ChangeTuple c = itrC.next();
+        if( edgeE.getBeta().containsIgnorePreds(c.getStateToMatch() )
+            != null
+            ) {
+          changesToPass = Canonical.add(changesToPass, c);
+        }
       }
 
       RefSrcNode rsn = edgeE.getSrc();
 
       if( !changesToPass.isEmpty() && rsn instanceof HeapRegionNode ) {
-       HeapRegionNode n = (HeapRegionNode) rsn;
-
-       Iterator<RefEdge> referItr = n.iteratorToReferencers();
-       while( referItr.hasNext() ) {
-         RefEdge edgeF = referItr.next();
-
-         if( !edgePlannedChanges.containsKey(edgeF) ) {
-           edgePlannedChanges.put(edgeF,
-                                  ChangeSet.factory()
-                                  );
-         }
-
-         ChangeSet currentChanges = edgePlannedChanges.get(edgeF);
-
-         if( !changesToPass.isSubset(currentChanges) ) {
-           todoEdges.add(edgeF);
-           edgePlannedChanges.put(edgeF,
-                                  Canonical.union(currentChanges,
-                                                  changesToPass
-                                                  )
-                                  );
-         }
-       }
+        HeapRegionNode n = (HeapRegionNode) rsn;
+
+        Iterator<RefEdge> referItr = n.iteratorToReferencers();
+        while( referItr.hasNext() ) {
+          RefEdge edgeF = referItr.next();
+
+          if( !edgePlannedChanges.containsKey(edgeF) ) {
+            edgePlannedChanges.put(edgeF,
+                                   ChangeSet.factory()
+                                   );
+          }
+
+          ChangeSet currentChanges = edgePlannedChanges.get(edgeF);
+
+          if( !changesToPass.isSubset(currentChanges) ) {
+            todoEdges.add(edgeF);
+            edgePlannedChanges.put(edgeF,
+                                   Canonical.union(currentChanges,
+                                                   changesToPass
+                                                   )
+                                   );
+          }
+        }
       }
     }
 
@@ -1301,7 +1301,7 @@ public class ReachGraph {
       // use this where defined flatnode to support RCR/DFJ
       FlatNode whereDefined = null;
       if( state.RCR ) {
-       whereDefined = sese;
+        whereDefined = sese;
       }
 
       // in-set var taints should NOT propagate back into callers
@@ -1372,12 +1372,12 @@ public class ReachGraph {
 
       Iterator<RefEdge> reItr = hrn.iteratorToReferencers();
       while( reItr.hasNext() ) {
-       RefEdge re = reItr.next();
+        RefEdge re = reItr.next();
 
-       re.setTaints(Canonical.removeInContextTaints(re.getTaints(),
-                                                    sese
-                                                    )
-                    );
+        re.setTaints(Canonical.removeInContextTaints(re.getTaints(),
+                                                     sese
+                                                     )
+                     );
       }
     }
   }
@@ -1392,11 +1392,11 @@ public class ReachGraph {
 
       Iterator<RefEdge> reItr = hrn.iteratorToReferencers();
       while( reItr.hasNext() ) {
-       RefEdge re = reItr.next();
+        RefEdge re = reItr.next();
 
-       re.setTaints(Canonical.removeStallSiteTaints(re.getTaints()
-                                                    )
-                    );
+        re.setTaints(Canonical.removeStallSiteTaints(re.getTaints()
+                                                     )
+                     );
       }
     }
   }
@@ -1425,30 +1425,30 @@ public class ReachGraph {
       assert belongsToThis(re.getDst() );
 
       if( !(re.getSrc() instanceof HeapRegionNode) ) {
-       continue;
+        continue;
       }
 
       HeapRegionNode hrnSrc = (HeapRegionNode) re.getSrc();
       if( !hrnSrc.isOutOfContext() ) {
-       continue;
+        continue;
       }
 
       if( srcType == null ) {
-       if( hrnSrc.getType() != null ) {
-         continue;
-       }
+        if( hrnSrc.getType() != null ) {
+          continue;
+        }
       } else {
-       if( !srcType.equals(hrnSrc.getType() ) ) {
-         continue;
-       }
+        if( !srcType.equals(hrnSrc.getType() ) ) {
+          continue;
+        }
       }
 
       if( !re.typeEquals(refType) ) {
-       continue;
+        continue;
       }
 
       if( !re.fieldEquals(refField) ) {
-       continue;
+        continue;
       }
 
       // tada!  We found it!
@@ -1474,74 +1474,74 @@ public class ReachGraph {
 
       Iterator<AllocSite> asItr = allocSites.iterator();
       while( asItr.hasNext() ) {
-       AllocSite as = asItr.next();
-
-       ReachState stateNew = ReachState.factory();
-       Iterator<ReachTuple> rtItr = stateCallee.iterator();
-       while( rtItr.hasNext() ) {
-         ReachTuple rt = rtItr.next();
-
-         // only translate this tuple if it is
-         // in the out-callee-context bag
-         HrnIdOoc hio = new HrnIdOoc(rt.getHrnID(),
-                                     rt.isOutOfContext()
-                                     );
-         if( !oocHrnIdOoc2callee.contains(hio) ) {
-           stateNew = Canonical.addUpArity(stateNew, rt);
-           continue;
-         }
-
-         int age = as.getAgeCategory(rt.getHrnID() );
-
-         // this is the current mapping, where 0, 1, 2S were allocated
-         // in the current context, 0?, 1? and 2S? were allocated in a
-         // previous context, and we're translating to a future context
-         //
-         // 0    -> 0?
-         // 1    -> 1?
-         // 2S   -> 2S?
-         // 2S*  -> 2S?*
-         //
-         // 0?   -> 2S?
-         // 1?   -> 2S?
-         // 2S?  -> 2S?
-         // 2S?* -> 2S?*
-
-         if( age == AllocSite.AGE_notInThisSite ) {
-           // things not from the site just go back in
-           stateNew = Canonical.addUpArity(stateNew, rt);
-
-         } else if( age == AllocSite.AGE_summary ||
-                    rt.isOutOfContext()
-                    ) {
-
-           stateNew = Canonical.addUpArity(stateNew,
-                                           ReachTuple.factory(as.getSummary(),
-                                                              true,   // multi
-                                                              rt.getArity(),
-                                                              true    // out-of-context
-                                                              )
-                                           );
-
-         } else {
-           // otherwise everything else just goes to an out-of-context
-           // version, everything else the same
-           Integer I = as.getAge(rt.getHrnID() );
-           assert I != null;
-
-           assert !rt.isMultiObject();
-
-           stateNew = Canonical.addUpArity(stateNew,
-                                           ReachTuple.factory(rt.getHrnID(),
-                                                              rt.isMultiObject(),   // multi
-                                                              rt.getArity(),
-                                                              true    // out-of-context
-                                                              )
-                                           );
-         }
-       }
-
-       stateCallee = stateNew;
+        AllocSite as = asItr.next();
+
+        ReachState stateNew = ReachState.factory();
+        Iterator<ReachTuple> rtItr = stateCallee.iterator();
+        while( rtItr.hasNext() ) {
+          ReachTuple rt = rtItr.next();
+
+          // only translate this tuple if it is
+          // in the out-callee-context bag
+          HrnIdOoc hio = new HrnIdOoc(rt.getHrnID(),
+                                      rt.isOutOfContext()
+                                      );
+          if( !oocHrnIdOoc2callee.contains(hio) ) {
+            stateNew = Canonical.addUpArity(stateNew, rt);
+            continue;
+          }
+
+          int age = as.getAgeCategory(rt.getHrnID() );
+
+          // this is the current mapping, where 0, 1, 2S were allocated
+          // in the current context, 0?, 1? and 2S? were allocated in a
+          // previous context, and we're translating to a future context
+          //
+          // 0    -> 0?
+          // 1    -> 1?
+          // 2S   -> 2S?
+          // 2S*  -> 2S?*
+          //
+          // 0?   -> 2S?
+          // 1?   -> 2S?
+          // 2S?  -> 2S?
+          // 2S?* -> 2S?*
+
+          if( age == AllocSite.AGE_notInThisSite ) {
+            // things not from the site just go back in
+            stateNew = Canonical.addUpArity(stateNew, rt);
+
+          } else if( age == AllocSite.AGE_summary ||
+                     rt.isOutOfContext()
+                     ) {
+
+            stateNew = Canonical.addUpArity(stateNew,
+                                            ReachTuple.factory(as.getSummary(),
+                                                               true,   // multi
+                                                               rt.getArity(),
+                                                               true    // out-of-context
+                                                               )
+                                            );
+
+          } else {
+            // otherwise everything else just goes to an out-of-context
+            // version, everything else the same
+            Integer I = as.getAge(rt.getHrnID() );
+            assert I != null;
+
+            assert !rt.isMultiObject();
+
+            stateNew = Canonical.addUpArity(stateNew,
+                                            ReachTuple.factory(rt.getHrnID(),
+                                                               rt.isMultiObject(),   // multi
+                                                               rt.getArity(),
+                                                               true    // out-of-context
+                                                               )
+                                            );
+          }
+        }
+
+        stateCallee = stateNew;
       }
 
       // make a predicate of the caller graph element
@@ -1550,22 +1550,22 @@ public class ReachGraph {
 
       Iterator<ExistPred> predItr = predsNodeOrEdge.iterator();
       while( predItr.hasNext() ) {
-       ExistPred predNodeOrEdge = predItr.next();
-
-       predsWithState =
-         Canonical.add(predsWithState,
-                       ExistPred.factory(predNodeOrEdge.n_hrnID,
-                                         predNodeOrEdge.e_tdSrc,
-                                         predNodeOrEdge.e_hrnSrcID,
-                                         predNodeOrEdge.e_hrnDstID,
-                                         predNodeOrEdge.e_type,
-                                         predNodeOrEdge.e_field,
-                                         stateCallee,
-                                         null,
-                                         predNodeOrEdge.e_srcOutCalleeContext,
-                                         predNodeOrEdge.e_srcOutCallerContext
-                                         )
-                       );
+        ExistPred predNodeOrEdge = predItr.next();
+
+        predsWithState =
+          Canonical.add(predsWithState,
+                        ExistPred.factory(predNodeOrEdge.n_hrnID,
+                                          predNodeOrEdge.e_tdSrc,
+                                          predNodeOrEdge.e_hrnSrcID,
+                                          predNodeOrEdge.e_hrnDstID,
+                                          predNodeOrEdge.e_type,
+                                          predNodeOrEdge.e_field,
+                                          stateCallee,
+                                          null,
+                                          predNodeOrEdge.e_srcOutCalleeContext,
+                                          predNodeOrEdge.e_srcOutCallerContext
+                                          )
+                        );
       }
 
       stateCallee = Canonical.changePredsTo(stateCallee,
@@ -1599,30 +1599,30 @@ public class ReachGraph {
 
       if( calleeStatesSatisfied.containsKey(stateCallee) ) {
 
-       // starting from one callee state...
-       ReachSet rsCaller = ReachSet.factory(stateCallee);
-
-       // possibly branch it into many states, which any
-       // allocation site might do, so lots of derived states
-       Iterator<AllocSite> asItr = allocSites.iterator();
-       while( asItr.hasNext() ) {
-         AllocSite as = asItr.next();
-         rsCaller = Canonical.toCallerContext(rsCaller, as);
-       }
-
-       // then before adding each derived, now caller-context
-       // states to the output, attach the appropriate pred
-       // based on the source callee state
-       Iterator<ReachState> stateItr = rsCaller.iterator();
-       while( stateItr.hasNext() ) {
-         ReachState stateCaller = stateItr.next();
-         stateCaller = Canonical.attach(stateCaller,
-                                        calleeStatesSatisfied.get(stateCallee)
-                                        );
-         out = Canonical.add(out,
-                             stateCaller
-                             );
-       }
+        // starting from one callee state...
+        ReachSet rsCaller = ReachSet.factory(stateCallee);
+
+        // possibly branch it into many states, which any
+        // allocation site might do, so lots of derived states
+        Iterator<AllocSite> asItr = allocSites.iterator();
+        while( asItr.hasNext() ) {
+          AllocSite as = asItr.next();
+          rsCaller = Canonical.toCallerContext(rsCaller, as);
+        }
+
+        // then before adding each derived, now caller-context
+        // states to the output, attach the appropriate pred
+        // based on the source callee state
+        Iterator<ReachState> stateItr = rsCaller.iterator();
+        while( stateItr.hasNext() ) {
+          ReachState stateCaller = stateItr.next();
+          stateCaller = Canonical.attach(stateCaller,
+                                         calleeStatesSatisfied.get(stateCallee)
+                                         );
+          out = Canonical.add(out,
+                              stateCaller
+                              );
+        }
       }
     }
 
@@ -1666,21 +1666,21 @@ public class ReachGraph {
 
       Iterator<ExistPred> predItr = predsEdge.iterator();
       while( predItr.hasNext() ) {
-       ExistPred predEdge = predItr.next();
-
-       predsWithTaint =
-         Canonical.add(predsWithTaint,
-                       ExistPred.factory(predEdge.e_tdSrc,
-                                         predEdge.e_hrnSrcID,
-                                         predEdge.e_hrnDstID,
-                                         predEdge.e_type,
-                                         predEdge.e_field,
-                                         null,
-                                         tCaller,
-                                         predEdge.e_srcOutCalleeContext,
-                                         predEdge.e_srcOutCallerContext
-                                         )
-                       );
+        ExistPred predEdge = predItr.next();
+
+        predsWithTaint =
+          Canonical.add(predsWithTaint,
+                        ExistPred.factory(predEdge.e_tdSrc,
+                                          predEdge.e_hrnSrcID,
+                                          predEdge.e_hrnDstID,
+                                          predEdge.e_type,
+                                          predEdge.e_field,
+                                          null,
+                                          tCaller,
+                                          predEdge.e_srcOutCalleeContext,
+                                          predEdge.e_srcOutCallerContext
+                                          )
+                        );
       }
 
       Taint tCallee = Canonical.changePredsTo(tCaller,
@@ -1717,18 +1717,18 @@ public class ReachGraph {
 
       if( calleeTaintsSatisfied.containsKey(tCallee) ) {
 
-       Taint tCaller =
-         Canonical.attach(Taint.factory(tCallee.sese,
-                                        tCallee.stallSite,
-                                        tCallee.var,
-                                        tCallee.allocSite,
-                                        tCallee.fnDefined,
-                                        ExistPredSet.factory() ),
-                          calleeTaintsSatisfied.get(tCallee)
-                          );
-       out = Canonical.add(out,
-                           tCaller
-                           );
+        Taint tCaller =
+          Canonical.attach(Taint.factory(tCallee.sese,
+                                         tCallee.stallSite,
+                                         tCallee.var,
+                                         tCallee.allocSite,
+                                         tCallee.fnDefined,
+                                         ExistPredSet.factory() ),
+                           calleeTaintsSatisfied.get(tCallee)
+                           );
+        out = Canonical.add(out,
+                            tCaller
+                            );
       }
     }
 
@@ -1782,33 +1782,33 @@ public class ReachGraph {
       toVisitInCaller.add(vnArgCaller);
 
       while( !toVisitInCaller.isEmpty() ) {
-       RefSrcNode rsnCaller = toVisitInCaller.iterator().next();
-       toVisitInCaller.remove(rsnCaller);
-       visitedInCaller.add(rsnCaller);
-
-       Iterator<RefEdge> itrRefEdges = rsnCaller.iteratorToReferencees();
-       while( itrRefEdges.hasNext() ) {
-         RefEdge reCaller  = itrRefEdges.next();
-         HeapRegionNode hrnCaller = reCaller.getDst();
-
-         callerNodeIDsCopiedToCallee.add(hrnCaller.getID() );
-         reachableCallerNodes.add(hrnCaller);
-
-         if( reCaller.getSrc() instanceof HeapRegionNode ) {
-           reachableCallerEdges.add(reCaller);
-         } else {
-           if( rsnCaller.equals(vnArgCaller) ) {
-             reachableCallerArgEdges2paramIndex.put(reCaller, i);
-           } else {
-             oocCallerEdges.add(reCaller);
-           }
-         }
-
-         if( !visitedInCaller.contains(hrnCaller) ) {
-           toVisitInCaller.add(hrnCaller);
-         }
-
-       } // end edge iteration
+        RefSrcNode rsnCaller = toVisitInCaller.iterator().next();
+        toVisitInCaller.remove(rsnCaller);
+        visitedInCaller.add(rsnCaller);
+
+        Iterator<RefEdge> itrRefEdges = rsnCaller.iteratorToReferencees();
+        while( itrRefEdges.hasNext() ) {
+          RefEdge reCaller  = itrRefEdges.next();
+          HeapRegionNode hrnCaller = reCaller.getDst();
+
+          callerNodeIDsCopiedToCallee.add(hrnCaller.getID() );
+          reachableCallerNodes.add(hrnCaller);
+
+          if( reCaller.getSrc() instanceof HeapRegionNode ) {
+            reachableCallerEdges.add(reCaller);
+          } else {
+            if( rsnCaller.equals(vnArgCaller) ) {
+              reachableCallerArgEdges2paramIndex.put(reCaller, i);
+            } else {
+              oocCallerEdges.add(reCaller);
+            }
+          }
+
+          if( !visitedInCaller.contains(hrnCaller) ) {
+            toVisitInCaller.add(hrnCaller);
+          }
+
+        } // end edge iteration
       } // end visiting heap nodes in caller
     } // end iterating over parameters as starting points
 
@@ -1827,48 +1827,48 @@ public class ReachGraph {
       Iterator<RefEdge> itrMightCross =
         hrnCallerAndInContext.iteratorToReferencers();
       while( itrMightCross.hasNext() ) {
-       RefEdge edgeMightCross = itrMightCross.next();
-
-       RefSrcNode rsnCallerAndOutContext =
-         edgeMightCross.getSrc();
-
-       if( rsnCallerAndOutContext instanceof VariableNode ) {
-         // variables do not have out-of-context reach states,
-         // so jump out now
-         oocCallerEdges.add(edgeMightCross);
-         continue;
-       }
-
-       HeapRegionNode hrnCallerAndOutContext =
-         (HeapRegionNode) rsnCallerAndOutContext;
-
-       // is this source node out-of-context?
-       if( callerNodeIDsCopiedToCallee.contains(hrnCallerAndOutContext.getID() ) ) {
-         // no, skip this edge
-         continue;
-       }
-
-       // okay, we got one
-       oocCallerEdges.add(edgeMightCross);
-
-       // add all reach tuples on the node to list
-       // of things that are out-of-context: insight
-       // if this node is reachable from someting that WAS
-       // in-context, then this node should already be in-context
-       Iterator<ReachState> stateItr = hrnCallerAndOutContext.getAlpha().iterator();
-       while( stateItr.hasNext() ) {
-         ReachState state = stateItr.next();
-
-         Iterator<ReachTuple> rtItr = state.iterator();
-         while( rtItr.hasNext() ) {
-           ReachTuple rt = rtItr.next();
-
-           oocHrnIdOoc2callee.add(new HrnIdOoc(rt.getHrnID(),
-                                               rt.isOutOfContext()
-                                               )
-                                  );
-         }
-       }
+        RefEdge edgeMightCross = itrMightCross.next();
+
+        RefSrcNode rsnCallerAndOutContext =
+          edgeMightCross.getSrc();
+
+        if( rsnCallerAndOutContext instanceof VariableNode ) {
+          // variables do not have out-of-context reach states,
+          // so jump out now
+          oocCallerEdges.add(edgeMightCross);
+          continue;
+        }
+
+        HeapRegionNode hrnCallerAndOutContext =
+          (HeapRegionNode) rsnCallerAndOutContext;
+
+        // is this source node out-of-context?
+        if( callerNodeIDsCopiedToCallee.contains(hrnCallerAndOutContext.getID() ) ) {
+          // no, skip this edge
+          continue;
+        }
+
+        // okay, we got one
+        oocCallerEdges.add(edgeMightCross);
+
+        // add all reach tuples on the node to list
+        // of things that are out-of-context: insight
+        // if this node is reachable from someting that WAS
+        // in-context, then this node should already be in-context
+        Iterator<ReachState> stateItr = hrnCallerAndOutContext.getAlpha().iterator();
+        while( stateItr.hasNext() ) {
+          ReachState state = stateItr.next();
+
+          Iterator<ReachTuple> rtItr = state.iterator();
+          while( rtItr.hasNext() ) {
+            ReachTuple rt = rtItr.next();
+
+            oocHrnIdOoc2callee.add(new HrnIdOoc(rt.getHrnID(),
+                                                rt.isOutOfContext()
+                                                )
+                                   );
+          }
+        }
       }
     }
 
@@ -2024,26 +2024,26 @@ public class ReachGraph {
       boolean outOfCallerContext;
 
       if( rsnCaller instanceof VariableNode ) {
-       VariableNode vnCaller = (VariableNode) rsnCaller;
-       oocNodeType    = null;
-       oocReach       = rsetEmpty;
-       oocPredSrcTemp = vnCaller.getTempDescriptor();
-       outOfCalleeContext = true;
-       outOfCallerContext = false;
+        VariableNode vnCaller = (VariableNode) rsnCaller;
+        oocNodeType    = null;
+        oocReach       = rsetEmpty;
+        oocPredSrcTemp = vnCaller.getTempDescriptor();
+        outOfCalleeContext = true;
+        outOfCallerContext = false;
 
       } else {
-       HeapRegionNode hrnSrcCaller = (HeapRegionNode) rsnCaller;
-       assert !callerNodeIDsCopiedToCallee.contains(hrnSrcCaller.getID() );
-       oocNodeType  = hrnSrcCaller.getType();
-       oocReach     = hrnSrcCaller.getAlpha();
-       oocPredSrcID = hrnSrcCaller.getID();
-       if( hrnSrcCaller.isOutOfContext() ) {
-         outOfCalleeContext = false;
-         outOfCallerContext = true;
-       } else {
-         outOfCalleeContext = true;
-         outOfCallerContext = false;
-       }
+        HeapRegionNode hrnSrcCaller = (HeapRegionNode) rsnCaller;
+        assert !callerNodeIDsCopiedToCallee.contains(hrnSrcCaller.getID() );
+        oocNodeType  = hrnSrcCaller.getType();
+        oocReach     = hrnSrcCaller.getAlpha();
+        oocPredSrcID = hrnSrcCaller.getID();
+        if( hrnSrcCaller.isOutOfContext() ) {
+          outOfCalleeContext = false;
+          outOfCallerContext = true;
+        } else {
+          outOfCalleeContext = true;
+          outOfCallerContext = false;
+        }
       }
 
       ExistPred pred =
@@ -2069,131 +2069,131 @@ public class ReachGraph {
                                       );
 
       if( oocEdgeExisting == null ) {
-       // for consistency, map one out-of-context "identifier"
-       // to one heap region node id, otherwise no convergence
-       String oocid = "oocid"+
-                      fmCallee+
-                      hrnDstCallee.getIDString()+
-                      oocNodeType+
-                      reCaller.getType()+
-                      reCaller.getField();
-
-       Integer oocHrnID = oocid2hrnid.get(oocid);
-
-       HeapRegionNode hrnCalleeAndOutContext;
-
-       if( oocHrnID == null ) {
-
-         hrnCalleeAndOutContext =
-           rg.createNewHeapRegionNode(null,   // ID
-                                      false,  // single object?
-                                      false,  // new summary?
-                                      true,   // out-of-context?
-                                      oocNodeType,
-                                      null,   // alloc site, shouldn't be used
-                                      toCalleeContext(oocReach,
-                                                      preds,
-                                                      oocHrnIdOoc2callee
-                                                      ),
-                                      toCalleeContext(oocReach,
-                                                      preds,
-                                                      oocHrnIdOoc2callee
-                                                      ),
-                                      preds,
-                                      "out-of-context"
-                                      );
-
-         oocid2hrnid.put(oocid, hrnCalleeAndOutContext.getID() );
-
-       } else {
-
-         // the mapping already exists, so see if node is there
-         hrnCalleeAndOutContext = rg.id2hrn.get(oocHrnID);
-
-         if( hrnCalleeAndOutContext == null ) {
-           // nope, make it
-           hrnCalleeAndOutContext =
-             rg.createNewHeapRegionNode(oocHrnID,   // ID
-                                        false,  // single object?
-                                        false,  // new summary?
-                                        true,   // out-of-context?
-                                        oocNodeType,
-                                        null,   // alloc site, shouldn't be used
-                                        toCalleeContext(oocReach,
-                                                        preds,
-                                                        oocHrnIdOoc2callee
-                                                        ),
-                                        toCalleeContext(oocReach,
-                                                        preds,
-                                                        oocHrnIdOoc2callee
-                                                        ),
-                                        preds,
-                                        "out-of-context"
-                                        );
-
-         } else {
-           // otherwise it is there, so merge reachability
-           hrnCalleeAndOutContext.setAlpha(Canonical.unionORpreds(hrnCalleeAndOutContext.getAlpha(),
-                                                                  toCalleeContext(oocReach,
-                                                                                  preds,
-                                                                                  oocHrnIdOoc2callee
-                                                                                  )
-                                                                  )
-                                           );
-         }
-       }
-
-       assert hrnCalleeAndOutContext.reachHasOnlyOOC();
-
-       rg.addRefEdge(hrnCalleeAndOutContext,
-                     hrnDstCallee,
-                     new RefEdge(hrnCalleeAndOutContext,
-                                 hrnDstCallee,
-                                 reCaller.getType(),
-                                 reCaller.getField(),
-                                 toCalleeContext(reCaller.getBeta(),
-                                                 preds,
-                                                 oocHrnIdOoc2callee
-                                                 ),
-                                 preds,
-                                 toCalleeContext(reCaller.getTaints(),
-                                                 preds)
-                                 )
-                     );
+        // for consistency, map one out-of-context "identifier"
+        // to one heap region node id, otherwise no convergence
+        String oocid = "oocid"+
+                       fmCallee+
+                       hrnDstCallee.getIDString()+
+                       oocNodeType+
+                       reCaller.getType()+
+                       reCaller.getField();
+
+        Integer oocHrnID = oocid2hrnid.get(oocid);
+
+        HeapRegionNode hrnCalleeAndOutContext;
+
+        if( oocHrnID == null ) {
+
+          hrnCalleeAndOutContext =
+            rg.createNewHeapRegionNode(null,   // ID
+                                       false,  // single object?
+                                       false,  // new summary?
+                                       true,   // out-of-context?
+                                       oocNodeType,
+                                       null,   // alloc site, shouldn't be used
+                                       toCalleeContext(oocReach,
+                                                       preds,
+                                                       oocHrnIdOoc2callee
+                                                       ),
+                                       toCalleeContext(oocReach,
+                                                       preds,
+                                                       oocHrnIdOoc2callee
+                                                       ),
+                                       preds,
+                                       "out-of-context"
+                                       );
+
+          oocid2hrnid.put(oocid, hrnCalleeAndOutContext.getID() );
+
+        } else {
+
+          // the mapping already exists, so see if node is there
+          hrnCalleeAndOutContext = rg.id2hrn.get(oocHrnID);
+
+          if( hrnCalleeAndOutContext == null ) {
+            // nope, make it
+            hrnCalleeAndOutContext =
+              rg.createNewHeapRegionNode(oocHrnID,   // ID
+                                         false,  // single object?
+                                         false,  // new summary?
+                                         true,   // out-of-context?
+                                         oocNodeType,
+                                         null,   // alloc site, shouldn't be used
+                                         toCalleeContext(oocReach,
+                                                         preds,
+                                                         oocHrnIdOoc2callee
+                                                         ),
+                                         toCalleeContext(oocReach,
+                                                         preds,
+                                                         oocHrnIdOoc2callee
+                                                         ),
+                                         preds,
+                                         "out-of-context"
+                                         );
+
+          } else {
+            // otherwise it is there, so merge reachability
+            hrnCalleeAndOutContext.setAlpha(Canonical.unionORpreds(hrnCalleeAndOutContext.getAlpha(),
+                                                                   toCalleeContext(oocReach,
+                                                                                   preds,
+                                                                                   oocHrnIdOoc2callee
+                                                                                   )
+                                                                   )
+                                            );
+          }
+        }
+
+        assert hrnCalleeAndOutContext.reachHasOnlyOOC();
+
+        rg.addRefEdge(hrnCalleeAndOutContext,
+                      hrnDstCallee,
+                      new RefEdge(hrnCalleeAndOutContext,
+                                  hrnDstCallee,
+                                  reCaller.getType(),
+                                  reCaller.getField(),
+                                  toCalleeContext(reCaller.getBeta(),
+                                                  preds,
+                                                  oocHrnIdOoc2callee
+                                                  ),
+                                  preds,
+                                  toCalleeContext(reCaller.getTaints(),
+                                                  preds)
+        &n