1) Added useDescriptor method to Expr's.
[repair.git] / Repair / RepairCompiler / MCC / IR / ConstraintDependence.java
index 7ae89cb7143fc41e9b47a875ecae9da2eec0c7bc..192e212e6bd73e27d73f5933bd9a3f2df97cd824 100755 (executable)
@@ -179,6 +179,8 @@ public class ConstraintDependence {
                RelationInclusion ri=(RelationInclusion)r.getInclusion();
                Expr e=f.isInverse()?ri.getRightExpr():ri.getLeftExpr();
                SetDescriptor sd=e.getSet();
+               if (sd==null)
+                   sd=f.isInverse()?ri.getRelation().getRange():ri.getRelation().getDomain();
                if (!(sd.isSubset(f.getSet())||f.getSet().isSubset(sd)))
                    continue; /* This rule doesn't effect the function */
                if (foundrule) /* two different rules are a problem */