// Check if a conflict is found
if (isConflictFound(conflictExecution, conflictChoice, predecessorExecution, predecessorChoice, currRWSet)) {
createBacktrackingPoint(conflictExecution, conflictChoice, predecessorExecution, predecessorChoice);
- newConflictChoice = conflictChoice;
- newConflictExecution = conflictExecution;
+ newConflictChoice = predecessorChoice;
+ newConflictExecution = predecessorExecution;
}
// Continue performing DFS if conflict is not found
updateBacktrackSetRecursive(predecessorExecution, predecessorChoice, newConflictExecution, newConflictChoice,
public void recordTransitionSummaryAtState(int stateId, HashMap<Integer, SummaryNode> transitionSummary) {
// Record transition summary into graphSummary
- graphSummary.put(stateId, transitionSummary);
+ HashMap<Integer, SummaryNode> transSummary;
+ if (!graphSummary.containsKey(stateId)) {
+ transSummary = new HashMap<>(transitionSummary);
+ graphSummary.put(stateId, transSummary);
+ } else {
+ transSummary = graphSummary.get(stateId);
+ // Merge the two transition summaries
+ transSummary.putAll(transitionSummary);
+ }
}
}
Execution conflictExecution, int conflictChoice,
ReadWriteSet currRWSet, HashSet<TransitionEvent> visited) {
TransitionEvent currTrans = execution.getExecutionTrace().get(currentChoice);
+ if (visited.contains(currTrans)) {
+ return;
+ }
+ visited.add(currTrans);
// TODO: THIS IS THE ACCESS SUMMARY
TransitionEvent confTrans = conflictExecution.getExecutionTrace().get(conflictChoice);
// Record this transition into rGraph summary
if (currRWSet.isEmpty()) {
return;
}
- if (visited.contains(currTrans)) {
- return;
- }
- visited.add(currTrans);
// Explore all predecessors
for (Predecessor predecessor : currTrans.getPredecessors()) {
// Get the predecessor (previous conflict choice)
// Check if a conflict is found
if (isConflictFound(conflictExecution, conflictChoice, predecessorExecution, predecessorChoice, currRWSet)) {
createBacktrackingPoint(conflictExecution, conflictChoice, predecessorExecution, predecessorChoice);
- newConflictChoice = conflictChoice;
- newConflictExecution = conflictExecution;
+ newConflictChoice = predecessorChoice;
+ newConflictExecution = predecessorExecution;
}
// Continue performing DFS if conflict is not found
updateBacktrackSetRecursive(predecessorExecution, predecessorChoice, newConflictExecution, newConflictChoice,