From f3d51ec7dc305c16edf5094886d71daf5b0a7295 Mon Sep 17 00:00:00 2001 From: rtrimana Date: Tue, 15 Dec 2020 09:49:27 -0800 Subject: [PATCH] More cleanups for comments and variable names. --- .../jpf/listener/DPORStateReducerWithSummary.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/gov/nasa/jpf/listener/DPORStateReducerWithSummary.java b/src/main/gov/nasa/jpf/listener/DPORStateReducerWithSummary.java index 1de1820..2f84c95 100755 --- a/src/main/gov/nasa/jpf/listener/DPORStateReducerWithSummary.java +++ b/src/main/gov/nasa/jpf/listener/DPORStateReducerWithSummary.java @@ -635,9 +635,9 @@ public class DPORStateReducerWithSummary extends ListenerAdapter { return stateSummary.keySet(); } - public ReadWriteSet getRWSetForEventChoiceAtState(int choice, int stateId) { + public ReadWriteSet getRWSetForEventChoiceAtState(int eventChoice, int stateId) { HashMap stateSummary = mainSummary.get(stateId); - return stateSummary.get(choice); + return stateSummary.get(eventChoice); } private ReadWriteSet performUnion(ReadWriteSet recordedRWSet, ReadWriteSet rwSet) { @@ -986,7 +986,7 @@ public class DPORStateReducerWithSummary extends ListenerAdapter { // E.g. if we have a conflict between 1 and 3, then we create the list {3, 1, 0, 2} // for the original set {0, 1, 2, 3} - // eventChoice represent the event/transaction that will be put into the backtracking set of + // eventChoice represents the event/transaction that will be put into the backtracking set of // conflictExecution/conflictChoice Integer[] newChoiceList = new Integer[refChoices.length]; ArrayList conflictTrace = conflictExecution.getExecutionTrace(); @@ -1267,14 +1267,14 @@ public class DPORStateReducerWithSummary extends ListenerAdapter { // Update the backtrack sets from previous executions private void updateBacktrackSetsFromGraph(int stateId, Execution currExecution, int currChoice) { // Get events/choices at this state ID - Set eventsAtStateId = mainSummary.getEventChoicesAtStateId(stateId); - for (Integer event : eventsAtStateId) { + Set eventChoicesAtStateId = mainSummary.getEventChoicesAtStateId(stateId); + for (Integer eventChoice : eventChoicesAtStateId) { // Get the ReadWriteSet object for this event at state ID - ReadWriteSet rwSet = mainSummary.getRWSetForEventChoiceAtState(event, stateId); + ReadWriteSet rwSet = mainSummary.getRWSetForEventChoiceAtState(eventChoice, stateId); // Memorize visited TransitionEvent object while performing backward DFS to avoid getting caught up in a cycle HashSet visited = new HashSet<>(); // Update the backtrack sets recursively - updateBacktrackSetDFS(currExecution, currChoice, event, rwSet, visited); + updateBacktrackSetDFS(currExecution, currChoice, eventChoice, rwSet, visited); } } } -- 2.34.1