- // Update the changed parents
- parents.clear();
- parents = parentQueueMap.get(nodeToProcess);
- boolean isChanged = false;
-
- for (Node node : parents) {
- // Update the edge
- isChanged |= updateTheOutSet(node, nodeToProcess);
- }
-
- // All the changes in current parents are propagated
- parentQueueMap.get(nodeToProcess).clear();
-
- // Check if the node has changed or not
- if (isChanged) {
- // Check for a conflict in all the transition out of this node
- if (checkAllSuccForConflict(nodeToProcess))
- return true;
-
- // Update the parents list for the successors of the current node
- parents.clear();
- parents.add(nodeToProcess);
-
- // For all the successors of the current node
- for (Node i : nodeToProcess.getSuccessors()) {
- if (!changed.contains(i))
- changed.add(i);
-
- // Update the list of updated parents for the current node
- if (parentQueueMap.containsKey(i))
- parentQueueMap.get(i).add(nodeToProcess);
- else
- parentQueueMap.put(i, parents);
- }
+ // Update all the successors of the node
+ for (Node node : nodeToProcess.getSuccessors()) {
+ isChanged = false;
+ isChanged = updateTheOutSet(nodeToProcess, node);
+ if (isChanged) {
+ changed.add(node);
+ if (checkAllSuccForConflict(node))
+ return true;
+ }