Skip to content

Missed non-negativity of str.len #5358

@maurobringolf

Description

@maurobringolf

Commit: 2138ef2

I would expect (<= 0 (str.len _)) to be equivalent to true, but here it results in a completeness regression:

$ z3-4.8.10 unknown.smt2
unsat
$ z3trunk unknown.smt2
unknown
$ cat unknown.smt2
(declare-const x Int)
(assert (forall ((V Int)) (or (= 0 V) (not (<= 0 (str.len (str.substr "HySXCWhAK" x 1)))))))
(check-sat)
$ z3-4.8.10 unknown.smt2
unsat
$ z3trunk unknown.smt2
unsat
$ cat unknown.smt2
(declare-const x Int)
(assert (forall ((V Int)) (or (= 0 V) (not true))))
(check-sat)

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