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

Incorrect model with sequences #2417

Closed
LeventErkok opened this issue Jul 21, 2019 · 0 comments
Closed

Incorrect model with sequences #2417

LeventErkok opened this issue Jul 21, 2019 · 0 comments

Comments

@LeventErkok
Copy link

This benchmark is indeed SAT, but z3 returns an invalid model; and it knows about it:

(set-option :produce-models true)
(set-logic ALL)
(define-fun s2 () Int 2)
(define-fun s4 () Int 0)
(define-fun s5 () Int 1)
(declare-fun s0 () (Seq (_ BitVec 16)))
(define-fun s1 () Int (seq.len s0))
(define-fun s3 () Bool (>= s1 s2))
(define-fun s6 () (Seq (_ BitVec 16)) (seq.extract s0 s4 s5))
(define-fun s7 () Int (- s1 s5))
(define-fun s8 () (Seq (_ BitVec 16)) (seq.extract s0 s7 s5))
(define-fun s9 () Bool (distinct s6 s8))
(define-fun s10 () Bool (and s3 s9))
(assert s10)
(check-sat)

We have:

$ z3 model_validate=true a.smt2
sat
(error "line 15 column 10: an invalid model was generated")

Recent breakage.

NikolajBjorner added a commit that referenced this issue Jul 24, 2019
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
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

1 participant