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 feb51c7dce811ee418eddc5751c5f1c00eb89a38..362da3b247b00d42aa2d43ad10f155a8103edf87 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
   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
       choices = icsCG.getAllChoices();
       refChoices = copyChoices(choices);
       // Clearing data structures
@@ -708,6 +708,8 @@ public class DPORStateReducer extends ListenerAdapter {
       readWriteFieldsMap.clear();
       stateToEventMap.clear();
       isEndOfExecution = false;
       readWriteFieldsMap.clear();
       stateToEventMap.clear();
       isEndOfExecution = false;
+                       // Adding this CG as the first CG for this execution
+                       cgList.add(icsCG);
     }
   }
 
     }
   }