Cristian bug fixes.
authorbdemsky <bdemsky>
Fri, 16 Apr 2004 21:13:37 +0000 (21:13 +0000)
committerbdemsky <bdemsky>
Fri, 16 Apr 2004 21:13:37 +0000 (21:13 +0000)
Repair/RepairCompiler/MCC/IR/RelationInclusion.java
Repair/RepairCompiler/MCC/IR/RepairGenerator.java
Repair/RepairCompiler/MCC/IR/SetInclusion.java

index 58e266478fec77a6d7bc0e79d33bbd3e6906267d..b31700c8aadd0ce51f0f74004f3e94f02d4a59e4 100755 (executable)
@@ -88,7 +88,7 @@ public class RelationInclusion extends Inclusion {
         }
 
         String addeditem = (VarDescriptor.makeNew("addeditem")).getSafeSymbol();
         }
 
         String addeditem = (VarDescriptor.makeNew("addeditem")).getSafeSymbol();
-       if (!Compiler.REPAIR) {
+       /*      if (!Compiler.REPAIR) {
            writer.outputline("int " + addeditem + ";");
            if (relation.testUsage(RelationDescriptor.IMAGE)) {
                writer.outputline(addeditem + " = " + relation.getSafeSymbol() + "_hash->add((int)" + ld.getSafeSymbol() + ", (int)" + rd.getSafeSymbol() + ");");
            writer.outputline("int " + addeditem + ";");
            if (relation.testUsage(RelationDescriptor.IMAGE)) {
                writer.outputline(addeditem + " = " + relation.getSafeSymbol() + "_hash->add((int)" + ld.getSafeSymbol() + ", (int)" + rd.getSafeSymbol() + ");");
@@ -97,9 +97,9 @@ public class RelationInclusion extends Inclusion {
            if (relation.testUsage(RelationDescriptor.INVIMAGE)) {
                writer.outputline(addeditem + " = " + relation.getSafeSymbol() + "_hashinv->add((int)" + rd.getSafeSymbol() + ", (int)" + ld.getSafeSymbol() + ");");
            }
            if (relation.testUsage(RelationDescriptor.INVIMAGE)) {
                writer.outputline(addeditem + " = " + relation.getSafeSymbol() + "_hashinv->add((int)" + rd.getSafeSymbol() + ", (int)" + ld.getSafeSymbol() + ");");
            }
-       } else {
+           } else {*/
            Repair.generate_dispatch(writer, relation, ld.getSafeSymbol(), rd.getSafeSymbol());
            Repair.generate_dispatch(writer, relation, ld.getSafeSymbol(), rd.getSafeSymbol());
-       }
+           //  }
        
         if (RelationInclusion.worklist) {
             writer.outputline("if (" + addeditem + ")");
        
         if (RelationInclusion.worklist) {
             writer.outputline("if (" + addeditem + ")");
index ab4d0262f594381e9485342117243dde01942e5e..fb7893966dfbf33bbb8bc867f40b61ea9461b3e6 100755 (executable)
@@ -1392,8 +1392,7 @@ public class RepairGenerator {
            cr.outputline(addeditem + " = " + rd.getSafeSymbol() + "_hashinv->add((int)" + rightvar + ", (int)" + leftvar + ");");
        }
        
            cr.outputline(addeditem + " = " + rd.getSafeSymbol() + "_hashinv->add((int)" + rightvar + ", (int)" + leftvar + ");");
        }
        
-       cr.outputline("if (" + addeditem + ")");
-       cr.startblock();
+
 
         Vector dispatchrules = getrulelist(rd);
         
 
         Vector dispatchrules = getrulelist(rd);
         
@@ -1406,12 +1405,12 @@ public class RepairGenerator {
        dispatchrules.removeAll(toremove);
         if (dispatchrules.size() == 0) {
             cr.outputline("// nothing to dispatch");
        dispatchrules.removeAll(toremove);
         if (dispatchrules.size() == 0) {
             cr.outputline("// nothing to dispatch");
-           cr.endblock();
             return;
         }
             return;
         }
-       
-       cr.outputline("if ("+addeditem+")");
+
+       cr.outputline("if (" + addeditem + ")");
        cr.startblock();
        cr.startblock();
+       
         for(int i = 0; i < dispatchrules.size(); i++) {
             Rule rule = (Rule) dispatchrules.elementAt(i);
            if (rule.getGuardExpr().getRequiredDescriptors().contains(rd)) {
         for(int i = 0; i < dispatchrules.size(); i++) {
             Rule rule = (Rule) dispatchrules.elementAt(i);
            if (rule.getGuardExpr().getRequiredDescriptors().contains(rd)) {
@@ -1427,7 +1426,7 @@ public class RepairGenerator {
                }
            }
         }
                }
            }
         }
-       cr.endblock();
+
        cr.endblock();
     }
 
        cr.endblock();
     }
 
index b18b08e70bcf2266281fadaf704be0e1d889415a..51a5113844a1b3147cc6640c67c7679e623ae5af 100755 (executable)
@@ -64,13 +64,13 @@ public class SetInclusion extends Inclusion {
 
 
         if (dostore) {
 
 
         if (dostore) {
-           if (!Compiler.REPAIR) {
+           /*      if (!Compiler.REPAIR) {
                writer.outputline("int " + addeditem + " = 1;");
                writer.outputline(addeditem + " = " + set.getSafeSymbol() + "_hash->add((int)" + vd.getSafeSymbol() 
                                  +  ", (int)" + vd.getSafeSymbol() + ");");
                writer.outputline("int " + addeditem + " = 1;");
                writer.outputline(addeditem + " = " + set.getSafeSymbol() + "_hash->add((int)" + vd.getSafeSymbol() 
                                  +  ", (int)" + vd.getSafeSymbol() + ");");
-           } else {
+                                 } else {*/
                Repair.generate_dispatch(writer, set, vd.getSafeSymbol());
                Repair.generate_dispatch(writer, set, vd.getSafeSymbol());
-           }
+               //          }
            
             if (SetInclusion.worklist) {
                 writer.outputline("if (" + addeditem + ")");
            
             if (SetInclusion.worklist) {
                 writer.outputline("if (" + addeditem + ")");