Skip to content

Z3 incorrect answer on Int and Real formula #2733

@muchang

Description

@muchang

Hi,
For this formula

(set-logic QF_LRA)
(assert (= (/ 0.0 0.0) (/ (/ 0.0 0.0) 0.0)))
(assert (not (= (/ 0.0 0.0) (/ (/ (/ 0.0 0.0) 0.0) 0.0))))
(check-sat)

Z3 reports sat, but throws out an error when model_validate is on:

(error "line 4 column 10: an invalid model was generated")

CVC4 reports unsat on this formula.

For this similar formula in Int logic:

(set-logic QF_LIA)
(assert (= (div 0 0) (div (div 0 0) 0)))
(assert (not (= (div 0 0) (div (div (div 0 0) 0) 0))))
(check-sat)

Z3 also reports sat, while CVC4 reports unsat.
When model_validate is on, z3 will also throw out the same error.

OS: Ubuntu 18.04
Revision: e2b6b12

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions