Beispiel #1
0
        public void AsGeWithoutGe()
        {
            var sb   = GetSimpleBuilder();
            var v    = GetVarAndIdExpr("foo", BasicType.Int).Item2;
            var e    = sb.Eq(v, sb.ConstantInt(0));
            var asGe = ExprUtil.AsGe(e);

            Assert.IsNull(asGe);
        }
Beispiel #2
0
        public void Lt()
        {
            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.Lt(x, y));
            var asGe = ExprUtil.AsGe(e);

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