bug fix in evaluating the various classes of out-of-context predicates
authorjjenista <jjenista>
Wed, 24 Mar 2010 22:18:52 +0000 (22:18 +0000)
committerjjenista <jjenista>
Wed, 24 Mar 2010 22:18:52 +0000 (22:18 +0000)
Robust/src/Analysis/Disjoint/ExistPred.java
Robust/src/Analysis/Disjoint/ExistPredSet.java
Robust/src/Benchmarks/disjoint/makefile

index 817db240cc5c565479ab1fdf4c379fb1faedc9ef..5c9e7d4f9193a0548a61268786754e120bc15b10 100644 (file)
@@ -169,6 +169,8 @@ public class ExistPred extends Canonical {
     this.e_srcOutCalleeContext = srcOutCalleeContext;
     this.e_srcOutCallerContext = srcOutCallerContext;
 
+    assert !(e_srcOutCalleeContext && e_srcOutCallerContext);
+
     this.e_tdSrc    = tdSrc;
     this.e_hrnSrcID = hrnSrcID;
     this.e_hrnDstID = hrnDstID;
@@ -246,26 +248,27 @@ public class ExistPred extends Canonical {
 
       } else {
 
+        assert !(e_srcOutCalleeContext && e_srcOutCallerContext);
+
         if( e_srcOutCalleeContext ) {
-          assert !e_srcOutCallerContext;
           if( calleeReachableNodes.contains( e_hrnSrcID ) ) {
             return null;
           }
-        } else {
-          if( !calleeReachableNodes.contains( e_hrnSrcID ) ) {
-            return null;
-          }
-        }
 
-        if( e_srcOutCallerContext ) {
-          assert !e_srcOutCalleeContext;
+        } else if( e_srcOutCallerContext ) {
           if( !hrnSrc.isOutOfContext() ) {
             return null;
           }
+
         } else {
+
+          if( !calleeReachableNodes.contains( e_hrnSrcID ) ) {
+            return null;
+          }
           if( hrnSrc.isOutOfContext() ) {
             return null;
           }
+
         }
 
         rsn = hrnSrc;
index c026624a8a6677bb5b4ffd50da32ba9a8378fd9b..5f3757e40cfee5cd510344e6523970deb3a57557 100644 (file)
@@ -31,6 +31,8 @@ public class ExistPredSet extends Canonical {
 
   protected Set<ExistPred> preds;
 
+  public static boolean debug = false;
+
   
   public static ExistPredSet factory() {
     ExistPredSet out = new ExistPredSet();
index 8e0d62ae65213104b2a048a877f57398410e00d1..ba99f112368c461628fca5b0afd98fb3b9dded19 100644 (file)
@@ -1,13 +1,16 @@
 BUILDSCRIPT=~/research/Robust/src/buildscript
 
 #DEBUGFLAGS= -disjoint-debug-callsite MDRunner t3 100
-DEBUGFLAGS= -disjoint-debug-callsite calcGoodFeature calcGoodFeature 100
+#DEBUGFLAGS= -disjoint-debug-callsite calcGoodFeature calcGoodFeatureTask 100
+#DEBUGFLAGS= -disjoint-debug-callsite getRows calcGoodFeature 4
 
+#SNAPFLAGS= -disjoint-debug-snap-method calcGoodFeatureTask 5 10 true
+#SNAPFLAGS= -disjoint-debug-snap-method calcGoodFeature 5 1 true
 
 BSFLAGS= -recover -justanalyze -disjoint -disjoint-k 1 -disjoint-write-dots final -disjoint-alias-file aliases.txt normal -enable-assertions
 
 all:
-       $(BUILDSCRIPT) $(BSFLAGS) $(DEBUGFLAGS) *.java
+       $(BUILDSCRIPT) $(BSFLAGS) $(DEBUGFLAGS) $(SNAPFLAGS) *.java
 
 clean:
        rm -f  *.bin