Skip to content

z3str3 invalid model on QF_S formula with distinct str.replace #3077

@muchang

Description

@muchang

Hi,
For this formula:

(declare-fun x () String)
(declare-fun y () String)
(assert (distinct (str.replace (str.replace x y x) x y) x))
(check-sat)
(get-model)

Z3 smt.string_solver=z3str3 gives an invalid model:

(model 
  (define-fun y () String
    "")
  (define-fun x () String
    "\x00")
)

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

OS: Ubuntu 18.04
Commit: c71da17

Metadata

Metadata

Assignees

Labels

performanceIssues that relate primarily to the performance of Z3, such as timeoutsz3str3

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions