From 493f71c489e973d428b31dc7902a568217a364a9 Mon Sep 17 00:00:00 2001 From: yeom Date: Tue, 20 Sep 2011 23:13:09 +0000 Subject: [PATCH] bug fix on the Loop terminate analysis: as long as a field is not appeared in a flat set field node, it is suitable for the guard condition variable --- Robust/src/Analysis/Loops/LoopTerminate.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Robust/src/Analysis/Loops/LoopTerminate.java b/Robust/src/Analysis/Loops/LoopTerminate.java index 6344ecec..004e4712 100644 --- a/Robust/src/Analysis/Loops/LoopTerminate.java +++ b/Robust/src/Analysis/Loops/LoopTerminate.java @@ -138,7 +138,6 @@ public class LoopTerminate { tovisit.add(loopEntrance); int numMustTerminateGuardCondtion = 0; - int numLoop = 0; while (!tovisit.isEmpty()) { FlatNode fnvisit = tovisit.iterator().next(); tovisit.remove(fnvisit); @@ -456,7 +455,7 @@ public class LoopTerminate { private boolean hasFieldAccessInLoopElements(FlatFieldNode guardNode, Set loopElements) { for (Iterator iterator = loopElements.iterator(); iterator.hasNext();) { FlatNode fn = (FlatNode) iterator.next(); - if (fn.kind() == FKind.FlatFieldNode) { + if (fn.kind() == FKind.FlatSetFieldNode) { FlatFieldNode ffn = (FlatFieldNode) fn; if (!ffn.equals(guardNode) && ffn.getField().equals(guardNode.getField())) { return true; -- 2.34.1