Closed chansey97 closed 3 years ago
The following program returns the unexpected result and fails the test
(run* (q) (fresh (v1 v2) (z/ `(declare-const ,v1 Bool)) (z/ `(declare-const ,v2 Bool)) (== v1 v2) (== q v1))) ;; => (#f)
This patch fixes the problem, and return (#f #t):
(#f #t)
(run* (q) (fresh (v1 v2) (z/ `(declare-const ,v1 Bool)) (z/ `(declare-const ,v2 Bool)) (== v1 v2) (== q v1))) ;; => (#f #t)
Note that
This patch still cannot pass the test, because that test expects '(_.0). Nevertheless, returning (#f #t) is still a correct behavior, consider the following program in cKanren, i.e. CLP(FD):
'(_.0)
(run* (q) (fresh (v1 v2) (infd v1 '(0 1)) (infd v2 '(0 1)) (== v1 v2) (== q v1))) ;; => (0 1)
This patch only be used for z3-driver.scm. z3-server.scm currently doesn't support boolean at all, since they don't encode #t and #f to smtlib format.
z3-driver.scm
z3-server.scm
#t
#f
PS. I'm using z3-4.8.7.
Thanks!
The following program returns the unexpected result and fails the test
This patch fixes the problem, and return
(#f #t)
:Note that
This patch still cannot pass the test, because that test expects
'(_.0)
. Nevertheless, returning(#f #t)
is still a correct behavior, consider the following program in cKanren, i.e. CLP(FD):This patch only be used for
z3-driver.scm
.z3-server.scm
currently doesn't support boolean at all, since they don't encode#t
and#f
to smtlib format.PS. I'm using z3-4.8.7.