mirror of
https://github.com/Z3Prover/z3
synced 2025-06-14 01:46:15 +00:00
relax condition for distributing extract over ite #2359
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
b8734273c8
commit
db274ebe01
3 changed files with 7 additions and 4 deletions
|
@ -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;
|
expr* c = nullptr, *t = nullptr, *e = nullptr;
|
||||||
if (m().is_ite(arg, c, t, e) &&
|
if (m().is_ite(arg, c, t, e) &&
|
||||||
(t->get_ref_count() == 1 || !m().is_ite(t)) &&
|
(t->get_ref_count() == 1 || e->get_ref_count() == 1 || !m().is_ite(t) || !m().is_ite(e))) {
|
||||||
(e->get_ref_count() == 1 || !m().is_ite(e))) {
|
|
||||||
result = m().mk_ite(c, m_mk_extract(high, low, t), m_mk_extract(high, low, e));
|
result = m().mk_ite(c, m_mk_extract(high, low, t), m_mk_extract(high, low, e));
|
||||||
return BR_REWRITE2;
|
return BR_REWRITE2;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1018,7 +1018,7 @@ void interval_manager<C>::mul(interval const & i1, interval const & i2, interval
|
||||||
#ifdef _TRACE
|
#ifdef _TRACE
|
||||||
static unsigned call_id = 0;
|
static unsigned call_id = 0;
|
||||||
#endif
|
#endif
|
||||||
#if Z3DEBUG || _TRACE
|
#if Z3DEBUG
|
||||||
bool i1_contains_zero = contains_zero(i1);
|
bool i1_contains_zero = contains_zero(i1);
|
||||||
bool i2_contains_zero = contains_zero(i2);
|
bool i2_contains_zero = contains_zero(i2);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -2849,7 +2849,7 @@ namespace smt {
|
||||||
}
|
}
|
||||||
|
|
||||||
void context::push() {
|
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());
|
scoped_suspend_rlimit _suspend_cancel(m_manager.limit());
|
||||||
pop_to_base_lvl();
|
pop_to_base_lvl();
|
||||||
setup_context(false);
|
setup_context(false);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue