X-Git-Url: http://plrg.eecs.uci.edu/git/?p=repair.git;a=blobdiff_plain;f=Repair%2FRepairCompiler%2FMCC%2FIR%2FAbstractInterferes.java;h=359dcc7a1dfe448d5590d174b4ab098c730ac274;hp=fc683a956400b00670d66032646130917c19576a;hb=fad6aeb08c39e34defb5ef82e9c16766e904f141;hpb=67dcbdb36743f6c386db45d66a9e2d17b4a71e43 diff --git a/Repair/RepairCompiler/MCC/IR/AbstractInterferes.java b/Repair/RepairCompiler/MCC/IR/AbstractInterferes.java index fc683a9..359dcc7 100755 --- a/Repair/RepairCompiler/MCC/IR/AbstractInterferes.java +++ b/Repair/RepairCompiler/MCC/IR/AbstractInterferes.java @@ -103,8 +103,10 @@ class AbstractInterferes { public boolean interfereswithpredicate(AbstractRepair ar, DNFPredicate dp) { if ((ar.getDescriptor()!=dp.getPredicate().getDescriptor()) && - ((ar.getDescriptor() instanceof SetDescriptor)|| - !dp.getPredicate().usesDescriptor((RelationDescriptor)ar.getDescriptor()))) + // ((ar.getDescriptor() instanceof SetDescriptor)|| + // If the second predicate uses the size of the set, modifying the set size could falsify it... + !dp.getPredicate().usesDescriptor(ar.getDescriptor())) + //) return false; /* This if handles all the c comparisons in the paper */ @@ -181,6 +183,9 @@ class AbstractInterferes { int size2=isInt2?((ExprPredicate)dp.getPredicate()).rightSize():0; Expr expr2=((OpExpr)((ExprPredicate)dp.getPredicate()).expr).right; + + /* If the left sides of the comparisons are both from + different sets, the update is orthogonal to the expr dp */ { Expr lexpr1=((RelationExpr)((OpExpr)((ExprPredicate)ar.getPredicate().getPredicate()).expr).getLeftExpr()).getExpr(); Expr lexpr2=((RelationExpr)((OpExpr)((ExprPredicate)dp.getPredicate()).expr).getLeftExpr()).getExpr(); @@ -205,9 +210,11 @@ class AbstractInterferes { ((op2==Opcode.LT)|| (op2==Opcode.LE))) return false; + // FIXME if (((op1==Opcode.EQ)||(op1==Opcode.GE)||(op1==Opcode.LE))&& ((op2==Opcode.EQ)||(op2==Opcode.GE)||(op2==Opcode.LE))&& expr1.equals(null,expr2)) { + // Need to check free variables... return false; } if (isInt1&&isInt2) { @@ -370,8 +377,8 @@ class AbstractInterferes { private boolean interferes(Descriptor des, boolean satisfy, DNFPredicate dp) { if ((des!=dp.getPredicate().getDescriptor()) && - ((des instanceof SetDescriptor)|| - !dp.getPredicate().usesDescriptor((RelationDescriptor)des))) + //((des instanceof SetDescriptor)|| + !dp.getPredicate().usesDescriptor(des))//) return false; /* This if handles all the c comparisons in the paper */