3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-24 01:25:31 +00:00

add detection of string equalities

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2020-05-29 10:40:47 -07:00
parent e0130f5cf4
commit 3d9d52f742
3 changed files with 37 additions and 15 deletions

View file

@ -2398,8 +2398,6 @@ bool seq_rewriter::non_overlap(expr_ref_vector const& p1, expr_ref_vector const&
*/
bool seq_rewriter::rewrite_contains_pattern(expr* a, expr* b, expr_ref& result) {
vector<expr_ref_vector> patterns;
expr* x = nullptr, *y = nullptr, *z = nullptr, *u = nullptr;
if (!str().is_concat(a, x, y))

View file

@ -180,7 +180,6 @@ class seq_rewriter {
br_status reduce_re_is_empty(expr* r, expr_ref& result);
bool is_re_contains_pattern(expr* r, vector<expr_ref_vector>& patterns);
bool non_overlap(expr_ref_vector const& p1, expr_ref_vector const& p2) const;
bool non_overlap(zstring const& p1, zstring const& p2) const;
bool rewrite_contains_pattern(expr* a, expr* b, expr_ref& result);
@ -252,6 +251,11 @@ public:
result = m().mk_app(f, n, args);
return result;
}
/**
* check if regular expression is of the form all ++ s ++ all ++ t + u ++ all, where, s, t, u are sequences
*/
bool is_re_contains_pattern(expr* r, vector<expr_ref_vector>& patterns);
bool reduce_eq(expr* l, expr* r, expr_ref_pair_vector& new_eqs, bool& change);