edge type improvement bug fixes, have to deal with null, runs on all available benchmarks
authorjjenista <jjenista>
Thu, 5 Nov 2009 21:31:47 +0000 (21:31 +0000)
committerjjenista <jjenista>
Thu, 5 Nov 2009 21:31:47 +0000 (21:31 +0000)
Robust/src/Analysis/OwnershipAnalysis/OwnershipGraph.java
Robust/src/Benchmarks/mlp/directto/mlp-java/makefile

index 6bf0fb841de1fb3ca7ee21c066b185726e0d85ae..9da346f74be51d03b5f817ee2bc5423e98822e5f 100644 (file)
@@ -3116,6 +3116,16 @@ public class OwnershipGraph {
            continue;
          }
 
+         if( !isSuperiorType( returnTemp.getType(), hrnChildCallee.getType() ) ) {
+           // prune       
+           continue;
+         }
+
+         if( !isSuperiorType( edgeCallee.getType(), hrnCaller.getType() ) ) {
+           // prune
+           continue;
+         }
+         
          TypeDescriptor tdNewEdge =
            mostSpecificType( edgeCallee.getType(),
                              hrnChildCallee.getType(),
@@ -5009,6 +5019,12 @@ public class OwnershipGraph {
     if( td2 == null ) {
       return td1;
     }
+    if( td1.isNull() ) {
+      return td2;
+    }
+    if( td2.isNull() ) {
+      return td1;
+    }
     return typeUtil.mostSpecific( td1, td2 );
   }
   
@@ -5038,7 +5054,12 @@ public class OwnershipGraph {
        possibleChild == null ) {
       return true;
     }
-    
+
+    if( possibleSuper.isNull() ||
+       possibleChild.isNull() ) {
+      return true;
+    }
+
     return typeUtil.isSuperorType( possibleSuper, possibleChild );
   }
 
index 6892efc2e0b637206f7c77b469f5b9b028770eeb..fdae38b2b4d1ec691d653672bfffee7e645b31ba 100644 (file)
@@ -1,10 +1,26 @@
-MAIN_CLASS=D2 #smalltest
+MAIN_CLASS=D2
 
 PROGRAM=test
-SOURCE_FILES=D2.java #smalltest.java
+SOURCE_FILES=D2.java
 
 BUILDSCRIPT=~/research/Robust/src/buildscript
-BSFLAGS= -debug -nooptimize -mainclass $(MAIN_CLASS) -justanalyze -ownership -ownallocdepth 1 -ownwritedots final -ownaliasfile aliases.txt -enable-assertions
+BSFLAGS= -debug -mainclass $(MAIN_CLASS) -joptimize -flatirusermethods #-flatirlibmethods
+
+#DBCALLFLAGS= -owndebugcaller main -owndebugcallee executeAll 
+#DBCALLFLAGS= -owndebugcaller executeAll -owndebugcallee executeMessage -owndebugcallcount 0
+#DBCALLFLAGS= -owndebugcaller executeAll -owndebugcallee next -owndebugcallcount 0
+#DBCALLFLAGS= -owndebugcaller executeAll -owndebugcallee hasNext -owndebugcallcount 0
+#DBCALLFLAGS= -owndebugcaller executeAll -owndebugcallee size -owndebugcallcount 0
+#DBCALLFLAGS= -owndebugcaller executeMessage -owndebugcallee getFlightList -owndebugcallcount 0
+#DBCALLFLAGS= -owndebugcaller executeMessage -owndebugcallee amendFlightPlan -owndebugcallcount 0
+#DBCALLFLAGS= -owndebugcaller amendFlightPlan -owndebugcallee getFlight -owndebugcallcount 0
+#DBCALLFLAGS= -owndebugcaller amendFlightPlan -owndebugcallee addFix -owndebugcallcount 0
+#DBCALLFLAGS= -owndebugcaller addFix -owndebugcallee addFix -owndebugcallcount 0
+#DBCALLFLAGS= -owndebugcaller addFix -owndebugcallee insertElementAt -owndebugcallcount 0
+#DBCALLFLAGS= -owndebugcaller insertElementAt -owndebugcallee ensureCapacity -owndebugcallcount 0
+#DBCALLFLAGS= -owndebugcaller anyPlanesAlive -owndebugcallee elementAt
+
+ANALYZEFLAGS= -justanalyze $(DBCALLFLAGS) -ownership -ownallocdepth 1 -ownwritedots final -ownaliasfile aliases.txt -enable-assertions
 
 all: $(PROGRAM).bin
 
@@ -19,6 +35,9 @@ DOTs: $(PROGRAM).bin
 $(PROGRAM).bin: $(SOURCE_FILES)
        $(BUILDSCRIPT) $(BSFLAGS) -o $(PROGRAM) $(SOURCE_FILES)
 
+analyze: $(SOURCE_FILES)
+       $(BUILDSCRIPT) $(BSFLAGS) $(ANALYZEFLAGS) -o $(PROGRAM) $(SOURCE_FILES)
+
 clean:
        rm -f  $(PROGRAM).bin
        rm -fr tmpbuilddirectory