Fixing a bug: we need to start choiceCounter from 1 instead of 0 for subsequent execu...
authorrtrimana <rtrimana@uci.edu>
Sat, 4 Apr 2020 04:34:28 +0000 (21:34 -0700)
committerrtrimana <rtrimana@uci.edu>
Sat, 4 Apr 2020 04:34:28 +0000 (21:34 -0700)
src/main/gov/nasa/jpf/listener/DPORStateReducer.java

index feb51c7..362da3b 100644 (file)
@@ -699,7 +699,7 @@ public class DPORStateReducer extends ListenerAdapter {
   private void resetStatesForNewExecution(IntChoiceFromSet icsCG) {
     if (choices == null || choices != icsCG.getAllChoices()) {
       // Reset state variables
-      choiceCounter = 0;
+      choiceCounter = 1;
       choices = icsCG.getAllChoices();
       refChoices = copyChoices(choices);
       // Clearing data structures
@@ -708,6 +708,8 @@ public class DPORStateReducer extends ListenerAdapter {
       readWriteFieldsMap.clear();
       stateToEventMap.clear();
       isEndOfExecution = false;
+                       // Adding this CG as the first CG for this execution
+                       cgList.add(icsCG);
     }
   }