Skip to content

Incorrect SAT result for string query #7745

@niooii

Description

@niooii

Z3 returns SAT for a query that should be UNSAT.

To reproduce

Run z3 on the following query:

(set-logic QF_S)
(declare-const xs String)
(declare-const ys String)
(assert (= (str.++ (str.substr ys 0 18) (str.substr xs 0 18)) (str.++ "It")))
(assert (> (str.len ys) 18))
(check-sat)

Expected: unsat
Actual: sat

A string concatenation of 18 characters should not equal a 2 character string "It".

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