Skip to content

(qfnra smt) Soundness bug on NRA formula #4144

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
muchang opened this issue Apr 28, 2020 · 3 comments
Closed

(qfnra smt) Soundness bug on NRA formula #4144

muchang opened this issue Apr 28, 2020 · 3 comments

Comments

@muchang
Copy link

muchang commented Apr 28, 2020

Hi,
For this case, Z3 gives an incorrect answer:

[548] % z3 small.smt2
unsat
sat
[549] % cat small.smt2
(declare-fun a () Real)
(declare-fun b () Real)
(declare-fun c () Real)
(declare-fun d () Real)
(declare-fun e () Real)
(declare-fun f () Real)
(declare-fun h () Real)
(assert (forall ((g Real)) (and (= (= g f) (= g e)) (= (/ b d) h) (> (/ a c) h))))
(assert (= (/ a c) (/ b d)))
(check-sat)
(check-sat-using (then qfnra smt))
[550] %

OS: Ubuntu 18.04
Commit: 38e0968

@NikolajBjorner
Copy link
Contributor

I get:

C:\z3\build>z3 4144.smt2
unsat
unknown

@zhendongsu
Copy link

Nikolaj, I can still reproduce it on my release build (as well as debug build) of the latest commit (b571e43) on Ubuntu 18.04:

[571] % z3 bug4144.smt2 
unsat
sat
[572] % z3release bug4144.smt2 
unsat
sat
[573] % cat bug4144.smt2 
(declare-fun a () Real)
(declare-fun b () Real)
(declare-fun c () Real)
(declare-fun d () Real)
(declare-fun e () Real)
(declare-fun f () Real)
(declare-fun h () Real)
(assert (forall ((g Real)) (and (= (= g f) (= g e)) (= (/ b d) h) (> (/ a c) h))))
(assert (= (/ a c) (/ b d)))
(check-sat)
(check-sat-using (then qfnra smt))
[574] % 

@NikolajBjorner
Copy link
Contributor

indeed. Caused another revision of arithmetic purification, which has been a root of very many bugs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants