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?
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
satis 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
lia2pbby using the following command: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-elsecombinator. Here is an example:EDIT: The tactic
lia2pbalso 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 tacticnormalize-boundsbefore applyinglia2pb. The tacticnormalize-boundswill replace a bound variablexwithy + l_x, whereyis a fresh variable andl_xis the lower bound for x. For example, in a goal containing3 <= x,xis replaced withy+3, whereyis a new fresh variable.