honor the easy request of suppressing output for the disjoint reach pass that is...
authorjjenista <jjenista>
Tue, 1 Feb 2011 00:54:30 +0000 (00:54 +0000)
committerjjenista <jjenista>
Tue, 1 Feb 2011 00:54:30 +0000 (00:54 +0000)
Robust/src/Analysis/Disjoint/DisjointAnalysis.java
Robust/src/Analysis/OoOJava/OoOJavaAnalysis.java

index d76cdf41786217b328047cdad5d1ed3c90934b3c..73c7a9c6fb6070a2b407b02b01c52e17ea31cd01 100644 (file)
@@ -511,6 +511,9 @@ public class DisjointAnalysis {
   static protected Hashtable<TypeDescriptor, FieldDescriptor>
     mapTypeToArrayField;
 
+
+  protected boolean suppressOutput;
+
   // for controlling DOT file output
   protected boolean writeFinalDOTs;
   protected boolean writeAllIncrementalDOTs;
@@ -652,6 +655,7 @@ public class DisjointAnalysis {
     this.arrayReferencees = arrayReferencees;
     this.sitesToFlag      = sitesToFlag;
     this.rblockRel        = rra;
+    this.suppressOutput   = suppressOutput;
 
     if( rblockRel != null ) {
       doEffectsAnalysis = true;
@@ -697,7 +701,9 @@ public class DisjointAnalysis {
     ReachGraph.debugCallSiteVisitCounter 
       = 0; // count visits from 1, is incremented before first visit
     
-    
+    if( suppressOutput ) {
+      System.out.println( "* Running disjoint reachability analysis with output suppressed! *" );
+    }
 
     allocateStructures();
 
@@ -784,7 +790,9 @@ public class DisjointAnalysis {
     // reachable from the roots that will be analyzed
     
     if( state.TASK ) {
-      System.out.println( "Bamboo mode..." );
+      if( !suppressOutput ) {
+        System.out.println( "Bamboo mode..." );
+      }
       
       Iterator taskItr = state.getTaskSymbolTable().getDescriptorsIterator();      
       while( taskItr.hasNext() ) {
@@ -798,7 +806,9 @@ public class DisjointAnalysis {
       }
       
     } else {
-      System.out.println( "Java mode..." );
+      if( !suppressOutput ) {
+        System.out.println( "Java mode..." );
+      }
 
       // add all methods transitively reachable from the
       // source's main to set for analysis
@@ -887,7 +897,9 @@ public class DisjointAnalysis {
       // If there is a change detected, add any methods/tasks
       // that depend on this one to the "to visit" set.
 
-      System.out.println( "Analyzing " + d );
+      if( !suppressOutput ) {
+        System.out.println( "Analyzing " + d );
+      }
 
       if( state.DISJOINTDVISITSTACKEESONTOP ) {
         assert calleesToEnqueue.isEmpty();
index 50e66a72f9416bca7596a738412add2b093a41b4..b498e71922ab8042618cd4e09534e2964827f28d 100644 (file)
@@ -157,7 +157,6 @@ public class OoOJavaAnalysis {
       livenessAnalysisBackward(fm);
     }
 
-    /*
     // 5th pass, use disjointness with NO FLAGGED REGIONS
     // to compute taints and effects
     disjointAnalysisTaints =
@@ -165,6 +164,7 @@ public class OoOJavaAnalysis {
                              rblockRel,
                              true ); // suppress output--this is an intermediate pass
 
+    /*
     // 6th pass, not available analysis FOR VARIABLES!
     methItr = descriptorsToAnalyze.iterator();
     while (methItr.hasNext()) {