From: jjenista Date: Mon, 11 May 2009 18:04:32 +0000 (+0000) Subject: When we stall for some specific SESE, make other variables that come from that SESE... X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=f37ee3c73860ae39bb8e086652c65ae0648342b1;p=IRC.git When we stall for some specific SESE, make other variables that come from that SESE available as well --- diff --git a/Robust/src/Analysis/MLP/MLPAnalysis.java b/Robust/src/Analysis/MLP/MLPAnalysis.java index bda09d77..7290b6ed 100644 --- a/Robust/src/Analysis/MLP/MLPAnalysis.java +++ b/Robust/src/Analysis/MLP/MLPAnalysis.java @@ -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 srcs = table.get( rTemp ); + if( srcs.size() == 1 ) { + VariableSourceToken vst = srcs.iterator().next(); + + Iterator availItr = table.get( vst.getSESE(), + vst.getAge() + ).iterator(); + while( availItr.hasNext() ) { + VariableSourceToken vstAlsoAvail = availItr.next(); + notAvailSet.removeAll( vstAlsoAvail.getRefVars() ); + } + } } } break;