Inheritance: System.Compiler.Statement
Exemple #1
0
        private AssumeStatement VisitAssume(AssumeStatement assume)
        {
            WriteStart("assume");
            this.VisitParenthesizedExpression(assume.booleanExpr);
            WriteFinish(";");

            return assume;
        }
Exemple #2
0
        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;
        }
Exemple #3
0
        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;
        }
Exemple #4
0
 private AssumeStatement VisitAssume(AssumeStatement assume)
 {
     if (assume == null) return null;
     AssumeStatement result = (AssumeStatement)assume.Clone();
     result.booleanExpr = this.VisitExpression(assume.booleanExpr);
     return result;
 }
Exemple #5
0
 private AssumeStatement VisitAssume(AssumeStatement assume)
 {
     assume.booleanExpr = this.VisitExpression(assume.booleanExpr);
     return assume;
 }
Exemple #6
0
        private AssumeStatement VisitAssume(AssumeStatement assume)
        {
            BasicBlock block = AddBlock(new BasicBlock(assume, CurrentContinuation));
            CurrentContinuation = block;

            return assume;
        }
Exemple #7
0
 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;
 }
Exemple #8
0
 private AssumeStatement VisitAssume(AssumeStatement assume)
 {
     if (assume == null) return null;
     assume.booleanExpr = this.VisitExpression(assume.booleanExpr);
     return assume;
 }