指数约束在Z3 C API中是未知的?

时间:2014-04-16 09:19:47

标签: model z3 exponent

我想从Z3 C API获得针对约束的解决方案:

   2^x < a < 2^(x+1)
2 ^ x的

表达式是:

    t_x=Z3_mk_power(ctx,two,x), two is the expression of "2";

    2^(x+1) is similar,

&#34;&#34;是一个int const,其值为10:

   a=Z3_mk_int(ctx,10);

约束是:

   c1=Z3_mk_lt(ctx,t_x,a);

   c2=Z3_mk_lt(ctx,a,t_x_plus_one);

然后我得到的模型是&#34;未知&#34;,Z3 C API无法获得这样的模型?

1 个答案:

答案 0 :(得分:0)

从描述中不清楚Z3最终采用哪种求解方法,但一般来说非线性整数算法是不可判定的,而Z3只能处理指数的简单情况。另见Leo对类似问题的回答:

How does Z3 handle non-linear integer arithmetic?

Z3 supports for nonlinear arithmetics