worklist version
[repair.git] / Repair / RepairCompiler / MCC / IR / RelationExpr.java
index cc2d5de1e7a53ef62d1fcac26e11c66f42f94f5c..9f795e281c34971a6e6f765e73d5faba0bbff38c 100755 (executable)
@@ -22,10 +22,11 @@ public class RelationExpr extends Expr {
 
     public void generate(CodeWriter writer, VarDescriptor dest) {
         VarDescriptor domain = VarDescriptor.makeNew("domain");
+        String strinverse = inverse ? "inv" : "";
         String found = (VarDescriptor.makeNew("found")).getSafeSymbol();
         expr.generate(writer, domain);
         writer.outputline(relation.getRange().getType().getGenerateType().getSafeSymbol() + " " + dest.getSafeSymbol() + ";");
-        writer.outputline("int " + found + " = " + relation.getSafeSymbol() + "_hash->get(" + domain.getSafeSymbol() + ", " + dest.getSafeSymbol() + ");");
+        writer.outputline("int " + found + " = " + relation.getSafeSymbol() + "_hash" + strinverse + "->get(" + domain.getSafeSymbol() + ", " + dest.getSafeSymbol() + ");");
         writer.outputline("if (!" + found + ") { maybe = 1; }");
     }