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

model validator reports error on valid model #2679

Closed
muchang opened this issue Nov 3, 2019 · 1 comment
Closed

model validator reports error on valid model #2679

muchang opened this issue Nov 3, 2019 · 1 comment

Comments

@muchang
Copy link

muchang commented Nov 3, 2019

Hi,
For this formula:

(declare-fun a () Real)
(declare-fun b () Real)
(declare-fun c () Real)
(assert (< a 0))
(assert (= a (/ b c)))
(check-sat)
(get-model)

Z3 gives a valid model:

(model 
  (define-fun c () Real
    0.0)
  (define-fun b () Real
    1.0)
  (define-fun a () Real
    (- 1.0))
)

if model validator is enabled, it will report this valid model is invalid:

z3 model_validate=true file.smt2
sat
(error "line 6 column 10: an invalid model was generated")
(model 
  (define-fun c () Real
    0.0)
  (define-fun b () Real
    1.0)
  (define-fun a () Real
    (- 1.0))
)

OS: Ubuntu 18.04
Revision: a78f899

@NikolajBjorner
Copy link
Contributor

See #2663
They are all related to how /, mod, div, rem are dealt with.

NikolajBjorner added a commit that referenced this issue Nov 6, 2019
#2676 #2679

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
Projects
None yet
Development

No branches or pull requests

2 participants