mirror of
https://github.com/Z3Prover/z3
synced 2026-03-03 04:06:54 +00:00
solver factories, cleanup solver API, simplified strategic solver, added combined solver
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
bfe6678ad2
commit
8198e62cbd
22 changed files with 720 additions and 492 deletions
|
|
@ -23,6 +23,14 @@ Notes:
|
|||
#include"progress_callback.h"
|
||||
#include"params.h"
|
||||
|
||||
class solver;
|
||||
|
||||
class solver_factory {
|
||||
public:
|
||||
virtual ~solver_factory() {}
|
||||
virtual solver * operator()(ast_manager & m, params_ref const & p, bool proofs_enabled, bool models_enabled, bool unsat_core_enabled, symbol const & logic) = 0;
|
||||
};
|
||||
|
||||
/**
|
||||
\brief Abstract interface for making solvers available in the Z3
|
||||
API and front-ends such as SMT 2.0 and (legacy) SMT 1.0.
|
||||
|
|
@ -34,7 +42,6 @@ Notes:
|
|||
- statistics
|
||||
- results based on check_sat_result API
|
||||
- interruption (set_cancel)
|
||||
- resets
|
||||
*/
|
||||
class solver : public check_sat_result {
|
||||
public:
|
||||
|
|
@ -50,12 +57,6 @@ public:
|
|||
*/
|
||||
virtual void collect_param_descrs(param_descrs & r) {}
|
||||
|
||||
/**
|
||||
\brief Enable/Disable proof production for this solver object.
|
||||
|
||||
It is invoked before init(m, logic).
|
||||
*/
|
||||
virtual void set_produce_proofs(bool f) {}
|
||||
/**
|
||||
\brief Enable/Disable model generation for this solver object.
|
||||
|
||||
|
|
@ -63,23 +64,7 @@ public:
|
|||
The user may optionally invoke it after init(m, logic).
|
||||
*/
|
||||
virtual void set_produce_models(bool f) {}
|
||||
/**
|
||||
\brief Enable/Disable unsat core generation for this solver object.
|
||||
|
||||
It is invoked before init(m, logic).
|
||||
*/
|
||||
virtual void set_produce_unsat_cores(bool f) {}
|
||||
|
||||
/**
|
||||
\brief Initialize the solver object with the given ast_manager and logic.
|
||||
*/
|
||||
virtual void init(ast_manager & m, symbol const & logic) = 0;
|
||||
|
||||
/**
|
||||
\brief Reset the solver internal state. All assertions should be removed.
|
||||
*/
|
||||
virtual void reset() = 0;
|
||||
|
||||
/**
|
||||
\brief Add a new formula to the assertion stack.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue