Reputation: 11
I have this following code
(set-logic QF_LIA)
(declare-fun w () Int)
(declare-fun x () Int)
(declare-fun y () Int)
(declare-fun z () Int)
(assert (> x y))
(assert (> y z))
(push 1)
(assert (> z x))
(check-sat) ; unsat
(get-info :statistics)
(pop 1)
(push 1)
(check-sat (= x w)) ; sat
The code should return unsat on first (check-sat) and sat on second (check-sat), but I get unknown.
Can someone please tell me what's the problem. I am using windows 7, jSMTLIB using cygwin
Thanks Saif
Upvotes: 1
Views: 187
Reputation: 41290
I don't know which backend in jSMTLIB you used for solving this. However, (check-sat (= x w))
is not even legal in SMT-LIB v2.
When I change that line to:
(assert (= x w))
(check-sat)
I get unsat
and sat
from Z3 web interface, which is of our expectation.
Note that (get-info :statistics)
is also incorrect; the correct option is (get-info :all-statistics)
. You can read more about SMT-LIB v2 standard in their documentation.
Upvotes: 3