When we stall for some specific SESE, make other variables that come from that SESE...
authorjjenista <jjenista>
Mon, 11 May 2009 18:04:32 +0000 (18:04 +0000)
committerjjenista <jjenista>
Mon, 11 May 2009 18:04:32 +0000 (18:04 +0000)
Robust/src/Analysis/MLP/MLPAnalysis.java

index bda09d77cf440b5e54272e18a9b9868943b5c509..7290b6edac2c3f70d57a2c519358be6a38d6482a 100644 (file)
@@ -621,8 +621,22 @@ public class MLPAnalysis {
       for( int i = 0; i < readTemps.length; i++ ) {
         TempDescriptor rTemp = readTemps[i];
         notAvailSet.remove( rTemp );
-       //// THESE VARIABLES MIGHT COME FROM SESE'S
-       //// THAT WE CAN GRAB MORE DATA FROM!
+
+       // if this variable has exactly one source, mark everything
+       // else from that source as available as well
+       VarSrcTokTable table = variableResults.get( fn );
+       Set<VariableSourceToken> srcs = table.get( rTemp );
+       if( srcs.size() == 1 ) {
+         VariableSourceToken vst = srcs.iterator().next();
+         
+         Iterator<VariableSourceToken> availItr = table.get( vst.getSESE(), 
+                                                             vst.getAge()
+                                                           ).iterator();
+         while( availItr.hasNext() ) {
+           VariableSourceToken vstAlsoAvail = availItr.next();
+           notAvailSet.removeAll( vstAlsoAvail.getRefVars() );
+         }
+       }
       }
     } break;