Example #1
0
        public void AsLtWithoutLt()
        {
            var sb   = GetSimpleBuilder();
            var v    = GetVarAndIdExpr("foo", BasicType.Int).Item2;
            var e    = sb.Eq(v, sb.ConstantInt(0));
            var asLt = ExprUtil.AsLt(e);

            Assert.IsNull(asLt);
        }
Example #2
0
        public void Ge()
        {
            var cfb  = GetConstantFoldingBuilder();
            var x    = GetVarAndIdExpr("x", Microsoft.Boogie.Type.Int).Item2;
            var y    = GetVarAndIdExpr("y", Microsoft.Boogie.Type.Int).Item2;
            var e    = cfb.Not(cfb.Ge(x, y));
            var asLt = ExprUtil.AsLt(e);

            Assert.IsNotNull(asLt);
            Assert.AreSame(x, asLt.Args[0]);
            Assert.AreSame(y, asLt.Args[1]);
        }