edits
authorPeizhao Ou <peizhaoo@uci.edu>
Tue, 1 Mar 2016 02:07:01 +0000 (18:07 -0800)
committerPeizhao Ou <peizhaoo@uci.edu>
Tue, 1 Mar 2016 02:07:01 +0000 (18:07 -0800)
src/edu/uci/eecs/codeGenerator/CodeGeneratorUtils.java

index 04f3be9..99c4f2e 100644 (file)
@@ -525,7 +525,7 @@ public class CodeGeneratorUtils {
                                // Define @Transition for INTERFACE
                                code.addLine(ShortComment("Define @" + SpecNaming.Transition
                                                + " for " + name));
-                               code.addLine("void _" + name + "_" + SpecNaming.Transition
+                               code.addLine("bool _" + name + "_" + SpecNaming.Transition
                                                + "(" + SpecNaming.Method + " " + SpecNaming.Method1
                                                + ", " + SpecNaming.Method + " " + SpecNaming.Method2
                                                + ") {");
@@ -541,6 +541,9 @@ public class CodeGeneratorUtils {
                                code.addLine(TabbedLine(ShortComment("Execute Transition")));
                                code.addLines(construct.transition);
 
+                               // By default, we will return true for state transition
+                               code.addLine(TabbedLine(ShortComment("By default @Transition returns true")));
+                               code.addLine(TabbedLine("return true;"));
                                code.addLine("}");
                                code.addLine("");