3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-07-26 06:07:01 +00:00
This commit is contained in:
Jakob Rath 2024-05-14 16:37:40 +02:00
parent 5b8c6a98c2
commit ec0224912b

View file

@ -659,33 +659,35 @@ namespace polysat {
SASSERT(m_explain_kind != explain_t::none); SASSERT(m_explain_kind != explain_t::none);
static unsigned counter = 0; #if 1 // explain_overlap NEW
counter += 1; if (m_explain.size() >= 2) {
unsigned i;
if (counter == 17) { for (i = m_explain.size() - 1; i-- > 0; )
unsigned i; if (m_explain[i].e == last.e)
for (i = m_explain.size() - 1; i-- > 0; ) break;
if (m_explain[i].e == last.e) explanation* first_it = &m_explain[i];
break; explanation* last_it = &m_explain.back();
explanation* first_it = &m_explain[i]; SASSERT(first_it->e == last_it->e);
explanation* last_it = &m_explain.back(); SASSERT(first_it != last_it);
SASSERT(first_it->e == last_it->e); verbose_stream() << "Relevant entries:\n";
SASSERT(first_it != last_it); for (explanation const* e = first_it; e != last_it+1; ++e) {
display_explain(verbose_stream() << " ", *e) << "\n";
}
verbose_stream() << "\n";
#if 1 #if 1
// the version discussed on whiteboard, no hole treatment needed // the version discussed on whiteboard, no hole treatment needed
rational prefix(0); rational prefix(0);
for (explanation const* e = first_it; e != last_it; ++e) { for (explanation const* e = first_it; e != last_it; ++e) {
explanation const* after = e + 1; explanation const* after = e + 1;
explain_entry(e->e); explain_entry(e->e);
explain_overlap_v1(*e, *after, prefix, result); explain_overlap_v1(*e, *after, prefix, result);
} }
#else #else
explain_overlaps_v2(first_it, last_it, result); explain_overlaps_v2(first_it, last_it, result);
#endif #endif
}
} else { #else // explain_overlap OLD
verbose_stream() << "counter = " << counter << "\n";
explanation after = last; explanation after = last;
for (unsigned i = m_explain.size() - 1; i-- > 0; ) { for (unsigned i = m_explain.size() - 1; i-- > 0; ) {
explanation const& e = m_explain[i]; explanation const& e = m_explain[i];
@ -718,7 +720,7 @@ if (counter == 17) {
if (e.e == last.e) if (e.e == last.e)
break; break;
} }
} #endif
if (m_explain_kind == explain_t::propagation) { if (m_explain_kind == explain_t::propagation) {
// assume first and last have same bit-width // assume first and last have same bit-width