exhaustive arity improves for benchmarks with ad=1
authorjjenista <jjenista>
Thu, 18 Sep 2008 21:18:55 +0000 (21:18 +0000)
committerjjenista <jjenista>
Thu, 18 Sep 2008 21:18:55 +0000 (21:18 +0000)
Robust/src/Analysis/OwnershipAnalysis/AllocationSite.java
Robust/src/Analysis/OwnershipAnalysis/OwnershipGraph.java
Robust/src/Analysis/OwnershipAnalysis/ReachabilitySet.java
Robust/src/Benchmarks/Ownership/makefile

index 6d7e3b5f5d050f6f130993d377bc7fe1fbd16b1a..f3da5e8040b12d8220e44a474ad33b121daaf20e 100644 (file)
@@ -41,7 +41,7 @@ public class AllocationSite {
 
 
   public AllocationSite(int allocationDepth, TypeDescriptor type) {
-    assert allocationDepth >= 2;
+    assert allocationDepth >= 1;
 
     this.allocationDepth = allocationDepth;
     this.type            = type;
index e87ce0d3e7cf119fe023efa40696d88c8dfa882d..4084da96d684c5aef44872ec04074e7621ac2122 100644 (file)
@@ -1011,7 +1011,7 @@ public class OwnershipGraph {
       Iterator<ReferenceEdge> edgeItr = argLabel_i.iteratorToReferencees();
       while( edgeItr.hasNext() ) {
        ReferenceEdge edge = edgeItr.next();
-       D_i = D_i.union(edge.getBeta() );
+       D_i = D_i.union(edge.getBeta());
       }
 
       D_i = D_i.exhaustiveArityCombinations();
index 71be34fb87af768a35f59fbee19d4d2b2455997e..3c1fa8401e14deb42e37e926c465fe6b1d8ae58c 100644 (file)
@@ -46,6 +46,11 @@ public class ReachabilitySet extends Canonical {
     return possibleReachabilities.iterator();
   }
 
+  
+  public int size() {
+    return possibleReachabilities.size();
+  }
+
 
   public boolean contains(TokenTupleSet tts) {
     assert tts != null;
@@ -256,7 +261,8 @@ public class ReachabilitySet extends Canonical {
     int numDimensions = this.possibleReachabilities.size();
 
     if( numDimensions > 10 ) {
-      System.out.println( "exhaustiveArityCombinations numDimensions = "+numDimensions );
+      System.out.println( "    exhaustiveArityCombinations numDimensions = "+numDimensions );
+      System.out.println( this );
     }
 
     // add an extra digit to detect termination
@@ -291,15 +297,15 @@ public class ReachabilitySet extends Canonical {
 
 
        if( i == 11 ) {
-         System.out.print( "x " );
+         System.out.print( "x" );
        }
 
        if( i == 15 ) {
-         System.out.print( "@ " );
+         System.out.print( "@" );
        }
 
        if( i == 17 ) {
-         System.out.print( "# " );
+         System.out.print( "#" );
        }
 
        if( digits[i] > maxArity ) {
@@ -313,6 +319,10 @@ public class ReachabilitySet extends Canonical {
       }
     }
 
+    if( numDimensions > 10 ) {
+      System.out.println( "" );
+    }
+
     return rsOut.makeCanonical();
   }
 
index 36de4131d1a15a86e5583a8f96a7fad292e23530..ef4eedfdbcddff94bb369c483a49964263941db5 100644 (file)
@@ -1,12 +1,16 @@
 BUILDSCRIPT=~/research/Robust/src/buildscript
-BSFLAGS= -recover -ownership -ownaliasfile aliases.txt -enable-assertions #-flatirtasks
+BSFLAGS= -recover -ownership -ownaliasfile aliases.txt -enable-assertions #-flatirtasks -ownwritedots final
+AD1= -ownallocdepth 1
 AD3= -ownallocdepth 3
 AD5= -ownallocdepth 5
 AD9= -ownallocdepth 9
 
-all: ad3
+all: ad1
 
 
+ad1:
+       $(BUILDSCRIPT) $(BSFLAGS) $(AD1) *.java
+
 ad3:
        $(BUILDSCRIPT) $(BSFLAGS) $(AD3) *.java