From f0203f55c76ef319f41c77ee9c40539d1f292787 Mon Sep 17 00:00:00 2001 From: bdemsky Date: Sat, 26 Mar 2011 20:45:29 +0000 Subject: [PATCH] bug fix --- Robust/src/Analysis/Disjoint/ProcessStateMachines.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Robust/src/Analysis/Disjoint/ProcessStateMachines.java b/Robust/src/Analysis/Disjoint/ProcessStateMachines.java index 718c60df..816c6e02 100644 --- a/Robust/src/Analysis/Disjoint/ProcessStateMachines.java +++ b/Robust/src/Analysis/Disjoint/ProcessStateMachines.java @@ -35,6 +35,7 @@ public class ProcessStateMachines { private void merge(StateMachineForEffects sm) { HashMap>> backMap=buildBackMap(sm); boolean mergeAgain=false; + HashSet removedStates=new HashSet(); do { mergeAgain=false; HashMap, Set> revMap=buildReverse(backMap); @@ -42,6 +43,8 @@ public class ProcessStateMachines { if (entry.getValue().size()>1) { SMFEState first=null; for(SMFEState state:entry.getValue()) { + if (removedStates.contains(state)) + continue; if (first==null) { first=state; } else { @@ -53,6 +56,7 @@ public class ProcessStateMachines { first=sm.initialState; } mergeTwoStates(first, state, backMap); + removedStates.add(state); sm.fn2state.remove(state.whereDefined); } } -- 2.34.1