mirror of
https://github.com/Z3Prover/z3
synced 2025-04-24 01:25:31 +00:00
add sat-smt-preprocess module
self-contained pre-processing initialization
This commit is contained in:
parent
85f9c7eefa
commit
500626e814
5 changed files with 104 additions and 7 deletions
|
@ -25,10 +25,12 @@ class rewriter_simplifier : public dependent_expr_simplifier {
|
|||
|
||||
unsigned m_num_steps = 0;
|
||||
params_ref m_params;
|
||||
th_rewriter m_rewriter;
|
||||
|
||||
public:
|
||||
rewriter_simplifier(ast_manager& m, params_ref const& p, dependent_expr_state& fmls):
|
||||
dependent_expr_simplifier(m, fmls) {
|
||||
dependent_expr_simplifier(m, fmls),
|
||||
m_rewriter(m) {
|
||||
updt_params(p);
|
||||
}
|
||||
|
||||
|
@ -39,15 +41,15 @@ public:
|
|||
for (unsigned idx = m_qhead; idx < m_fmls.size(); idx++) {
|
||||
if (m_fmls.inconsistent())
|
||||
break;
|
||||
auto [f, d] = m_fmls[i]();
|
||||
m_rewriter(f, new_curr, new_pr);
|
||||
auto d = m_fmls[idx];
|
||||
m_rewriter(d.fml(), new_curr, new_pr);
|
||||
m_num_steps += m_rewriter.get_num_steps();
|
||||
m_fmls.update(idx, dependent_expr(m, new_curr, d));
|
||||
m_fmls.update(idx, dependent_expr(m, new_curr, d.dep()));
|
||||
}
|
||||
advance_qhead(m_fmls.size());
|
||||
advance_qhead();
|
||||
}
|
||||
void collect_statistics(statistics& st) const override { st.update("simplifier", m_num_steps); }
|
||||
void reset_statistics() override { m_stats.reset(); }
|
||||
void reset_statistics() override { m_num_steps = 0; }
|
||||
void updt_params(params_ref const& p) override { m_params.append(p); m_rewriter.updt_params(m_params); }
|
||||
void collect_param_descrs(param_descrs& r) override { th_rewriter::get_param_descrs(r); }
|
||||
};
|
||||
|
|
|
@ -48,7 +48,7 @@ public:
|
|||
|
||||
void reset_statistics() override {
|
||||
for (auto* s : m_simplifiers)
|
||||
s->reset_statistics(st);
|
||||
s->reset_statistics();
|
||||
}
|
||||
|
||||
void updt_params(params_ref const& p) override {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue