changed.remove(nodeToProcess);
// Update the changed parents
+ parents.clear();
parents = parentQueueMap.get(nodeToProcess);
boolean isChanged = false;
}
// Update the parents list for the successors of the current node
- parents = new HashSet<Node>();
+ parents.clear();
parents.add(nodeToProcess);
// Checking if the out set has changed or not(Add its successors to the change list!)
HashMap<String, String> valueMap = new HashMap<String, String>(); // HashMap from varName to value
HashMap<String, Integer> writerMap = new HashMap<String, Integer>(); // HashMap from varName to appNum
+
// Update the valueMap and writerMap + check for conflict between the elements of setSet
for (int i = 0;i < setSet.size();i++) {
NameValuePair nameValuePair = setSet.get(i);
}
// Check for conflict between outSet and this transition setSet
- for (NameValuePair i : currentNode.getOutSet()) {
+ for (NameValuePair i : parentNode.getOutSet()) {
if (valueMap.containsKey(i.getVarName())) {
String value = valueMap.get(i.getVarName());
Integer writer = writerMap.get(i.getVarName());
// Update the outset of the current node and check if it is changed or not to propagate the change
boolean isChanged = updateTheOutSet(parentNode, currentNode);
-
+
// Check if the outSet of this state has changed, update all of its successors' sets if any
if (isChanged) {
for (Node node : currentNode.getSuccessors()) {