Skip to content

(default) solution unsoundness on string formula with str.replace_re_all (fatal failure by cvc4-1.8) #6636

@zhendongsu

Description

@zhendongsu

Commit: f62b464
OS: Ubuntu 18.04
Note: (1) the formula should be unsat; (2) the bug doesn't reproduce if replacing str.replace_re_all with str.replace_re

[549] % cvc5 -q --strings-exp --check-models small.smt2
Fatal failure within void cvc5::smt::CheckModels::checkModel(cvc5::smt::Model*, cvc5::context::CDList<cvc5::NodeTemplate<true> >*, bool) at /local/suz-local/software/CVC4/src/smt/check_models.cpp:125
Internal error detectedSmtEngine::checkModel(): ERRORS SATISFYING ASSERTIONS WITH MODEL:
assertion:     (let ((_let_1 (re.* re.allchar ))) (not (= a (str.replace_re_all a (re.++ _let_1 (str.to_re a) _let_1) a))))
simplifies to: false
expected `true'.
Run with `--check-models -v' for additional diagnostics.
Aborted
[550] % 
[550] % cat small.smt2
(declare-fun a () String)
(assert (not (= a (str.replace_re_all a (re.++ (re.* re.allchar) (str.to_re a) (re.* re.allchar)) a))))
(check-sat)
[551] % 

Metadata

Metadata

Assignees

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