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

solution unsoundness issue on a QF_NIRA instance #6703

Closed
zhendongsu opened this issue Apr 27, 2023 · 3 comments
Closed

solution unsoundness issue on a QF_NIRA instance #6703

zhendongsu opened this issue Apr 27, 2023 · 3 comments

Comments

@zhendongsu
Copy link

Commit: c48dc69
OS: Ubuntu 18.04

The instance should be unsat.

[555] % z3release model_validate=true small.smt2
sat
(error "line 6 column 10: an invalid model was generated")
[556] % cat small.smt2
(declare-fun a () Real)
(declare-fun b () Real)
(declare-fun c () Real)
(assert (<= (* c (* (to_real (mod (to_int b) 2)) 1)) a b 1 a))
(assert (> c 2))
(check-sat)
@zhendongsu
Copy link
Author

Another likely related incremental QF_NIA instance (the last check-sat should return unsat):

[570] % z3release model_validate=true small.smt2
sat
sat
sat
(error "line 10 column 10: an invalid model was generated")
[571] % cat small.smt2
(declare-fun a () Int)
(declare-fun b () Int)
(declare-fun c () Int)
(assert (> b 0))
(assert (= 0 (+ c a a)))
(check-sat)
(assert (< 0 c))
(check-sat)
(assert (= (+ 1 c) (div 2 b)))
(check-sat)

@zhendongsu
Copy link
Author

An invalid model issue (as the formula is sat) that might also be related:

[569] % z3release model_validate=true small.smt2
sat
(error "line 5 column 10: an invalid model was generated")
[570] % cat small.smt2
(set-option :smt.random_seed 7)
(declare-fun e () Int)
(declare-fun i () Int)
(assert (= (* i 2) (- (+ e 2 (mod (- e 1) e)))))
(check-sat)

@zhendongsu
Copy link
Author

Another invalid model instance involving tactics:

[542] % z3release model_validate=true small.smt2
sat
(error "line 12 column 43: an invalid model was generated")
[543] % cat small.smt2
(set-option :proof true)
(declare-fun a () Int)
(declare-fun b () Int)
(declare-fun c () Int)
(declare-fun d () Int)
(declare-fun e () Int)
(declare-fun f () Int)
(declare-fun g () Int)
(declare-fun h () Int)
(declare-fun i () Int)
(assert (or (and (>= b c e 0) (> (+ f g) 0) (= (+ f g (* a h)) 0 (+ (* (- 2) d) h))) (> i 0)))
(check-sat-using (then purify-arith qfufbv))

NikolajBjorner added a commit that referenced this issue Apr 27, 2023
Signed-off-by: Nikolaj Bjorner <[email protected]>
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