Some embarrassing erros. The DNF conversion for negation wasn't
[repair.git] / Repair / RepairCompiler / MCC / IR / OpExpr.java
index c5f6b270e7b1dd86074e2efee592a7060c876af2..e9cde37d174b730ca782e0f1a07cc603ac505afc 100755 (executable)
@@ -191,8 +191,10 @@ public class OpExpr extends Expr {
        if (opcode==Opcode.RND)
            return "Round("+left.name()+")";
        String name=left.name()+opcode.toString();
-       if (right!=null)
+       if (right!=null) {
            name+=right.name();
+            name="("+name+")";
+        }
        return name;
     }
 
@@ -411,8 +413,9 @@ public class OpExpr extends Expr {
     public void prettyPrint(PrettyPrinter pp) {
         pp.output("(");
         if (opcode == Opcode.NOT) {
-           pp.output("!");
+           pp.output("!(");
             left.prettyPrint(pp);
+           pp.output(")");
        } else if (opcode == Opcode.NOP) {
             left.prettyPrint(pp);
        } else if (opcode == Opcode.RND) {