3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-24 17:45:32 +00:00

relax condition for distributing extract over ite #2359

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2019-06-23 16:48:42 -07:00
parent b8734273c8
commit db274ebe01
3 changed files with 7 additions and 4 deletions

View file

@ -784,10 +784,13 @@ br_status bv_rewriter::mk_extract(unsigned high, unsigned low, expr * arg, expr_
}
}
// issue #2359 led to relaxing condition for propagating extract over ite.
// It is propagted inwards only in the case that it leads to at most one
// branch of ite to be expanded or if one of the expanded ite branches have a single
// reference count.
expr* c = nullptr, *t = nullptr, *e = nullptr;
if (m().is_ite(arg, c, t, e) &&
(t->get_ref_count() == 1 || !m().is_ite(t)) &&
(e->get_ref_count() == 1 || !m().is_ite(e))) {
(t->get_ref_count() == 1 || e->get_ref_count() == 1 || !m().is_ite(t) || !m().is_ite(e))) {
result = m().mk_ite(c, m_mk_extract(high, low, t), m_mk_extract(high, low, e));
return BR_REWRITE2;
}

View file

@ -1018,7 +1018,7 @@ void interval_manager<C>::mul(interval const & i1, interval const & i2, interval
#ifdef _TRACE
static unsigned call_id = 0;
#endif
#if Z3DEBUG || _TRACE
#if Z3DEBUG
bool i1_contains_zero = contains_zero(i1);
bool i2_contains_zero = contains_zero(i2);
#endif

View file

@ -2849,7 +2849,7 @@ namespace smt {
}
void context::push() {
TRACE("trigger_bug", tout << "context::push()\n";);
TRACE("unit_subsumption_bug", display(tout << "context::push()\n"););
scoped_suspend_rlimit _suspend_cancel(m_manager.limit());
pop_to_base_lvl();
setup_context(false);