Fixed transitive closure computation.
authorbdemsky <bdemsky>
Wed, 1 Jun 2005 05:07:52 +0000 (05:07 +0000)
committerbdemsky <bdemsky>
Wed, 1 Jun 2005 05:07:52 +0000 (05:07 +0000)
Repair/RepairCompiler/MCC/IR/GraphAnalysis.java

index 878f939..270af78 100755 (executable)
@@ -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;
                }
            }
        }