Committing changes to leftsize->rightSize, more comments, and handling
[repair.git] / Repair / RepairCompiler / MCC / IR / RepairGenerator.java
index 53f424c85c9cdf295f64cb2175556052b3a280b0..ab4d0262f594381e9485342117243dde01942e5e 100755 (executable)
@@ -870,7 +870,7 @@ public class RepairGenerator {
            /* Equal */
        } else if (opcode==Opcode.EQ) {
            /* Equal */
-       } else if (opcode==Opcode.NE) {
+       } else if (opcode==Opcode.NE) { /* search for FLAGNE if this is changed*/
            cr.outputline(newvalue.getSafeSymbol()+"++;");
        } else {
            throw new Error("Unrecognized Opcode");
@@ -898,7 +898,7 @@ public class RepairGenerator {
                Rule r=(Rule)state.vRules.get(i);
                if (r.getInclusion().getTargetDescriptors().contains(rd)) {
                    for(int j=0;j<munmodify.numUpdates();j++) {
-                       UpdateNode un=munmodify.getUpdate(i);
+                       UpdateNode un=munmodify.getUpdate(j);
                        if (un.getRule()==r) {
                            /* Update for rule r */
                            String name=(String)updatenames.get(un);
@@ -967,7 +967,7 @@ public class RepairGenerator {
            munremove=getmultupdatenode(conj,dpred,AbstractRepair.REMOVEFROMSET);
            munadd=getmultupdatenode(conj,dpred,AbstractRepair.ADDTOSET);
        }
-       int size=ep.leftsize();
+       int size=ep.rightSize();
        VarDescriptor sizevar=VarDescriptor.makeNew("size");
        ((OpExpr)expr).left.generate(cr, sizevar);
        VarDescriptor change=VarDescriptor.makeNew("change");