// Store restorable state object for this state (always store the latest)
RestorableVMState restorableState = vm.getRestorableState();
restorableStateMap.put(stateId, restorableState);
- // Map multiple state IDs to a choice counter
- for (Integer stId : justVisitedStates) {
- stateToChoiceCounterMap.put(stId, choiceCounter);
- }
}
private Integer[] copyChoices(Integer[] choicesToCopy) {
HashSet<Integer> eventSet = new HashSet<>();
stateToEventMap.put(stateId, eventSet);
}
+ stateToChoiceCounterMap.put(stateId, choiceCounter);
analyzeReachabilityAndCreateBacktrackPoints(search.getVM(), stateId);
justVisitedStates.add(stateId);
currVisitedStates.add(stateId);
if (currentCG instanceof IntIntervalGenerator) {
// This is the interval CG used in device handlers
ChoiceGenerator<?> parentCG = ((IntIntervalGenerator) currentCG).getPreviousChoiceGenerator();
+ // Iterate until we find the IntChoiceFromSet CG
+ while (!(parentCG instanceof IntChoiceFromSet)) {
+ parentCG = ((IntIntervalGenerator) parentCG).getPreviousChoiceGenerator();
+ }
int actualEvtNum = ((IntChoiceFromSet) parentCG).getNextChoice();
// Find the index of the event/choice in refChoices
for (int i = 0; i<refChoices.length; i++) {
if (!vm.isNewState() && !isEndOfExecution && choiceCounter > 1 &&
currVisitedStates.contains(stateId) && (stateId > 0)) {
// Find the choice/event that marks the start of this cycle: first choice we explore for conflicts
+ if (stateToChoiceCounterMap.get(stateId) == null) {
+ System.out.println();
+ }
int conflictChoice = stateToChoiceCounterMap.get(stateId);
int currentChoice = choiceCounter - 1;
// Find conflicts between choices/events in this cycle (we scan forward in the cycle, not backward)