mirror of
https://github.com/Z3Prover/z3
synced 2026-05-17 15:39:27 +00:00
code simplification, fix conflict in new_diseq_eh
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
352b14fe2b
commit
8cc85a7d7b
5 changed files with 47 additions and 47 deletions
|
|
@ -4147,6 +4147,20 @@ expr_ref seq_rewriter::mk_derivative_rec(expr* ele, expr* r) {
|
|||
*************************************************/
|
||||
|
||||
|
||||
|
||||
expr_ref seq_rewriter::mk_symmetric_diff(expr* r1, expr* r2) {
|
||||
expr_ref r(m());
|
||||
if (r1 == r2)
|
||||
r = re().mk_empty(r1->get_sort());
|
||||
else if (re().is_empty(r1))
|
||||
r = r2;
|
||||
else if (re().is_empty(r2))
|
||||
r = r1;
|
||||
else
|
||||
r = re().mk_union(re().mk_diff(r1, r2), re().mk_diff(r2, r1));
|
||||
return r;
|
||||
}
|
||||
|
||||
/*
|
||||
* pattern match against all ++ "abc" ++ all ++ "def" ++ all regexes.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -379,6 +379,8 @@ public:
|
|||
return result;
|
||||
}
|
||||
|
||||
expr_ref mk_symmetric_diff(expr *r1, expr *r2);
|
||||
|
||||
/**
|
||||
* check if regular expression is of the form all ++ s ++ all ++ t + u ++ all, where, s, t, u are sequences
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue