mirror of
https://github.com/Z3Prover/z3
synced 2026-07-05 06:46:11 +00:00
Performance improvements for seq-sls (#7519)
* Improve length repair * Fixed arguments * Special case regex membership with constant string * Trying hybrid eq-repair strategy * Different heuristic * Fixed stoi
This commit is contained in:
parent
3cdcd831b1
commit
1553bae20c
6 changed files with 118 additions and 36 deletions
|
|
@ -43,8 +43,9 @@ namespace sls {
|
|||
};
|
||||
|
||||
enum edit_distance_strategy {
|
||||
EDIT_CHAR,
|
||||
EDIT_SUBSTR,
|
||||
EDIT_CHAR = 0,
|
||||
EDIT_SUBSTR = 1,
|
||||
EDIT_COMBINED = 2,
|
||||
};
|
||||
|
||||
seq_util seq;
|
||||
|
|
@ -127,7 +128,7 @@ namespace sls {
|
|||
void init_string_instance(ptr_vector<expr> const& es, string_instance& a);
|
||||
unsigned edit_distance_with_updates(string_instance const& a, string_instance const& b);
|
||||
unsigned edit_distance(zstring const& a, zstring const& b);
|
||||
void add_edit_updates(ptr_vector<expr> const& w, zstring const& val, zstring const& val_other, uint_set const& chars);
|
||||
void add_edit_updates(ptr_vector<expr> const& w, zstring const& val, zstring const& val_other, uint_set const& chars, unsigned diff);
|
||||
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);
|
||||
|
||||
|
|
@ -148,6 +149,8 @@ namespace sls {
|
|||
|
||||
bool is_in_re(zstring const& s, expr* r);
|
||||
|
||||
bool is_num_string(zstring const& s); // Checks if s \in [0-9]+ (i.e., str.to_int is not -1)
|
||||
|
||||
// access evaluation
|
||||
bool is_seq_predicate(expr* e);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue