From: Peizhao Ou Date: Fri, 4 Mar 2016 01:41:49 +0000 (-0800) Subject: edits X-Git-Url: http://plrg.eecs.uci.edu/git/?p=cdsspec-compiler.git;a=commitdiff_plain;h=103bce9e104bde86e9d2389e852427c8f4e3963a edits --- diff --git a/src/edu/uci/eecs/codeGenerator/CodeGeneratorUtils.java b/src/edu/uci/eecs/codeGenerator/CodeGeneratorUtils.java index 4100a0a..fffeae5 100644 --- a/src/edu/uci/eecs/codeGenerator/CodeGeneratorUtils.java +++ b/src/edu/uci/eecs/codeGenerator/CodeGeneratorUtils.java @@ -571,7 +571,11 @@ public class CodeGeneratorUtils { construct.preCondition.align(1); code.addLine(TabbedLine(ShortComment("Execute PreCondition"))); code.addLines(construct.preCondition); - + + // By default, we will return true for @PreCondition + code.addLine(TabbedLine(ShortComment("By default @PreCondition returns true"))); + code.addLine(TabbedLine("return true;")); + code.addLine("}"); code.addLine(""); @@ -596,6 +600,10 @@ public class CodeGeneratorUtils { code.addLine(TabbedLine(ShortComment("Execute PostCondition"))); code.addLines(construct.postCondition); + // By default, we will return true for @PostCondition + code.addLine(TabbedLine(ShortComment("By default @PostCondition returns true"))); + code.addLine(TabbedLine("return true;")); + code.addLine("}"); code.addLine(""); }