mirror of
https://github.com/Z3Prover/z3
synced 2025-04-24 01:25:31 +00:00
regression fix to ackerman gc and memory smash, perf fix for handling bv2int axioms, perf fix for filtering ackerman
this update addresses some perf regressions introduced when handling axioms for bv2int and a memory smash regression when decoupling bv-ackerman from in-processing. It adds a filter based on bv_eq_axioms for disabling ackerman reductions on disequalities.
This commit is contained in:
parent
ca0a82952f
commit
159026b5e8
7 changed files with 46 additions and 13 deletions
|
@ -599,6 +599,8 @@ namespace smt {
|
|||
TRACE("bv", tout << mk_bounded_pp(n, m) << "\n";);
|
||||
process_args(n);
|
||||
mk_enode(n);
|
||||
m_bv2int.push_back(ctx.get_enode(n));
|
||||
ctx.push_trail(push_back_vector<enode_vector>(m_bv2int));
|
||||
if (!ctx.relevancy())
|
||||
assert_bv2int_axiom(n);
|
||||
}
|
||||
|
@ -1496,12 +1498,10 @@ namespace smt {
|
|||
unsigned sz = m_bits[v1].size();
|
||||
bool changed = true;
|
||||
TRACE("bv", tout << "bits size: " << sz << "\n";);
|
||||
if (sz == 0) {
|
||||
if (sz == 0 && !m_bv2int.empty()) {
|
||||
// int2bv(bv2int(x)) = x when int2bv(bv2int(x)) has same sort as x
|
||||
enode* n1 = get_enode(r1);
|
||||
for (enode* bv2int : *n1) {
|
||||
if (!m_util.is_bv2int(bv2int->get_expr()))
|
||||
continue;
|
||||
auto propagate_bv2int = [&](enode* bv2int) {
|
||||
enode* bv2int_arg = bv2int->get_arg(0);
|
||||
for (enode* p : enode::parents(n1->get_root())) {
|
||||
if (m_util.is_int2bv(p->get_expr()) && p->get_root() != bv2int_arg->get_root() && p->get_sort() == bv2int_arg->get_sort()) {
|
||||
|
@ -1514,6 +1514,18 @@ namespace smt {
|
|||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
if (m_bv2int.size() < n1->get_class_size()) {
|
||||
for (enode* bv2int : m_bv2int)
|
||||
if (bv2int->get_root() == n1->get_root())
|
||||
propagate_bv2int(bv2int);
|
||||
}
|
||||
else {
|
||||
for (enode* bv2int : *n1) {
|
||||
if (m_util.is_bv2int(bv2int->get_expr()))
|
||||
propagate_bv2int(bv2int);
|
||||
}
|
||||
}
|
||||
}
|
||||
do {
|
||||
|
|
|
@ -112,6 +112,7 @@ namespace smt {
|
|||
svector<unsigned> m_wpos; // per var, watch position for fixed variable detection.
|
||||
vector<zero_one_bits> m_zero_one_bits; // per var, see comment in the struct zero_one_bit
|
||||
bool_var2atom m_bool_var2atom;
|
||||
enode_vector m_bv2int;
|
||||
typedef svector<theory_var> vars;
|
||||
|
||||
typedef std::pair<numeral, unsigned> value_sort_pair;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue