mirror of
https://github.com/Z3Prover/z3
synced 2025-04-15 13:28:47 +00:00
fix #6451 missing occurrence marking when there is an unsafe equality already
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
95e07ffe8e
commit
3eeb59db34
|
@ -154,10 +154,12 @@ namespace euf {
|
||||||
return e1.var->get_id() < e2.var->get_id(); });
|
return e1.var->get_id() < e2.var->get_id(); });
|
||||||
unsigned j = 0;
|
unsigned j = 0;
|
||||||
expr* last_var = nullptr;
|
expr* last_var = nullptr;
|
||||||
|
bool was_unsafe = false;
|
||||||
for (auto const& eq : eqs) {
|
for (auto const& eq : eqs) {
|
||||||
|
|
||||||
SASSERT(!m.is_bool(eq.var));
|
SASSERT(!m.is_bool(eq.var));
|
||||||
|
|
||||||
|
|
||||||
if (eq.var != last_var) {
|
if (eq.var != last_var) {
|
||||||
|
|
||||||
m_contains_v.reset();
|
m_contains_v.reset();
|
||||||
|
@ -167,8 +169,11 @@ namespace euf {
|
||||||
mark_occurs(m_todo, eq.var, m_contains_v);
|
mark_occurs(m_todo, eq.var, m_contains_v);
|
||||||
SASSERT(m_todo.empty());
|
SASSERT(m_todo.empty());
|
||||||
last_var = eq.var;
|
last_var = eq.var;
|
||||||
if (m_contains_v.is_marked(eq.term))
|
was_unsafe = false;
|
||||||
|
if (m_contains_v.is_marked(eq.term)) {
|
||||||
|
was_unsafe = true;
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// then mark occurrences
|
// then mark occurrences
|
||||||
for (unsigned i = 0; i < m_fmls.size(); ++i)
|
for (unsigned i = 0; i < m_fmls.size(); ++i)
|
||||||
|
@ -178,6 +183,8 @@ namespace euf {
|
||||||
}
|
}
|
||||||
else if (m_contains_v.is_marked(eq.term))
|
else if (m_contains_v.is_marked(eq.term))
|
||||||
continue;
|
continue;
|
||||||
|
else if (was_unsafe)
|
||||||
|
continue;
|
||||||
|
|
||||||
// subject to occurrences, check if equality is safe
|
// subject to occurrences, check if equality is safe
|
||||||
if (is_safe_eq(eq.orig))
|
if (is_safe_eq(eq.orig))
|
||||||
|
|
|
@ -197,7 +197,7 @@ namespace euf {
|
||||||
if (!m.inc())
|
if (!m.inc())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (m_config.m_context_solve && false) {
|
if (m_config.m_context_solve) {
|
||||||
old_fmls.reset();
|
old_fmls.reset();
|
||||||
m_subst_ids.reset();
|
m_subst_ids.reset();
|
||||||
eqs.reset();
|
eqs.reset();
|
||||||
|
|
Loading…
Reference in a new issue