3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-07-12 18:16:24 +00:00

Lazy regex factorization via iterator

This commit is contained in:
CEisenhofer 2026-06-30 22:22:33 +02:00
parent ccfc355edb
commit f5baba1068
3 changed files with 277 additions and 73 deletions

View file

@ -408,6 +408,17 @@ public:
void simplify_split(split_set& s) { m_split.simplify(s); }
// Build the *suspended* sigma(r) split-set term (no expansion); drive it with
// iterate_split. Returns null on a non-regex argument. See seq_split.h.
expr_ref make_split(expr* r) { return m_split.make(r); }
// Create a lazy enumerator over a suspended split-set `node` (typically the
// result of make_split()). See seq_split::iterator for the arguments.
seq_split::iterator iterate_split(expr* node, unsigned threshold,
const split_mode mode = split_mode::strong, split_oracle const& oracle = {}) {
return m_split.iterate(node, mode, threshold, oracle);
}
// decompose a membership constraint into a set of pairs of regex splits
std::pair<expr_ref, expr_ref> split_membership(expr* str, expr* regex, unsigned threshold, split_set& result) const {
return m_split.split_membership(str, regex, threshold, result);