3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-15 23:35:26 +00:00

use iterators on goal and other refactoring

This commit is contained in:
Nikolaj Bjorner 2025-03-16 20:04:04 -07:00
parent eb97fcc273
commit 2e2a2e28df
8 changed files with 77 additions and 53 deletions

View file

@ -34,21 +34,16 @@ class der_tactic : public tactic {
}
void operator()(goal & g) {
bool proofs_enabled = g.proofs_enabled();
tactic_report report("der", g);
expr_ref new_curr(m());
proof_ref new_pr(m());
unsigned size = g.size();
for (unsigned idx = 0; idx < size; idx++) {
unsigned idx = 0;
for (auto [curr, dep, pr] : g) {
if (g.inconsistent())
break;
expr * curr = g.form(idx);
m_r(curr, new_curr, new_pr);
if (proofs_enabled) {
proof * pr = g.pr(idx);
new_pr = m().mk_modus_ponens(pr, new_pr);
}
g.update(idx, new_curr, new_pr, g.dep(idx));
new_pr = m().mk_modus_ponens(pr, new_pr);
g.update(idx++, new_curr, new_pr, dep);
}
g.elim_redundancies();
}