mirror of
https://github.com/Z3Prover/z3
synced 2025-07-16 17:36:39 +00:00
This commit is contained in:
parent
9038dfd30d
commit
d016cb1da5
2 changed files with 3 additions and 2 deletions
|
@ -156,6 +156,7 @@ namespace euf {
|
||||||
bool interpreted() const { return m_interpreted; }
|
bool interpreted() const { return m_interpreted; }
|
||||||
bool is_equality() const { return m_is_equality; }
|
bool is_equality() const { return m_is_equality; }
|
||||||
lbool value() const { return m_value; }
|
lbool value() const { return m_value; }
|
||||||
|
bool value_conflict() const { return value() != l_undef && get_root()->value() != l_undef && value() != get_root()->value(); }
|
||||||
sat::bool_var bool_var() const { return m_bool_var; }
|
sat::bool_var bool_var() const { return m_bool_var; }
|
||||||
bool is_cgr() const { return this == m_cg; }
|
bool is_cgr() const { return this == m_cg; }
|
||||||
enode* get_cg() const { return m_cg; }
|
enode* get_cg() const { return m_cg; }
|
||||||
|
|
|
@ -294,7 +294,7 @@ namespace euf {
|
||||||
euf::enode* n = m_egraph.find(e);
|
euf::enode* n = m_egraph.find(e);
|
||||||
if (!n)
|
if (!n)
|
||||||
return;
|
return;
|
||||||
bool sign = l.sign();
|
bool sign = l.sign();
|
||||||
m_egraph.set_value(n, sign ? l_false : l_true);
|
m_egraph.set_value(n, sign ? l_false : l_true);
|
||||||
for (auto th : enode_th_vars(n))
|
for (auto th : enode_th_vars(n))
|
||||||
m_id2solver[th.get_id()]->asserted(l);
|
m_id2solver[th.get_id()]->asserted(l);
|
||||||
|
@ -308,7 +308,7 @@ namespace euf {
|
||||||
euf::enode* nb = n->get_arg(1);
|
euf::enode* nb = n->get_arg(1);
|
||||||
m_egraph.merge(na, nb, c);
|
m_egraph.merge(na, nb, c);
|
||||||
}
|
}
|
||||||
else if (n->merge_tf()) {
|
else if (n->merge_tf() || n->value_conflict()) {
|
||||||
euf::enode* nb = sign ? mk_false() : mk_true();
|
euf::enode* nb = sign ? mk_false() : mk_true();
|
||||||
m_egraph.merge(n, nb, c);
|
m_egraph.merge(n, nb, c);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue