mirror of
https://github.com/Z3Prover/z3
synced 2026-06-22 08:30:28 +00:00
Add seq::derive class for symbolic regex derivatives
Implement a new seq::derive class (seq_derive.h/cpp) that computes symbolic derivatives of regular expressions using ITE-trees, based on the RE# approach (Varatalu, Veanes, Ernits - POPL 2025). Key features: - Two-argument operator()(ele, r): computes derivative of regex r w.r.t. element ele (concrete character or de Bruijn variable for symbolic mode) - ACI canonicalization (flatten, stable_sort, dedup) for union/intersection - ITE-tree combinators for binary/unary operations - Info-based nullability with recursive fallback - Complement absorption rules - Depth-bounded recursion to prevent stack overflow Integration with seq_rewriter: - mk_derivative(ele, r) and mk_derivative(r) now delegate to m_derive - Removed dead mk_derivative_rec function - Added ITE hoisting in mk_re_star, mk_re_concat, mk_re_union0, mk_re_inter0, mk_re_complement - Added depth limiting in Antimirov derivative helpers Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
parent
ab259b6830
commit
1f28fd0e6b
6 changed files with 921 additions and 234 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -1,5 +1,7 @@
|
|||
*~
|
||||
rebase.cmd
|
||||
reports/
|
||||
crashes/
|
||||
*.pyc
|
||||
*.pyo
|
||||
# Ignore callgrind files
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue