mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 17:15:31 +00:00
remove unused functionality
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
6b4ddf352d
commit
09dbacdf50
3 changed files with 13 additions and 32 deletions
|
@ -127,7 +127,7 @@ namespace dd {
|
|||
|
||||
void solver::saturate() {
|
||||
simplify();
|
||||
tuned_init();
|
||||
init_saturate();
|
||||
TRACE("dd.solver", display(tout););
|
||||
try {
|
||||
while (!done() && step()) {
|
||||
|
@ -144,11 +144,6 @@ namespace dd {
|
|||
}
|
||||
}
|
||||
|
||||
bool solver::step() {
|
||||
m_stats.m_compute_steps++;
|
||||
return tuned_step();
|
||||
}
|
||||
|
||||
void solver::scoped_process::done() {
|
||||
pdd p = e->poly();
|
||||
SASSERT(!p.is_val());
|
||||
|
@ -167,19 +162,7 @@ namespace dd {
|
|||
SASSERT(!p.is_val());
|
||||
g.push_equation(processed, e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
solver::equation* solver::pick_next() {
|
||||
equation* eq = nullptr;
|
||||
for (auto* curr : m_to_simplify) {
|
||||
if (!eq || is_simpler(*curr, *eq)) {
|
||||
eq = curr;
|
||||
}
|
||||
}
|
||||
if (eq) pop_equation(eq);
|
||||
return eq;
|
||||
}
|
||||
}
|
||||
|
||||
void solver::simplify() {
|
||||
try {
|
||||
|
@ -639,8 +622,9 @@ namespace dd {
|
|||
}
|
||||
}
|
||||
|
||||
bool solver::tuned_step() {
|
||||
equation* e = tuned_pick_next();
|
||||
bool solver::step() {
|
||||
m_stats.m_compute_steps++;
|
||||
equation* e = pick_next();
|
||||
if (!e) return false;
|
||||
scoped_process sd(*this, e);
|
||||
equation& eq = *e;
|
||||
|
@ -660,7 +644,7 @@ namespace dd {
|
|||
return true;
|
||||
}
|
||||
|
||||
void solver::tuned_init() {
|
||||
void solver::init_saturate() {
|
||||
unsigned_vector const& l2v = m.get_level2var();
|
||||
m_level2var.resize(l2v.size());
|
||||
m_var2level.resize(l2v.size());
|
||||
|
@ -714,7 +698,7 @@ namespace dd {
|
|||
watch.shrink(j);
|
||||
}
|
||||
|
||||
solver::equation* solver::tuned_pick_next() {
|
||||
solver::equation* solver::pick_next() {
|
||||
while (m_levelp1 > 0) {
|
||||
unsigned v = m_level2var[m_levelp1-1];
|
||||
equation_vector const& watch = m_watch[v];
|
||||
|
|
|
@ -142,15 +142,12 @@ private:
|
|||
bool is_too_complex(const equation& eq) const { return is_too_complex(eq.poly()); }
|
||||
bool is_too_complex(const pdd& p) const { return p.tree_size() > m_config.m_expr_size_limit; }
|
||||
|
||||
// tuned implementation
|
||||
vector<equation_vector> m_watch; // watch list mapping variables to vector of equations where they occur (generally a subset)
|
||||
unsigned m_levelp1; // index into level+1
|
||||
unsigned_vector m_level2var; // level -> var
|
||||
unsigned_vector m_var2level; // var -> level
|
||||
|
||||
bool tuned_step();
|
||||
void tuned_init();
|
||||
equation* tuned_pick_next();
|
||||
void init_saturate();
|
||||
void simplify_watch(equation const& eq);
|
||||
void add_to_watch(equation& eq);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue