3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-06-28 17:08:45 +00:00

extract stats with finalize for parallel mode

This commit is contained in:
Nikolaj Bjorner 2024-12-13 09:22:30 -08:00
parent b4295620b3
commit 538f74d64c
5 changed files with 18 additions and 30 deletions

View file

@ -99,7 +99,6 @@ namespace sls {
if (!m_ddfw)
return;
m_result = m_ddfw->check(0, nullptr);
m_ddfw->collect_statistics(m_st);
IF_VERBOSE(1, verbose_stream() << "sls-result " << m_result << "\n");
for (auto v : m_shared_bool_vars) {
auto w = m_smt_bool_var2sls_bool_var[v];
@ -115,7 +114,7 @@ namespace sls {
m_ddfw->rlimit().pop();
}
void smt_plugin::finalize(model_ref& mdl) {
void smt_plugin::finalize(model_ref& mdl, ::statistics& st) {
auto* d = m_ddfw;
if (!d)
return;
@ -127,6 +126,7 @@ namespace sls {
m_thread.join();
SASSERT(m_completed);
mdl = nullptr;
m_ddfw->collect_statistics(st);
if (m_result == l_true && m_sls_model) {
ast_translation tr(m_sls, m);
mdl = m_sls_model->translate(tr);
@ -139,10 +139,6 @@ namespace sls {
dealloc(d);
}
void smt_plugin::collect_statistics(::statistics& st) const {
st.copy(m_st);
}
void smt_plugin::get_shared_clauses(vector<sat::literal_vector>& _clauses) {
_clauses.reset();
for (auto const& clause : clauses()) {

View file

@ -65,7 +65,6 @@ namespace sls {
sat::literal_vector m_units;
model_ref m_sls_model;
::statistics m_st;
bool m_new_clause_added = false;
unsigned m_min_unsat_size = UINT_MAX;
@ -106,8 +105,7 @@ namespace sls {
// interface to calling solver:
void check(expr_ref_vector const& fmls, vector <sat::literal_vector> const& clauses);
void collect_statistics(::statistics& st) const;
void finalize(model_ref& md);
void finalize(model_ref& md, ::statistics& st);
void get_shared_clauses(vector<sat::literal_vector>& clauses);
void updt_params(params_ref& p) {}
std::ostream& display(std::ostream& out) override;