A change in propagate the change method
authorSeyed Amir Hossein Aqajari <saqajari@circinus-48.ics.uci.edu>
Fri, 6 Dec 2019 22:46:04 +0000 (14:46 -0800)
committerSeyed Amir Hossein Aqajari <saqajari@circinus-48.ics.uci.edu>
Fri, 6 Dec 2019 22:46:04 +0000 (14:46 -0800)
src/main/gov/nasa/jpf/listener/ConflictTracker.java

index 1cd281dcd3823f1b25c9383d9b6219067ae82987..8c1e2afd5715035880b48bc52a2a1f5efe80313c 100644 (file)
@@ -112,11 +112,12 @@ public class ConflictTracker extends ListenerAdapter {
        isChanged |= updateTheOutSet(node, nodeToProcess);
       }
 
        isChanged |= updateTheOutSet(node, nodeToProcess);
       }
 
-      // All the changes in parents are propagated
+      // All the changes in current parents are propagated
       parentQueueMap.get(nodeToProcess).clear();
 
       parentQueueMap.get(nodeToProcess).clear();
 
-      // Check for a conflict if the outSet of nodeToProcess is changed
+      // Check if the node has changed or not
       if (isChanged) {
       if (isChanged) {
+       // Check for a conflict in all the transition out of this node
         for (Node node : nodeToProcess.getSuccessors()) {
          HashMap<Transition, ArrayList<NameValuePair>> setSets = nodeToProcess.getOutgoingEdges().get(node).getSetSetMap();
          for (Map.Entry mapElement : setSets.entrySet()) {
         for (Node node : nodeToProcess.getSuccessors()) {
          HashMap<Transition, ArrayList<NameValuePair>> setSets = nodeToProcess.getOutgoingEdges().get(node).getSetSetMap();
          for (Map.Entry mapElement : setSets.entrySet()) {
@@ -125,23 +126,21 @@ public class ConflictTracker extends ListenerAdapter {
              return true;
          }
         }
              return true;
          }
         }
-      }
-
-      // Update the parents list for the successors of the current node
-      parents.clear();
-      parents.add(nodeToProcess);
+       
+       // Update the parents list for the successors of the current node
+       parents.clear();
+       parents.add(nodeToProcess);
 
 
-      // Checking if the out set has changed or not(Add its successors to the change list!)
-      if (isChanged) {
-        for (Node i : nodeToProcess.getSuccessors()) {
+       // For all the successors of the current node
+       for (Node i : nodeToProcess.getSuccessors()) {
           if (!changed.contains(i))
             changed.add(i);
 
           if (!changed.contains(i))
             changed.add(i);
 
-         // Update the list of updated parents for the current node
-         if (parentQueueMap.containsKey(i))
+          // Update the list of updated parents for the current node
+          if (parentQueueMap.containsKey(i))
             parentQueueMap.get(i).add(nodeToProcess);
             parentQueueMap.get(i).add(nodeToProcess);
-         else
-           parentQueueMap.put(i, parents);
+          else
+            parentQueueMap.put(i, parents);
         }
       }
     }
         }
       }
     }