Example #1
0
 public override Expr VisitLiteralExpr(LiteralExpr node)
 {
     if (node.isBool)
     {
         return((Expr)Builder.ConstantBool(node.asBool));
     }
     else if (node.isBigNum)
     {
         return(Builder.ConstantInt(node.asBigNum.ToBigInteger));
     }
     else if (node.isBigDec)
     {
         return(Builder.ConstantReal(node.asBigDec));
     }
     else if (node.isBvConst)
     {
         var bv = node.asBvConst;
         return(Builder.ConstantBV(bv.Value.ToBigInteger, bv.Bits));
     }
     else
     {
         throw new NotSupportedException("Unknown LiteralExpr type");
     }
 }
Example #2
0
        public void Reals()
        {
            var literal = Builder.ConstantReal("-1.5e0");

            checkLiteral(literal, "-1.5");
        }
 public virtual LiteralExpr ConstantReal(string value)
 {
     return(UB.ConstantReal(value));
 }
Example #4
0
 public void Real()
 {
     CheckType(BasicType.Real, builder.ConstantReal("0.5"), "Real", "(= symbolic_0 0.5 )");
 }