HashSet<TransitionEvent> reachableTransitions = new HashSet<>();
// All transitions from states higher than the given state ID (until the highest state ID) are reachable
for(int stId = stateId; stId <= hiStateId; stId++) {
- reachableTransitions.addAll(graph.get(stId));
+ // We might encounter state IDs from the first round of Boolean CG
+ // The second round of Boolean CG should consider these new states
+ if (graph.containsKey(stId)) {
+ reachableTransitions.addAll(graph.get(stId));
+ }
}
return reachableTransitions;
}
}
currentExecution.mapCGToChoice(icsCG, choiceCounter);
// Store restorable state object for this state (always store the latest)
- RestorableVMState restorableState = vm.getRestorableState();
- restorableStateMap.put(stateId, restorableState);
+ if (!restorableStateMap.containsKey(stateId)) {
+ RestorableVMState restorableState = vm.getRestorableState();
+ restorableStateMap.put(stateId, restorableState);
+ }
}
private TransitionEvent setupTransition(IntChoiceFromSet icsCG, int stateId, int choiceIndex) {
pushedExecution, pushedChoice, currRWSet, visited);
}
// Remove the transition after being explored
- visited.remove(confTrans);
+ // TODO: Seems to cause a lot of loops---commented out for now
+ //visited.remove(confTrans);
}
// --- Functions related to the reachability analysis when there is a state match