Esempio n. 1
0
        public void AsLeWithoutLe()
        {
            var sb   = GetSimpleBuilder();
            var v    = GetVarAndIdExpr("foo", BasicType.Int).Item2;
            var e    = sb.Eq(v, sb.ConstantInt(0));
            var asLe = ExprUtil.AsLe(e);

            Assert.IsNull(asLe);
        }
Esempio n. 2
0
        public void Gt()
        {
            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.Gt(x, y));
            var asLe = ExprUtil.AsLe(e);

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