author bdemsky Tue, 9 Nov 2004 16:51:28 +0000 (16:51 +0000) committer bdemsky Tue, 9 Nov 2004 16:51:28 +0000 (16:51 +0000)

index df03933..6b09ac4 100755 (executable)
@@ -134,9 +134,24 @@ class AbstractInterferes {
if (!leftside.equals(mapping,e2))
return false;
}
if (!leftside.equals(mapping,e2))
return false;
}
+
+
/* Prune precondition using any ar's in the same conjunction */
Conjunction conj=findConjunction(repair_c.getDNFConstraint(),ar.getPredicate());
/* Prune precondition using any ar's in the same conjunction */
Conjunction conj=findConjunction(repair_c.getDNFConstraint(),ar.getPredicate());
+
+        /* We don't interfere with the same constraint, if there
+            aren't any shared state problems between different
+            bindings (which we've already checked for), and its a
+            different conjunction.  Because we wouldn't have repair it
+            if it wasn't already broken.  Doesn't appear to be needed,
+            the cycle algorithm will just eliminate one of the nodes.
+
+            if (repair_c==interfere_c) {
+            if (conj!=findConjunction(interfere_c.getDNFConstraint(),interfere_pred))
+            return true;
+            }*/
+
for(int i=0;i<conj.size();i++) {
DNFPredicate dp=conj.get(i);
Set s=(Set)termination.predtoabstractmap.get(dp);
for(int i=0;i<conj.size();i++) {
DNFPredicate dp=conj.get(i);
Set s=(Set)termination.predtoabstractmap.get(dp);
index ff9a293..917b44f 100755 (executable)
@@ -67,20 +67,26 @@ public class Termination {
generateconjunctionnodes();
constraintdependence=new ConstraintDependence(state,this);

generateconjunctionnodes();
constraintdependence=new ConstraintDependence(state,this);

+        debugmsg("Generating scope nodes");
generatescopenodes();
generatescopenodes();
+        debugmsg("Generating repair nodes");
generaterepairnodes();
generaterepairnodes();
+        debugmsg("Generating data structure nodes");
generatedatastructureupdatenodes();
generatedatastructureupdatenodes();
+        debugmsg("Generating compensation nodes");
generatecompensationnodes();
generatecompensationnodes();
-
+        debugmsg("Generating abstract edges");
generateabstractedges();
generateabstractedges();
+        debugmsg("Generating scope edges");
generatescopeedges();
generatescopeedges();
+        debugmsg("Generating update edges");
generateupdateedges();

HashSet superset=new HashSet();
HashSet closureset=new HashSet();
generateupdateedges();

HashSet superset=new HashSet();
HashSet closureset=new HashSet();
-
+        debugmsg("Computing closure");
GraphNode.computeclosure(superset,closureset);
try {
GraphNode.DOTVisitor.visit(new FileOutputStream("graph.dot"),superset);
GraphNode.computeclosure(superset,closureset);
try {
GraphNode.DOTVisitor.visit(new FileOutputStream("graph.dot"),superset);
@@ -287,11 +293,11 @@ public class Termination {
} else {
for(int i=0;i<conj.size();i++) {
DNFPredicate dp=conj.get(i);
} else {
for(int i=0;i<conj.size();i++) {
DNFPredicate dp=conj.get(i);
-                        if (getConstraint(gn)!=null&&
-                            abstractinterferes.interferemodifies(ar,getConstraint(gn),dp,cons))
-                            continue;

-                        if (abstractinterferes.interfereswithpredicate(ar,dp)) {
+                        if (!abstractinterferes.interfereswithpredicate(ar,dp))
+                            continue;
+                        if (getConstraint(gn)==null||
+                            !abstractinterferes.interferemodifies(ar,getConstraint(gn),dp,cons)) {
GraphNode.Edge e=new GraphNode.Edge("interferes",gn2);