From 5d82680d6439a6189d08bdb42ce789abb7e403b8 Mon Sep 17 00:00:00 2001 From: bdemsky Date: Wed, 1 Jun 2005 05:07:52 +0000 Subject: [PATCH] Fixed transitive closure computation. --- Repair/RepairCompiler/MCC/IR/GraphAnalysis.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Repair/RepairCompiler/MCC/IR/GraphAnalysis.java b/Repair/RepairCompiler/MCC/IR/GraphAnalysis.java index 878f939..270af78 100755 --- a/Repair/RepairCompiler/MCC/IR/GraphAnalysis.java +++ b/Repair/RepairCompiler/MCC/IR/GraphAnalysis.java @@ -53,8 +53,7 @@ public class GraphAnalysis { /** Check for cycles if the graphnode can't * be removed (we know we aren't introducing * new things to repair). */ - if ((!termination.abstractrepair.contains(gn3)&& - cantremove.contains(gn3))|| + if (cantremove.contains(gn3)|| cantremovetrans.contains(gn3)) { needcyclecheck=true; } else return false; @@ -63,9 +62,11 @@ public class GraphAnalysis { goodoption=true; workset.push(gn3); } - if (!goodoption) { + if (!goodoption&&!cantremovetrans.contains(gn2)) { if (termination.scopenodes.contains(gn2)) return false; + if (termination.abstractrepair.contains(gn2)) + return false; } } } -- 2.34.1