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 878f9392c108b68140434479ca871e6a54a6c042..270af789be65255fe78c16da8a091ce922889719 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;
                }
            }
        }