ArrayList<NameValuePair> setSet = parentNode.getOutgoingEdges().get(currentNode).getSetSetMap().get(currentTransition);
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
- HashMap<String, Boolean> isManualMap = new HashMap<String, Boolean>(); // HashMap from varName to isManual
+ HashMap<String, String> firstValueMap = new HashMap<String, String>(); // HashMap from varName to value - first instruction in transition
+ HashMap<String, Integer> firstWriterMap = new HashMap<String, Integer>(); // HashMap from varName to appNum - first instruction in transition
+
// Update the valueMap and writerMap + check for conflict between the elements of setSet
for (int i = 0;i < setSet.size();i++) {
}
valueMap.put(varName, value);
writerMap.put(varName, appNum);
- isManualMap.put(varName, isManual);
} else {
valueMap.put(varName, value);
writerMap.put(varName, appNum);
- isManualMap.put(varName, isManual);
+ if (!isManual) {
+ firstValueMap.put(varName, value);
+ firstWriterMap.put(varName, appNum);
+ }
}
}
// Check for conflict between outSet and this transition setSet
for (NameValuePair i : parentNode.getOutSet()) {
if (valueMap.containsKey(i.getVarName())) {
- String value = valueMap.get(i.getVarName());
- Integer writer = writerMap.get(i.getVarName());
+ String value = firstValueMap.get(i.getVarName());
+ Integer writer = firstWriterMap.get(i.getVarName());
if ((value != null)&&(writer != null)) {
- if (!value.equals(i.getValue())&&!writer.equals(i.getAppNum())
- &&!isManualMap.get(i.getVarName())) {
+ if (!value.equals(i.getValue())&&!writer.equals(i.getAppNum())) {
// We have different values and different writers
errorMessage = createErrorMessage(i, valueMap, writerMap);
return true;