Skip to content
New issue

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

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

Already on GitHub? # to your account

Invalid model for QF_BV formula #4825

Closed
muchang opened this issue Nov 27, 2020 · 0 comments
Closed

Invalid model for QF_BV formula #4825

muchang opened this issue Nov 27, 2020 · 0 comments

Comments

@muchang
Copy link

muchang commented Nov 27, 2020

Hi, for this formula, z3 gives a genuinely invalid model

[569] % z3-4.8.8 model_validate=true small.smt2
sat
sat
sat
(model
 (define-fun c () (_ BitVec 32)
  #x80000003)
 (define-fun b () (_ BitVec 32)
  #x40000000)
 (define-fun d () (_ BitVec 32)
  #xfffffffe)
 (define-fun a () (_ BitVec 32)
  #x00000000)
)
[570] % z3release model_validate=true small.smt2
sat
sat
sat
(error "line 13 column 10: an invalid model was generated")
( 
 (define-fun c () (_ BitVec 32)
  #x00000001)
 (define-fun b () (_ BitVec 32)
  #x00000000)
 (define-fun d () (_ BitVec 32)
  #xfffffffe)
 (define-fun a () (_ BitVec 32)
  #x00000000)
)
[571] %
[571] % cat small.smt2
(declare-fun a () (_ BitVec 32))
(push)
(assert (distinct a (_ bv0 32)))
(check-sat)
(pop)
(check-sat)
(declare-fun b () (_ BitVec 32))
(declare-fun c () (_ BitVec 32))
(declare-fun d () (_ BitVec 32))
(assert (distinct (_ bv0 32) (_ bv1 32)))
(assert (distinct (bvadd d c) (_ bv1 32)))
(assert (= (bvadd (bvmul (_ bv2 32) b) c) (bvadd (bvneg d) (_ bv1 32))))
(check-sat)
(get-model)
[572] %

It might be related to #4824.

Commit: f58618a

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

No branches or pull requests

1 participant