Skip to content

power operator: correct model throws error  #2831

@wintered

Description

@wintered

Consider the following formula

(declare-fun x () Real)
(declare-fun y () Real)
(assert (= x 0.0))
(assert (= y (^ x 0.0)))
(assert (= y 1.0))
(check-sat)
(get-model)

Z3 reports a correct model here but model validation fails:

(= 1.0 (^ 0.0 0.0)) -> false
sat
(error "line 11 column 10: an invalid model was generated")
(model 
  (define-fun y () Real
    1.0)
  (define-fun x () Real
    0.0)
) 

The original formula has is very similar to the one in Issue #707.

OS: Ubuntu 18.04
Revision: 1d77e3e

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