Minor changes to input arguments of some methods/functions.
authorrtrimana <rtrimana@uci.edu>
Fri, 18 Sep 2020 18:24:47 +0000 (11:24 -0700)
committerrtrimana <rtrimana@uci.edu>
Fri, 18 Sep 2020 18:24:47 +0000 (11:24 -0700)
src/main/gov/nasa/jpf/listener/DPORStateReducerEfficient.java

index aa54e5e..1f5408d 100644 (file)
@@ -373,7 +373,7 @@ public class DPORStateReducerEfficient extends ListenerAdapter {
     private int choice;           // Predecessor choice
     private Execution execution;  // Predecessor execution
 
-    public Predecessor(int predChoice, Execution predExec) {
+    public Predecessor(Execution predExec, int predChoice) {
       choice = predChoice;
       execution = predExec;
     }
@@ -675,7 +675,7 @@ public class DPORStateReducerEfficient extends ListenerAdapter {
 
     public void recordPredecessor(Execution execution, int choice) {
       if (!isRecordedPredecessor(execution, choice)) {
-        predecessors.add(new Predecessor(choice, execution));
+        predecessors.add(new Predecessor(execution, choice));
       }
     }
 
@@ -1248,15 +1248,15 @@ public class DPORStateReducerEfficient extends ListenerAdapter {
   private void updateBacktrackSetRecursive(Execution execution, int currentChoice,
                                            Execution conflictExecution, int conflictChoice,
                                            ReadWriteSet currRWSet, HashSet<TransitionEvent> visited) {
+    TransitionEvent currTrans = execution.getExecutionTrace().get(currentChoice);
     // TODO: THIS IS THE ACCESS SUMMARY
     TransitionEvent confTrans = conflictExecution.getExecutionTrace().get(conflictChoice);
     // Record this transition into rGraph summary
-    currRWSet = rGraph.recordTransitionSummary(confTrans.getStateId(), confTrans, currRWSet);
+    currRWSet = rGraph.recordTransitionSummary(currTrans.getStateId(), confTrans, currRWSet);
     // Halt when we have found the first read/write conflicts for all memory locations
     if (currRWSet.isEmpty()) {
       return;
     }
-    TransitionEvent currTrans = execution.getExecutionTrace().get(currentChoice);
     if (visited.contains(currTrans)) {
       return;
     }