From: rtrimana Date: Sat, 4 Apr 2020 04:34:28 +0000 (-0700) Subject: Fixing a bug: we need to start choiceCounter from 1 instead of 0 for subsequent execu... X-Git-Url: http://plrg.eecs.uci.edu/git/?p=jpf-core.git;a=commitdiff_plain;h=d5bff4fb65cff43b56e7a4fd7fd79b2faf7e4bdb;hp=fa86b972ca0ced9985639d19684ed1e4fc8cad56 Fixing a bug: we need to start choiceCounter from 1 instead of 0 for subsequent executions since the first CG (number 0) is the backtrack CG itself. --- diff --git a/src/main/gov/nasa/jpf/listener/DPORStateReducer.java b/src/main/gov/nasa/jpf/listener/DPORStateReducer.java index feb51c7..362da3b 100644 --- a/src/main/gov/nasa/jpf/listener/DPORStateReducer.java +++ b/src/main/gov/nasa/jpf/listener/DPORStateReducer.java @@ -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); } }