From f37ee3c73860ae39bb8e086652c65ae0648342b1 Mon Sep 17 00:00:00 2001 From: jjenista Date: Mon, 11 May 2009 18:04:32 +0000 Subject: [PATCH] When we stall for some specific SESE, make other variables that come from that SESE available as well --- Robust/src/Analysis/MLP/MLPAnalysis.java | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) 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; -- 2.34.1