Example #1
0
        private Z3Expr MkCoercion(Z3Expr t, AppFreeCanUnn unn, NaturalEmbedding te)
        {
            var zero = Context.MkInt(0);
            var one  = Context.MkInt(1);
            var i    = (Z3IntExpr)te.UnboxingFun.Apply(t);

            var negCase = BoxingFun.Apply(i.Neg(Context));

            var coercion = i.Ge(Context, zero).Ite(
                Context,
                BoxingFun.Apply(one.Sub(Context, i)),
                negCase);

            return(coercion);
        }
Example #2
0
 private Z3Expr MkCoercion(Z3Expr t, AppFreeCanUnn unn, NaturalEmbedding te)
 {
     return(BoxingFun.Apply(
                ((Z3IntExpr)Context.MkSub(te.MkIntCoercion(t), Context.MkInt(Lower.ToString()))).Int2BV(Context, bvSort.Size)));
 }
Example #3
0
 private Z3Expr MkCoercion(Z3Expr t, AppFreeCanUnn unn, NaturalEmbedding te)
 {
     return(CreationFun.Apply());
 }
Example #4
0
 private Z3Expr MkCoercion(Z3Expr t, AppFreeCanUnn unn, NaturalEmbedding te)
 {
     return(te.MkIntCoercion(t));
 }