mirror of
https://github.com/Z3Prover/z3
synced 2025-04-14 04:48:45 +00:00
household chores - move to iterators
This commit is contained in:
parent
dee3cf8de4
commit
93cf989b78
|
@ -169,10 +169,8 @@ class degree_shift_tactic : public tactic {
|
||||||
void collect(goal const & g) {
|
void collect(goal const & g) {
|
||||||
m_var2degree.reset();
|
m_var2degree.reset();
|
||||||
expr_fast_mark1 visited;
|
expr_fast_mark1 visited;
|
||||||
unsigned sz = g.size();
|
for (auto [f, d, p] : g)
|
||||||
for (unsigned i = 0; i < sz; i++) {
|
collect(f, visited);
|
||||||
collect(g.form(i), visited);
|
|
||||||
}
|
|
||||||
|
|
||||||
TRACE("degree_shift", display_candidates(tout););
|
TRACE("degree_shift", display_candidates(tout););
|
||||||
}
|
}
|
||||||
|
|
|
@ -216,10 +216,8 @@ class fix_dl_var_tactic : public tactic {
|
||||||
try {
|
try {
|
||||||
expr_fast_mark1 visited;
|
expr_fast_mark1 visited;
|
||||||
flet<expr_fast_mark1*> _visited(m_visited, &visited);
|
flet<expr_fast_mark1*> _visited(m_visited, &visited);
|
||||||
unsigned sz = g.size();
|
for (auto [f, d, p] : g)
|
||||||
for (unsigned i = 0; i < sz; i++) {
|
process(f);
|
||||||
process(g.form(i));
|
|
||||||
}
|
|
||||||
return most_occs();
|
return most_occs();
|
||||||
}
|
}
|
||||||
catch (const failed &) {
|
catch (const failed &) {
|
||||||
|
@ -268,15 +266,13 @@ class fix_dl_var_tactic : public tactic {
|
||||||
|
|
||||||
expr_ref new_curr(m);
|
expr_ref new_curr(m);
|
||||||
proof_ref new_pr(m);
|
proof_ref new_pr(m);
|
||||||
unsigned size = g->size();
|
unsigned idx = 0;
|
||||||
for (unsigned idx = 0; !g->inconsistent() && idx < size; idx++) {
|
for (auto [curr, d, p] : *g) {
|
||||||
expr * curr = g->form(idx);
|
if (g->inconsistent())
|
||||||
|
break;
|
||||||
m_rw(curr, new_curr, new_pr);
|
m_rw(curr, new_curr, new_pr);
|
||||||
if (produce_proofs) {
|
new_pr = m.mk_modus_ponens(p, new_pr);
|
||||||
proof * pr = g->pr(idx);
|
g->update(idx++, new_curr, new_pr, d);
|
||||||
new_pr = m.mk_modus_ponens(pr, new_pr);
|
|
||||||
}
|
|
||||||
g->update(idx, new_curr, new_pr, g->dep(idx));
|
|
||||||
}
|
}
|
||||||
g->inc_depth();
|
g->inc_depth();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue