mirror of
https://github.com/Z3Prover/z3
synced 2025-04-13 20:38:43 +00:00
dbg proagate_eq
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
9dd8ebb474
commit
dbd90e5f86
|
@ -599,6 +599,7 @@ void seq_decl_plugin::init() {
|
|||
m_sigs[OP_RE_CONCAT] = alloc(psig, m, "re.++", 1, 2, reAreA, reA);
|
||||
m_sigs[OP_RE_UNION] = alloc(psig, m, "re.union", 1, 2, reAreA, reA);
|
||||
m_sigs[OP_RE_INTERSECT] = alloc(psig, m, "re.inter", 1, 2, reAreA, reA);
|
||||
m_sigs[OP_RE_DIFF] = alloc(psig, m, "re.diff", 1, 2, reAreA, reA);
|
||||
m_sigs[OP_RE_LOOP] = alloc(psig, m, "re.loop", 1, 1, &reA, reA);
|
||||
m_sigs[OP_RE_POWER] = alloc(psig, m, "re.^", 1, 1, &reA, reA);
|
||||
m_sigs[OP_RE_COMPLEMENT] = alloc(psig, m, "re.comp", 1, 1, &reA, reA);
|
||||
|
|
|
@ -280,21 +280,17 @@ namespace smt {
|
|||
}
|
||||
|
||||
void seq_regex::propagate_eq(expr* r1, expr* r2) {
|
||||
expr_ref r = symmetric_diff(r1, r2);
|
||||
sort* seq_sort = nullptr;
|
||||
VERIFY(u().is_re(r, seq_sort));
|
||||
expr_ref emp(re().mk_empty(seq_sort), m);
|
||||
expr_ref r = symmetric_diff(r1, r2);
|
||||
expr_ref emp(re().mk_empty(m.get_sort(r)), m);
|
||||
expr_ref is_empty = sk().mk_is_empty(r, emp);
|
||||
th.add_axiom(~th.mk_eq(r, emp, false), th.mk_literal(is_empty));
|
||||
th.add_axiom(~th.mk_eq(r1, r2, false), th.mk_literal(is_empty));
|
||||
}
|
||||
|
||||
void seq_regex::propagate_ne(expr* r1, expr* r2) {
|
||||
expr_ref r = symmetric_diff(r1, r2);
|
||||
sort* seq_sort = nullptr;
|
||||
VERIFY(u().is_re(r, seq_sort));
|
||||
expr_ref emp(re().mk_empty(seq_sort), m);
|
||||
expr_ref emp(re().mk_empty(m.get_sort(r)), m);
|
||||
expr_ref is_non_empty = sk().mk_is_non_empty(r, emp);
|
||||
th.add_axiom(th.mk_eq(r, emp, false), th.mk_literal(is_non_empty));
|
||||
th.add_axiom(th.mk_eq(r1, r2, false), th.mk_literal(is_non_empty));
|
||||
}
|
||||
|
||||
bool seq_regex::is_member(expr* r, expr* u) {
|
||||
|
|
|
@ -1536,6 +1536,7 @@ bool theory_seq::internalize_term(app* term) {
|
|||
}
|
||||
|
||||
if (ctx.get_fparams().m_seq_use_derivatives &&
|
||||
m.is_bool(term) &&
|
||||
(m_util.str.is_in_re(term) || m_sk.is_skolem(term))) {
|
||||
bool_var bv = ctx.mk_bool_var(term);
|
||||
ctx.set_var_theory(bv, get_id());
|
||||
|
|
Loading…
Reference in a new issue