mirror of
https://github.com/Z3Prover/z3
synced 2025-08-15 15:25:26 +00:00
working on #5614
there are some different sources for the performance regression illustrated by the example. The mitigations will be enabled separately: - m_bv_to_propagate is too expensive - lp_bound_propagator misses equalities in two different ways: - it resets row checks after backtracking even though they could still propagate - it misses equalities for fixed rows when the fixed constant value does not correspond to a fixed variable. FYI @levnach
This commit is contained in:
parent
a94e2e62af
commit
87d4ce2659
13 changed files with 422 additions and 385 deletions
|
@ -262,22 +262,30 @@ namespace smt {
|
|||
}
|
||||
|
||||
void context::display_eqc(std::ostream & out) const {
|
||||
bool first = true;
|
||||
for (enode * x : m_enodes) {
|
||||
expr * n = x->get_expr();
|
||||
expr * r = x->get_root()->get_expr();
|
||||
if (n != r) {
|
||||
if (first) {
|
||||
out << "equivalence classes:\n";
|
||||
first = false;
|
||||
}
|
||||
out << "#" << n->get_id() << " -> #" << r->get_id() << ": ";
|
||||
out << mk_pp(n, m) << " -> " << mk_pp(r, m) << "\n";
|
||||
if (m_enodes.empty())
|
||||
return;
|
||||
unsigned count = 0;
|
||||
for (enode * r : m_enodes)
|
||||
if (r->is_root())
|
||||
++count;
|
||||
|
||||
out << "equivalence classes: " << count << "\n";
|
||||
for (enode * r : m_enodes) {
|
||||
if (!r->is_root())
|
||||
continue;
|
||||
out << "#" << enode_pp(r, *this) << "\n";
|
||||
if (r->get_class_size() == 1)
|
||||
continue;
|
||||
for (enode* n : *r) {
|
||||
if (n != r)
|
||||
out << " #" << enode_pp(n, *this) << "\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void context::display_app_enode_map(std::ostream & out) const {
|
||||
return;
|
||||
// mainly useless
|
||||
if (!m_e_internalized_stack.empty()) {
|
||||
out << "expression -> enode:\n";
|
||||
unsigned sz = m_e_internalized_stack.size();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue