Skip to content

z3 gives an incorrect model on QF_UFLIA formula with ite operator #2780

@muchang

Description

@muchang

Hi,
For this formula,

(declare-fun a () Int)
(declare-fun b () Int)
(declare-fun c () Int)
(declare-fun d (Int) Bool)
(declare-fun e (Int) Bool)
(assert
 (not
  (=
   (ite (= 0 (ite (d 0) 0 1)) (ite (e c) 0 a) 0)
   (ite (= 0 b) 0 (ite (d 0) (ite (e 0) 0 (ite (e 0) 0 (ite (e c) 0 a))) 0)))))
(check-sat)
(get-model)

z3 gives an incorrect model:

(model 
  (define-fun c () Int
    0)
  (define-fun a () Int
    (- 1))
  (define-fun b () Int
    1)
  (define-fun d ((x!0 Int)) Bool
    true)
  (define-fun e ((x!0 Int)) Bool
    false)
)

If I feed this model to the formula, z3 will report unsat

OS: Ubuntu 18.04
Revision: 2f6a9ba

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