Beispiel #1
0
        public void NotUninterpretedFunction()
        {
            var sb           = GetSimpleBuilder();
            var constant     = sb.ConstantBV(0, 32); // 0bv32
            var addConstants = sb.BVADD(constant, constant);
            var asUF         = ExprUtil.AsUninterpretedFunctionCall(addConstants);

            Assert.IsNull(asUF);

            // Yuck...
            var func = ((addConstants as NAryExpr).Fun as FunctionCall).Func;

            Assert.IsNull(ExprUtil.AsUninterpretedFunction(func));
        }
Beispiel #2
0
        public void UninterpretedFunction()
        {
            var FCB      = new Symbooglix.FunctionCallBuilder();
            var funcCall = FCB.CreateCachedUninterpretedFunctionCall(
                "foo",
                BType.Bool, // Return type
                new List <Microsoft.Boogie.Type>()
            {
                BType.GetBvType(32), BType.GetBvType(32)
            }
                );

            Assert.IsNotNull(ExprUtil.AsUninterpretedFunction(funcCall.Func));

            var sb       = GetSimpleBuilder();
            var callFunc = sb.UFC(funcCall, sb.ConstantBV(0, 32), sb.ConstantBV(1, 32));
            var asUF     = ExprUtil.AsUninterpretedFunctionCall(callFunc);

            Assert.IsNotNull(asUF);
        }