mirror of
https://github.com/Z3Prover/z3
synced 2025-07-18 02:16:40 +00:00
in progress (#4386)
* initial work on replacing str in regex check * finish rewriter for empty string in regex * remove unnecessary argument in mk_regexp_contains_emptystr; initial template for eval_regexp_derivative * progress on string in regexp general check using derivatives * added recursive nullable and derivative funcitons, partially working * remove tests from z3test * fix rewriting infinite loop and some failing simplify checks * several fixes addressing comments for z3 main branch PR #4386 * redo derivative to return an expr_ref, and null on failure Co-authored-by: calebstanford-msr <t-casta@microsoft.com>
This commit is contained in:
parent
b3366bae5a
commit
7756e2c6d5
2 changed files with 210 additions and 9 deletions
|
@ -132,10 +132,13 @@ class seq_rewriter {
|
|||
}
|
||||
length_comparison compare_lengths(unsigned sza, expr* const* as, unsigned szb, expr* const* bs);
|
||||
|
||||
|
||||
// Support for regular expression derivatives
|
||||
bool get_head_tail(expr* e, expr_ref& head, expr_ref& tail);
|
||||
expr_ref is_nullable(expr* r);
|
||||
expr_ref kleene_and(expr* cond, expr* r);
|
||||
expr_ref kleene_predicate(expr* cond, sort* seq_sort);
|
||||
expr_ref derivative(expr* hd, expr* r);
|
||||
|
||||
br_status mk_seq_unit(expr* e, expr_ref& result);
|
||||
br_status mk_seq_concat(expr* a, expr* b, expr_ref& result);
|
||||
|
@ -204,7 +207,7 @@ class seq_rewriter {
|
|||
void remove_empty_and_concats(expr_ref_vector& es);
|
||||
void remove_leading(unsigned n, expr_ref_vector& es);
|
||||
|
||||
public:
|
||||
public:
|
||||
seq_rewriter(ast_manager & m, params_ref const & p = params_ref()):
|
||||
m_util(m), m_autil(m), m_re2aut(m), m_es(m), m_lhs(m), m_rhs(m), m_coalesce_chars(true) {
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue