3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-02 09:20:22 +00:00

Revised solver_pool

This commit is contained in:
Arie Gurfinkel 2018-05-16 08:58:37 -07:00
parent c893740e13
commit 49821e7c91
4 changed files with 110 additions and 77 deletions

View file

@ -16,22 +16,16 @@ Author:
Notes:
This is a revision of spacer_virtual_solver by Arie Gurfinkel
it is not quite the same + there are good reasons to do that management at a higher level.
not the same == in spacer, there is an upper bound on the number of base solvers (i.e., number of pools).
Then the pools are distributed between different predicate transformers. I can't just switch to solver_pool,
since this, in most configuration, will result in either few solvers (which is bad for most of my benchmarks),
or one solver per predicate transformer (which is bad for a few benchmarks with many predicates).
This is a revision of spacer_virtual_solver
consolidated with spacer_smt_context_manager
by Arie Gurfinkel
Use this module as a replacement for spacer_smt_context_manager.
--*/
#ifndef SOLVER_POOL_H_
#define SOLVER_POOL_H_
#include "solver/solver.h"
#include "solver/solver_na2as.h"
#include "util/stopwatch.h"
class pool_solver;
@ -49,6 +43,8 @@ class solver_pool {
};
ref<solver> m_base_solver;
unsigned m_num_pools;
unsigned m_current_pool;
sref_vector<solver> m_solvers;
stats m_stats;
@ -62,17 +58,13 @@ class solver_pool {
ptr_vector<solver> get_base_solvers() const;
public:
solver_pool(solver* base_solver);
solver_pool(solver* base_solver, unsigned num_pools);
void collect_statistics(statistics &st) const;
void reset_statistics();
// create a fresh pool solver
solver* mk_solver();
// clone an existing pool solver
solver* clone_solver(solver* pool_solver);
void reset_solver(solver* s);
};