3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-07-23 07:22:33 +00:00

rewrite replace_all constraints

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2026-06-23 10:45:28 -07:00
parent f8bf10af4f
commit cb3fe3167f
2 changed files with 162 additions and 0 deletions

View file

@ -173,6 +173,11 @@ class seq_rewriter {
//replace b in a by c into result
void replace_all_subvectors(expr_ref_vector const& as, expr_ref_vector const& bs, expr* c, expr_ref_vector& result);
// For replace_all(x, a, b) in R: transform R so that
// - occurrences of b_ch are replaced by union(to_re(a_str), to_re(b_str))
// - occurrences of a_ch are replaced by empty (replace_all never outputs a)
expr_ref re_replace_char(expr *r, unsigned a_ch, unsigned b_ch, expr *a_str, expr *b_str);
// Calculate derivative, memoized and enforcing a normal form
expr_ref is_nullable_rec(expr* r);
expr_ref mk_derivative_rec(expr* ele, expr* r);