3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-15 23:35:26 +00:00
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2015-12-10 20:25:12 -08:00
parent 5eb23e1e7a
commit 58411f64e8
5 changed files with 26 additions and 4 deletions

View file

@ -312,6 +312,8 @@ namespace smt {
d.m_phase_available = true;
d.m_phase = !l.sign();
TRACE("phase_selection", tout << "saving phase, is_pos: " << d.m_phase << " l: " << l << "\n";);
TRACE("relevancy",
tout << "is_atom: " << d.is_atom() << " is relevant: " << is_relevant_core(bool_var2expr(l.var())) << "\n";);
if (d.is_atom() && (m_fparams.m_relevancy_lvl == 0 || (m_fparams.m_relevancy_lvl == 1 && !d.is_quantifier()) || is_relevant_core(bool_var2expr(l.var()))))
m_atom_propagation_queue.push_back(l);
@ -805,8 +807,10 @@ namespace smt {
void context::merge_theory_vars(enode * n2, enode * n1, eq_justification js) {
enode * r2 = n2->get_root();
enode * r1 = n1->get_root();
if (!r1->has_th_vars() && !r2->has_th_vars())
if (!r1->has_th_vars() && !r2->has_th_vars()) {
TRACE("merge_theory_vars", tout << "Neither have theory vars #" << n1->get_owner()->get_id() << " #" << n2->get_owner()->get_id() << "\n";);
return;
}
theory_id from_th = null_theory_id;

View file

@ -469,6 +469,9 @@ bool theory_seq::simplify_and_solve_eqs() {
return change;
}
void theory_seq::internalize_eq_eh(app * atom, bool_var v) {
}
bool theory_seq::internalize_atom(app* a, bool) {
return internalize_term(a);
}
@ -598,7 +601,7 @@ void theory_seq::set_incomplete(app* term) {
}
theory_var theory_seq::mk_var(enode* n) {
if (!m_util.is_seq(n->get_owner()) ||
if (!m_util.is_seq(n->get_owner()) &&
!m_util.is_re(n->get_owner())) {
return null_theory_var;
}
@ -608,6 +611,7 @@ theory_var theory_seq::mk_var(enode* n) {
else {
theory_var v = theory::mk_var(n);
get_context().attach_th_var(n, this, v);
get_context().mark_as_relevant(n);
return v;
}
}
@ -1005,6 +1009,10 @@ void theory_seq::assign_eq(bool_var v, bool is_true) {
else if (m_util.str.is_in_re(e, e1, e2)) {
// TBD
}
else if (m.is_eq(e, e1, e2)) {
new_eq_eh(ctx.get_enode(e1)->get_th_var(get_id()),
ctx.get_enode(e1)->get_th_var(get_id()));
}
else {
UNREACHABLE();
}

View file

@ -128,6 +128,7 @@ namespace smt {
virtual final_check_status final_check_eh();
virtual bool internalize_atom(app*, bool);
virtual bool internalize_term(app*);
virtual void internalize_eq_eh(app * atom, bool_var v);
virtual void new_eq_eh(theory_var, theory_var);
virtual void new_diseq_eh(theory_var, theory_var);
virtual void assign_eq(bool_var v, bool is_true);