3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-24 09:35:32 +00:00
This commit is contained in:
Nikolaj Bjorner 2024-02-29 16:59:03 -08:00
parent 5be8872d6a
commit 22616da63b
9 changed files with 101 additions and 55 deletions

View file

@ -42,6 +42,10 @@ struct simplify_tactic::imp {
m_num_steps = 0;
}
void collect_statistics(statistics& st) {
st.update("rewriter.steps", m_num_steps);
}
void operator()(goal & g) {
tactic_report report("simplifier", g);
m_num_steps = 0;
@ -108,6 +112,11 @@ void simplify_tactic::cleanup() {
new (m_imp) imp(m, p);
}
void simplify_tactic::collect_statistics(statistics& st) const {
if (m_imp)
m_imp->collect_statistics(st);
}
unsigned simplify_tactic::get_num_steps() const {
return m_imp->get_num_steps();
}

View file

@ -81,6 +81,8 @@ public:
static void get_param_descrs(param_descrs & r);
void collect_param_descrs(param_descrs & r) override { get_param_descrs(r); }
void collect_statistics(statistics& st) const override;
void operator()(goal_ref const & in, goal_ref_buffer & result) override;

View file

@ -62,7 +62,7 @@ public:
if (m_simp)
pop(1);
}
/**
* size(), [](), update() and inconsistent() implement the abstract interface of dependent_expr_state
*/
@ -140,6 +140,12 @@ public:
cleanup();
}
void collect_statistics(statistics& st) const override {
if (m_simp)
m_simp->collect_statistics(st);
st.copy(m_st);
}
void cleanup() override {
if (m_simp) {
m_simp->collect_statistics(m_st);
@ -151,13 +157,6 @@ public:
m_dep = dependent_expr(m, m.mk_true(), nullptr, nullptr);
}
void collect_statistics(statistics& st) const override {
if (m_simp)
m_simp->collect_statistics(st);
else
st.copy(m_st);
}
void reset_statistics() override {
if (m_simp)
m_simp->reset_statistics();

View file

@ -62,7 +62,7 @@ public:
*/
virtual void operator()(goal_ref const & in, goal_ref_buffer& result) = 0;
virtual void collect_statistics(statistics & st) const { }
virtual void collect_statistics(statistics& st) const { }
virtual void reset_statistics() {}
virtual void cleanup() = 0;
virtual void reset() { cleanup(); }
@ -130,6 +130,7 @@ public:
void cleanup() override {}
tactic * translate(ast_manager & m) override { return this; }
char const* name() const override { return "skip"; }
void collect_statistics(statistics& st) const override {}
};
tactic * mk_skip_tactic();

View file

@ -1190,6 +1190,9 @@ public:
tactic * translate(ast_manager & m) override {
return this;
}
void collect_statistics(statistics& st) const override {
}
};
tactic * fail_if(probe * p) {
@ -1216,6 +1219,7 @@ public:
}
tactic * translate(ast_manager & m) override { return translate_core<if_no_proofs_tactical>(m); }
};
class if_no_unsat_cores_tactical : public unary_tactical {