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

[Consolidated] Invalid model issues #6165

Closed
merlinsun opened this issue Jul 15, 2022 · 3 comments
Closed

[Consolidated] Invalid model issues #6165

merlinsun opened this issue Jul 15, 2022 · 3 comments

Comments

@merlinsun
Copy link

Hi,
For this instance, z3 af80bd1 gives an invalid model.

$ z3 small.smt2 model_validate=true
sat
(error "line 8 column 10: an invalid model was generated")
$ cat small.smt2
(declare-const x Bool)
(declare-const x2 Int)
(declare-fun v () String)
(declare-fun e () Bool)
(declare-fun a () Bool)
(assert (and (>= 0 (mod x2 (* x2 x2 x2))) (= a (not x)) (= 0 (ite (str.contains (str.substr v 0 (str.len v)) "L") 1 0)) (= x (not e))))
(assert (exists ((T Bool)) T))
(check-sat)
@merlinsun merlinsun changed the title Invalid model on SLIA [Consolidated] Invalid model issues Jul 16, 2022
@merlinsun
Copy link
Author

$ z3 delta.smt2 model_validate=true
sat
(error "line 9 column 10: an invalid model was generated")
$  cat delta.smt2
(declare-const x2 Bool)
(declare-const x20 Bool)
(declare-const x1 Bool)
(declare-const x Bool)
(declare-fun b (Int) Bool)
(declare-fun v () Int)
(assert (= 1 (div 2 (* 4 v))))
(assert (exists ((v Int)) (or x2 (and x1 x x20 (b v)))))
(check-sat)

@merlinsun
Copy link
Author

merlinsun commented Jul 20, 2022

$ z3 model_validate=true small2.smt2
sat
(error "line 4 column 10: an invalid model was generated")
$ cat small2.smt2
(declare-fun e () Int)
(declare-fun v () Int)
(assert (and (= 0 (bv2nat ((_ int2bv 2) e))) (= (+ e 1) (bv2nat ((_ int2bv 2) v)))))
(check-sat)

@NikolajBjorner
Copy link
Contributor

see #6194

NikolajBjorner added a commit that referenced this issue Jul 30, 2022
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