Skip to content

Incorrect model on QF_S formula 2 #3105

@muchang

Description

@muchang

Hi,
For this formula:

(declare-fun a () String)
(declare-fun b () String)
(declare-fun c () String)
(assert (distinct (str.substr a 3 (str.len b)) ""))
(assert (distinct
         (ite (= (str.len (str.substr (str.replace a b "") 0 (- (str.len c)))) 1) 0 2)
         (ite (= (str.at (str.replace a b "") 2) "") 1 2)))
(check-sat)
(get-model)

Z3 gives an invalid model:

(model 
  (define-fun b () String
    "\x00")
  (define-fun a () String
    "\x00\x00\x00\x00\x00")
  (define-fun c () String
    "\x00")
)

if I feed this model to the formula, Z3 reports unsat.

OS: Ubuntu 18.04
Commit: ad6062c

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions