private Z3Expr MkCoercion(Z3Expr t, AppFreeCanUnn unn, PosIntegerEmbedding 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).Add(Context, one)); var coercion = i.Gt(Context, zero).Ite( Context, BoxingFun.Apply(i.Neg(Context)), negCase); coercion = i.Eq(Context, zero).Ite( Context, BoxingFun.Apply(one), coercion); return(coercion); }
private Z3Expr MkCoercion(Z3Expr t, AppFreeCanUnn unn, PosIntegerEmbedding te) { return(BoxingFun.Apply( ((Z3IntExpr)Context.MkSub(te.MkIntCoercion(t), Context.MkInt(Lower.ToString()))).Int2BV(Context, bvSort.Size))); }
private Z3Expr MkCoercion(Z3Expr t, AppFreeCanUnn unn, PosIntegerEmbedding te) { return(CreationFun.Apply()); }
private Z3Expr MkCoercion(Z3Expr t, AppFreeCanUnn unn, PosIntegerEmbedding te) { return(te.MkIntCoercion(t)); }