fixed commutativity rule
authorPeizhao Ou <peizhaoo@uci.edu>
Thu, 21 Jul 2016 00:49:47 +0000 (17:49 -0700)
committerPeizhao Ou <peizhaoo@uci.edu>
Thu, 21 Jul 2016 00:49:47 +0000 (17:49 -0700)
src/edu/uci/eecs/codeGenerator/CodeGeneratorUtils.java

index e6fd383..f85ec8e 100644 (file)
@@ -569,9 +569,9 @@ public class CodeGeneratorUtils {
                        code.addLine(TabbedLine(
                                        DeclareDefine(structName2, "*M2", "(" + structName2
                                                        + "*) m2->value"), 2));
-                       code.addLine(TabbedLine("return " + rule.condition + ";", 2));
+                       code.addLine(TabbedLine("return !(" + rule.condition + ");", 2));
                        code.addLine(TabbedLine("}"));
-                       code.addLine(TabbedLine("return false;"));
+                       code.addLine(TabbedLine("return true;"));
 
                        code.addLine("}");
                        code.addLine("");