mirror of
https://github.com/Z3Prover/z3
synced 2026-03-17 10:33:48 +00:00
Revert is_concat changes, add ZIPT URL, implement snode/sgraph operations and tests
- Revert is_str_concat/is_re_concat to original form (PR #8820 review) - Add ZIPT URL (https://github.com/CEisenhofer/ZIPT) to euf_sgraph.h - Add snode::at() for token indexing and collect_tokens() for enumeration - Add sgraph factory methods: mk_var, mk_char, mk_empty, mk_concat - Add sgraph drop operations: drop_first, drop_last, drop_left, drop_right - Add sgraph substitution: subst(snode*, snode*, snode*) - Add Brzozowski derivative via seq_rewriter::mk_derivative - Add minterm computation from regex predicates - Add 7 new unit tests covering all new operations with complex concats Co-authored-by: NikolajBjorner <56730610+NikolajBjorner@users.noreply.github.com>
This commit is contained in:
parent
40b99311e3
commit
150f1fe2ea
5 changed files with 501 additions and 11 deletions
|
|
@ -93,22 +93,18 @@ namespace euf {
|
|||
bool is_str_concat(enode* n) const { return m_seq.str.is_concat(n->get_expr()); }
|
||||
bool is_str_concat(enode* n, enode*& a, enode*& b) {
|
||||
expr* ea = nullptr, *eb = nullptr;
|
||||
if (!m_seq.str.is_concat(n->get_expr(), ea, eb))
|
||||
return false;
|
||||
a = n->get_arg(0);
|
||||
b = n->get_arg(1);
|
||||
return true;
|
||||
return m_seq.str.is_concat(n->get_expr(), ea, eb) &&
|
||||
n->num_args() == 2 &&
|
||||
(a = n->get_arg(0), b = n->get_arg(1), true);
|
||||
}
|
||||
|
||||
// regex concat predicates
|
||||
bool is_re_concat(enode* n) const { return m_seq.re.is_concat(n->get_expr()); }
|
||||
bool is_re_concat(enode* n, enode*& a, enode*& b) {
|
||||
expr* ea = nullptr, *eb = nullptr;
|
||||
if (!m_seq.re.is_concat(n->get_expr(), ea, eb))
|
||||
return false;
|
||||
a = n->get_arg(0);
|
||||
b = n->get_arg(1);
|
||||
return true;
|
||||
return m_seq.re.is_concat(n->get_expr(), ea, eb) &&
|
||||
n->num_args() == 2 &&
|
||||
(a = n->get_arg(0), b = n->get_arg(1), true);
|
||||
}
|
||||
|
||||
// any concat, string or regex
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue