private AssumeStatement VisitAssume(AssumeStatement assume) { WriteStart("assume"); this.VisitParenthesizedExpression(assume.booleanExpr); WriteFinish(";"); return assume; }
private Statement VisitAssume(AssumeStatement assume) { Statement assumeStmt; if (assume == null || assume.booleanExpr == null) return null; assumeStmt = Templates.GetStatementTemplate("Assume"); Replacer.Replace(assumeStmt, "_exprString", new Literal(assume.booleanExpr.SourceContext.SourceText, SystemTypes.String)); Replacer.Replace(assumeStmt, "_expr", this.VisitExpression(assume.booleanExpr)); return assumeStmt; }
private AssumeStatement VisitAssume(AssumeStatement assume) { assume.booleanExpr = this.VisitExpression(assume.booleanExpr); Literal litBool = assume.booleanExpr as Literal; if (litBool != null) { // // Optimize away "assume(true);" // if (litBool.Type == SystemTypes.Boolean && ((bool)litBool.Value) == true) return null; } return assume; }
private AssumeStatement VisitAssume(AssumeStatement assume) { if (assume == null) return null; AssumeStatement result = (AssumeStatement)assume.Clone(); result.booleanExpr = this.VisitExpression(assume.booleanExpr); return result; }
private AssumeStatement VisitAssume(AssumeStatement assume) { assume.booleanExpr = this.VisitExpression(assume.booleanExpr); return assume; }
private AssumeStatement VisitAssume(AssumeStatement assume) { BasicBlock block = AddBlock(new BasicBlock(assume, CurrentContinuation)); CurrentContinuation = block; return assume; }
private AssumeStatement VisitAssume(AssumeStatement assume) { if (assume == null) return null; assume.booleanExpr = this.VisitExpression(assume.booleanExpr); if (assume.booleanExpr != null && assume.booleanExpr.Type != SystemTypes.Boolean) { this.HandleError(assume, Error.BooleanExpressionRequired); return null; } return assume; }
private AssumeStatement VisitAssume(AssumeStatement assume) { if (assume == null) return null; assume.booleanExpr = this.VisitExpression(assume.booleanExpr); return assume; }