3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-07-02 21:36:09 +00:00

Several changes to make sls terminate more often with length/extract operations (#7498)

* Fixed range regex

* Fix sls for str.at

* Added case for str.at

* Pad/Truncate string in sls extract/length to fit length constraints

* Guarded index check

* Added missing progressing cases in extraction

* Add padding if required

* Commented out debug output
This commit is contained in:
Clemens Eisenhofer 2024-12-30 19:53:27 +01:00 committed by GitHub
parent 4773bec975
commit 27cb81e7e6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 83 additions and 25 deletions

View file

@ -131,6 +131,9 @@ namespace sls {
void add_char_edit_updates(ptr_vector<expr> const& w, zstring const& val, zstring const& val_other, uint_set const& chars);
void add_substr_edit_updates(ptr_vector<expr> const& w, zstring const& val, zstring const& val_other, uint_set const& chars);
int add_str_update(expr* e, zstring const& val, double score);
zstring trunc_pad_to_fit(unsigned min_length, unsigned max_length, zstring const& s);
// regex functionality
// enumerate set of strings that can match a prefix of regex r.