mirror of
https://github.com/Z3Prover/z3
synced 2025-04-12 12:08:18 +00:00
fixes based on benchmarking UFDTLIA/NIA/BV
This commit is contained in:
parent
f1e0950069
commit
e3566288a4
|
@ -390,7 +390,8 @@ namespace sls {
|
||||||
if (bv.is_ule(a, x, y)) {
|
if (bv.is_ule(a, x, y)) {
|
||||||
auto const& vx = wval(x);
|
auto const& vx = wval(x);
|
||||||
auto const& vy = wval(y);
|
auto const& vy = wval(y);
|
||||||
|
m_ev.m_tmp.set_bw(vx.bw);
|
||||||
|
m_ev.m_tmp2.set_bw(vx.bw);
|
||||||
if (is_true) {
|
if (is_true) {
|
||||||
if (vx.bits() <= vy.bits())
|
if (vx.bits() <= vy.bits())
|
||||||
return 1.0;
|
return 1.0;
|
||||||
|
@ -420,6 +421,8 @@ namespace sls {
|
||||||
auto const& vy = wval(y);
|
auto const& vy = wval(y);
|
||||||
// x += 2^bw-1
|
// x += 2^bw-1
|
||||||
// y += 2^bw-1
|
// y += 2^bw-1
|
||||||
|
m_ev.m_tmp.set_bw(vx.bw);
|
||||||
|
m_ev.m_tmp2.set_bw(vx.bw);
|
||||||
vy.bits().copy_to(vy.nw, m_ev.m_tmp);
|
vy.bits().copy_to(vy.nw, m_ev.m_tmp);
|
||||||
vx.bits().copy_to(vx.nw, m_ev.m_tmp2);
|
vx.bits().copy_to(vx.nw, m_ev.m_tmp2);
|
||||||
m_ev.m_tmp.set(vy.bw - 1, !m_ev.m_tmp.get(vy.bw - 1));
|
m_ev.m_tmp.set(vy.bw - 1, !m_ev.m_tmp.get(vy.bw - 1));
|
||||||
|
|
|
@ -666,7 +666,6 @@ namespace sls {
|
||||||
|
|
||||||
void bv_valuation::tighten_range() {
|
void bv_valuation::tighten_range() {
|
||||||
|
|
||||||
// verbose_stream() << "tighten " << m_lo << " " << m_hi << " " << m_bits << "\n";
|
|
||||||
if (!has_range())
|
if (!has_range())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -683,7 +682,7 @@ namespace sls {
|
||||||
if (!has_range())
|
if (!has_range())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!in_range(m_bits)) {
|
if (!in_range(m_bits) || !in_range(m_fixed_values)) {
|
||||||
if (!can_set(m_lo))
|
if (!can_set(m_lo))
|
||||||
return;
|
return;
|
||||||
m_lo.copy_to(nw, m_fixed_values);
|
m_lo.copy_to(nw, m_fixed_values);
|
||||||
|
@ -698,7 +697,6 @@ namespace sls {
|
||||||
if (hi() < rational::power_of_two(i))
|
if (hi() < rational::power_of_two(i))
|
||||||
m_is_fixed.set(i, true);
|
m_is_fixed.set(i, true);
|
||||||
|
|
||||||
// verbose_stream() << "post tighten " << m_lo << " " << m_hi << " " << m_bits << "\n";
|
|
||||||
SASSERT(well_formed());
|
SASSERT(well_formed());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -277,6 +277,15 @@ namespace sls {
|
||||||
if (!dt.is_datatype(e) || !g)
|
if (!dt.is_datatype(e) || !g)
|
||||||
return expr_ref(m);
|
return expr_ref(m);
|
||||||
if (m_axiomatic_mode) {
|
if (m_axiomatic_mode) {
|
||||||
|
|
||||||
|
init_values();
|
||||||
|
TRACE("dt", tout << "get value " << mk_bounded_pp(e, m) << " " << m_values.size() << " " << g->find(e)->get_root_id() << "\n";);
|
||||||
|
for (auto n : euf::enode_class(g->find(e))) {
|
||||||
|
auto id = n->get_id();
|
||||||
|
if (m_values.get(id, nullptr))
|
||||||
|
return expr_ref(m_values.get(id), m);
|
||||||
|
}
|
||||||
|
m_values.reset();
|
||||||
init_values();
|
init_values();
|
||||||
return expr_ref(m_values.get(g->find(e)->get_root_id()), m);
|
return expr_ref(m_values.get(g->find(e)->get_root_id()), m);
|
||||||
}
|
}
|
||||||
|
@ -696,9 +705,9 @@ namespace sls {
|
||||||
}
|
}
|
||||||
for (unsigned j = 0; j < accs.size(); ++j) {
|
for (unsigned j = 0; j < accs.size(); ++j) {
|
||||||
if (i == j)
|
if (i == j)
|
||||||
args[i] = v0;
|
args.push_back(v0);
|
||||||
else
|
else
|
||||||
args[j] = m_model->get_some_value(accs[j]->get_range());
|
args.push_back(m_model->get_some_value(accs[j]->get_range()));
|
||||||
}
|
}
|
||||||
expr* new_val_t = m.mk_app(c, args);
|
expr* new_val_t = m.mk_app(c, args);
|
||||||
set_eval0(t, new_val_t);
|
set_eval0(t, new_val_t);
|
||||||
|
|
Loading…
Reference in a new issue