Skip to content
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

Refutation soundness bug in QF_NRA #6130

Closed
KJongUk opened this issue Jul 4, 2022 · 1 comment
Closed

Refutation soundness bug in QF_NRA #6130

KJongUk opened this issue Jul 4, 2022 · 1 comment

Comments

@KJongUk
Copy link

KJongUk commented Jul 4, 2022

Hi,
Even if the below instance is satisfiable, the following versions of z3 incorrectly return unsat.

  • Tested versions of z3: from release 4.8.15 version to night build version 6ed2b44
  • Tested formula
$ z3 bug.smt2
unsat
$ cvc5 bug.smt2
sat
$ cat bug.smt2
(set-logic QF_NRA)
(declare-fun v () Real)
(declare-fun v2 () Real)
(declare-fun v3 () Real)
(declare-fun v5 () Real)
(declare-fun v8 () Real)
(declare-fun v10 () Real)
(declare-fun v1 () Real)
(define-fun h () Bool (= v1 0)) ;; the root cause of the bug that I guessed
(assert (and 
            (= 0 (+ (* v3 v8) (* v10 v2 v3) (* v2 v3 v5) (* v3 v5 (- 1)) (* v2 v3 v8 (- 1)))) 
            (= 0 (+ v (* v3 v8) (* v10 v2 v3) (* v2 v3 v5) (* v3 v5 (- 1)) (* v v8 (- 1)) 
                 (* v2 v3 v8 (- 1)) (* v v1 v8 (- 1)))) 
            (< 0 (* v3 v3)) (> v2 0) (> v 0)))
(assert (= v1 (+ v 1.0)))
(check-sat)

I think this bug is different from bugs that are reported already, in that the bug is triggered due to the introduction of the fresh symbol h (i.e., the bug is not triggered without introducing h) but I haven't observed similar bug-triggering patterns in old issues related to QF_NRA such as #2650.

@NikolajBjorner
Copy link
Contributor

I can't take fuzzing QF_NRA bugs until there is better understanding of 2650.
Root cause analysis considers the code paths involved. The input permutations is too weak a proxy.
This is a higher bar than filing a fuzz bug with a reduced repro.

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

2 participants