Bug fix: in some cases we really do want the heap region inherent reach set to have...
authorjjenista <jjenista>
Fri, 10 Jun 2011 18:26:28 +0000 (18:26 +0000)
committerjjenista <jjenista>
Fri, 10 Jun 2011 18:26:28 +0000 (18:26 +0000)
Robust/src/Analysis/Disjoint/DisjointAnalysis.java
Robust/src/Analysis/Disjoint/HeapRegionNode.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/Benchmarks/oooJava/master-makefile

index 1e7b1b918a62a6e0f0219848bd0895d5909a73bc..a47426d8cf5c0deab1f3de7870ebdb2b12477435 100644 (file)
@@ -1314,9 +1314,9 @@ public class DisjointAnalysis implements HeapAnalysis {
 
       rg.writeGraph("genReach"+fgrn.getGraphName(),
                     true,     // write labels (variables)
-                    false, //true,    // selectively hide intermediate temp vars
+                    true,    // selectively hide intermediate temp vars
                     true,     // prune unreachable heap regions
-                    true,    // hide reachability altogether
+                    false,    // hide reachability altogether
                     true,    // hide subset reachability states
                     true,     // hide predicates
                     true); //false);    // hide edge taints
@@ -1856,6 +1856,7 @@ public class DisjointAnalysis implements HeapAnalysis {
     fn2rgAtExit.put(fn, rgOnExit);
 
 
+
     // at this point rg should be the correct update
     // by an above transfer function, or untouched if
     // the flat node type doesn't affect the heap
@@ -3027,7 +3028,7 @@ public class DisjointAnalysis implements HeapAnalysis {
                     true,    // prune unreachable heap regions
                     false,   // hide reachability
                     false,   // hide subset reachability states
-                    true,    // hide predicates
+                    false,    // hide predicates
                     true);   // hide edge taints
     }
   }
index ed7e101f577551fbc69fdcc195549ad005410467..c38617c9aae80ec88756e9146028894b61e55a73 100644 (file)
@@ -319,7 +319,7 @@ public class HeapRegionNode extends RefSrcNode {
       description;
 
     if( !hideReach ) {
-      s += "\\n"+alpha.toStringEscNewline(hideSubsetReach);
+      s += "\\n"+alpha.toStringEscNewline(hideSubsetReach, hidePreds);
     }
 
     if( !hidePreds ) {
index 7cab6054a7d50dae4271ddf33e44c2b5a68c5998..b397af059f50d6def646f02a40de1d2022e79e92 100644 (file)
@@ -871,8 +871,8 @@ public class ReachGraph {
 
     // after tokens have been aged, reset newest node's reachability
     // and a brand new node has a "true" predicate
-    hrn0.setAlpha(hrn0.getInherent() );
-    hrn0.setPreds(predsTrue);
+    hrn0.setAlpha( Canonical.changePredsTo( hrn0.getInherent(), predsTrue ) );
+    hrn0.setPreds( predsTrue);
   }
 
 
@@ -2260,8 +2260,8 @@ public class ReachGraph {
   private static boolean resolveMethodDebugDOTwriteLabels     = true;
   private static boolean resolveMethodDebugDOTselectTemps     = true;
   private static boolean resolveMethodDebugDOTpruneGarbage    = true;
-  private static boolean resolveMethodDebugDOThideReach       = true;
-  private static boolean resolveMethodDebugDOThideSubsetReach = true;
+  private static boolean resolveMethodDebugDOThideReach       = false;
+  private static boolean resolveMethodDebugDOThideSubsetReach = false;
   private static boolean resolveMethodDebugDOThidePreds       = false;
   private static boolean resolveMethodDebugDOThideEdgeTaints  = true;
 
@@ -2370,6 +2370,8 @@ public class ReachGraph {
         continue;
       }
 
+
+
       // since the node is coming over, find out which reach
       // states on it should come over, too
       assert calleeNode2calleeStatesSatisfied.get(hrnCallee) == null;
index d821e96cb04c00bca8af410a1194827d11971f9a..851eeeccce759c891b8768ea57320d0891a82e32 100644 (file)
@@ -179,7 +179,8 @@ public class ReachSet extends Canonical {
   }
 
 
-  public String toStringEscNewline(boolean hideSubsetReachability) {
+  public String toStringEscNewline(boolean hideSubsetReachability,
+                                   boolean hidePreds) {
     String s = "[";
 
     Iterator<ReachState> i = this.iterator();
@@ -192,7 +193,12 @@ public class ReachSet extends Canonical {
         continue;
       }
 
-      s += state;
+      // jjenista - Use this version if you REALLY want to
+      // the see the preds for heap region nodes, edges,
+      // AND every reach state on all those elements!
+      //s += state.toString( hidePreds );
+      s += state.toString();
+
       if( i.hasNext() ) {
         s += "\\n";
       }
@@ -242,4 +248,14 @@ public class ReachSet extends Canonical {
     s += "]";
     return s;
   }
+
+  public String toStringPreds() {
+    String s = "[\n";
+    
+    for( ReachState state: reachStates ) {
+      s += "  "+state.toStringPreds()+"\n";
+    }
+
+    return s+"]";
+  }
 }
index 1ea87ea7fd852a17ea4d754f2aaed307a98c2e64..3a3cdc5cbbe8c2b9a18ef8b3f530cda4aafc60af 100644 (file)
@@ -159,4 +159,11 @@ public class ReachState extends Canonical {
   public String toStringPreds() {
     return reachTuples+":"+preds;
   }
+
+  public String toString( boolean hidePreds ) {
+    if( hidePreds ) {
+      return toString();
+    }
+    return toStringPreds();
+  }
 }
index 8c8c6852ac866e9b0ea95317b71c2ff5ad51d222..9dc4faa60ecf8cd10a7e2f8e913b79be5504e7ec 100644 (file)
@@ -266,7 +266,7 @@ public class RefEdge {
       type.toPrettyString()+"\\n"+
       field;
     if( !hideReach ) {
-      s += "\\n"+beta.toStringEscNewline(hideSubsetReach);
+      s += "\\n"+beta.toStringEscNewline(hideSubsetReach, hidePreds);
     }
 
     if( !hidePreds ) {
index 6d4be320ba474e5c41d54ccefa304ca216ec4662..014d367c280a33c884d718abb50868964e6370ee 100644 (file)
@@ -76,13 +76,13 @@ DISJOINT= -disjoint -disjoint-k 1 -enable-assertions $(DRELEASEMODE) #-disjoint-
 # EX: (skip first 10 visits, capture the next 3, then halt)
 # -disjoint-debug-snap-method Remove 10 3 true
 
-DISJOINTDEBUG= -disjoint -disjoint-k 1 -enable-assertions
-#      -disjoint-debug-callsite RayTracer.trace RayTracer.shade 10000 1 true
+DISJOINTDEBUG= -disjoint -disjoint-k 1 -enable-assertions $(DRELEASEMODE)
+#      -disjoint-debug-snap-method ArrayIndexedGraph.createNode 1 100 true \
+#      -disjoint-debug-callsite ArrayIndexedGraph.createNode Barneshut.run 1 100 true
 #      -disjoint-write-dots final \
 #      -flatirusermethods \
 #      -disjoint-write-ihms \
 #      -disjoint-write-initial-contexts \
-#      -disjoint-debug-snap-method RayTracer.shade 300 999 true
 #      -disjoint-debug-snap-method String.indexOf 1 1000 true
 #      -disjoint-debug-callsite String.concat2 FileInputStream.readLine 1 1000 true \
 #      -disjoint-debug-snap-method String.concat2 1 1000 true
@@ -132,7 +132,7 @@ $(PROGRAM)p.bin: $(SOURCE_FILES) ../master-makefile
        $(BUILDSCRIPT) $(BMFLAGS) $(BSFLAGS) $(USECOREPROF) $(USEOOO) $(DISJOINT) -o $(PROGRAM)p -builddir par  $(SOURCE_FILES) 
 
 ooo-debug: $(SOURCE_FILES) ../master-makefile
-       $(BUILDSCRIPT) $(BMFLAGS) $(BSFLAGS) $(USECOREPROF) $(USEOOO) $(OOODEBUG) $(DISJOINT) -o $(PROGRAM)p -builddir par  $(SOURCE_FILES) 
+       $(BUILDSCRIPT) $(BMFLAGS) $(BSFLAGS) $(USECOREPROF) $(USEOOO) $(OOODEBUG) $(DISJOINTDEBUG) -o $(PROGRAM)p -builddir par  $(SOURCE_FILES) 
 
 
 disjoint-debug: $(SOURCE_FILES) ../master-makefile