X-Git-Url: http://plrg.eecs.uci.edu/git/?p=cdsspec-compiler.git;a=blobdiff_plain;f=src%2Fedu%2Fuci%2Feecs%2FcodeGenerator%2FCodeGeneratorUtils.java;h=99c4f2e17ca038260ad55f0e10ff0a6c01c44cea;hp=04f3be95f4fba9983f04473a7e84f082159a7dc3;hb=e462c467b5d6999be69d8a7de5a2714671894c36;hpb=932e489826f3ee82da3e22d357ce56fa5695026f diff --git a/src/edu/uci/eecs/codeGenerator/CodeGeneratorUtils.java b/src/edu/uci/eecs/codeGenerator/CodeGeneratorUtils.java index 04f3be9..99c4f2e 100644 --- a/src/edu/uci/eecs/codeGenerator/CodeGeneratorUtils.java +++ b/src/edu/uci/eecs/codeGenerator/CodeGeneratorUtils.java @@ -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("");