Goal Unsupported by Tactic

放肆的年华 提交于 2019-12-24 14:58:57

问题


I have some code, which I want to check with help of some tactics. Since I have lot of if-then-else statements, I want to apply elim-term-ite tactic.

I have made use of following tactics

(check-sat-using (then (! simplify :arith-lhs true) elim-term-ite solve-eqs lia2pb pb2bv bit-blast sat))

However, if I an error with this as - "goal is in a fragment unsupported by lia2pb"

So then, if I try to remove the tactics lia2pb and the ones next to them, I get another error as unknown "incomplete".

I tried to remove all the tactics except for the simplify, however I would still get an incomplete error.

What is that I should try to help the sat solver solve the problem? Should I try another tactics?


回答1:


To use lia2pb (aka linear integer arithmetic to pseudo-boolean), all integer variables must be bounded. That is, they must have a lower and upper bound.

The tactic sat is only complete if the input goal does not contain theory atoms. That is, the goal contains only Boolean connectives and Boolean constants. If that is not the case, then it will return "unknown" if it cannot show the (Boolean abstraction of the input) goal to be unsatisfiable.

You can ask Z3 to display the input goal for lia2pb by using the following command:

(apply (then (! simplify :arith-lhs true) elim-term-ite solve-eqs)

If some of your formulas contain unbounded integer variables, you can build a strategy that reduces to SAT when possible, and invokes a general purpose solver otherwise. This can be accomplished using the or-else combinator. Here is an example:

(check-sat-using (then (! simplify :arith-lhs true) elim-term-ite solve-eqs 
                       (or-else (then lia2pb pb2bv bit-blast sat)
                                smt)))

EDIT: The tactic lia2pb also assumes that the lower bound of every bounded integer variable is zero. This is not a big problem in practice, since we can use the tactic normalize-bounds before applying lia2pb. The tactic normalize-bounds will replace a bound variable x with y + l_x, where y is a fresh variable and l_x is the lower bound for x. For example, in a goal containing 3 <= x, x is replaced with y+3, where y is a new fresh variable.



来源:https://stackoverflow.com/questions/12481347/goal-unsupported-by-tactic

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!