Exemplo n.º 1
0
        public void AsGtWithoutGt()
        {
            var sb   = GetSimpleBuilder();
            var v    = GetVarAndIdExpr("foo", BasicType.Int).Item2;
            var e    = sb.Eq(v, sb.ConstantInt(0));
            var asGt = ExprUtil.AsGt(e);

            Assert.IsNull(asGt);
        }
Exemplo n.º 2
0
        public void Le()
        {
            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.Le(x, y));
            var asGt = ExprUtil.AsGt(e);

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