From d5bff4fb65cff43b56e7a4fd7fd79b2faf7e4bdb Mon Sep 17 00:00:00 2001 From: rtrimana Date: Fri, 3 Apr 2020 21:34:28 -0700 Subject: [PATCH 1/1] 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. --- src/main/gov/nasa/jpf/listener/DPORStateReducer.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); } } -- 2.34.1