mirror of
https://github.com/Z3Prover/z3
synced 2025-04-24 09:35:32 +00:00
removed front_end_params from cmd_context
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
29cf179364
commit
92acd6d4ee
10 changed files with 71 additions and 67 deletions
|
@ -18,8 +18,6 @@ Notes:
|
|||
--*/
|
||||
#include"strategic_solver.h"
|
||||
#include"scoped_timer.h"
|
||||
#include"front_end_params.h"
|
||||
#include"params2front_end_params.h"
|
||||
#include"ast_smt2_pp.h"
|
||||
|
||||
// minimum verbosity level for portfolio verbose messages
|
||||
|
@ -33,7 +31,6 @@ strategic_solver::ctx::ctx(ast_manager & m):
|
|||
|
||||
strategic_solver::strategic_solver():
|
||||
m_manager(0),
|
||||
m_fparams(0),
|
||||
m_force_tactic(false),
|
||||
m_inc_mode(false),
|
||||
m_check_sat_executed(false),
|
||||
|
@ -50,6 +47,7 @@ strategic_solver::strategic_solver():
|
|||
m_produce_proofs = false;
|
||||
m_produce_models = false;
|
||||
m_produce_unsat_cores = false;
|
||||
m_auto_config = true;
|
||||
}
|
||||
|
||||
strategic_solver::~strategic_solver() {
|
||||
|
@ -99,11 +97,12 @@ void strategic_solver::set_inc_solver(solver * s) {
|
|||
void strategic_solver::updt_params(params_ref const & p) {
|
||||
if (m_inc_solver)
|
||||
m_inc_solver->updt_params(p);
|
||||
if (m_fparams)
|
||||
params2front_end_params(p, *m_fparams);
|
||||
m_params = p;
|
||||
m_auto_config = p.get_bool("auto_config", true);
|
||||
// PARAM-TODO
|
||||
// PROOFS, MODELS, UNSATCORES
|
||||
}
|
||||
|
||||
|
||||
void strategic_solver::collect_param_descrs(param_descrs & r) {
|
||||
if (m_inc_solver)
|
||||
m_inc_solver->collect_param_descrs(r);
|
||||
|
@ -323,10 +322,8 @@ struct aux_timeout_eh : public event_handler {
|
|||
struct strategic_solver::mk_tactic {
|
||||
strategic_solver * m_solver;
|
||||
|
||||
mk_tactic(strategic_solver * s, tactic_factory * f):m_solver(s) {
|
||||
mk_tactic(strategic_solver * s, tactic_factory * f, params_ref const & p):m_solver(s) {
|
||||
ast_manager & m = s->m();
|
||||
params_ref p;
|
||||
front_end_params2params(*s->m_fparams, p);
|
||||
tactic * tct = (*f)(m, p);
|
||||
tct->set_logic(s->m_logic);
|
||||
if (s->m_callback)
|
||||
|
@ -374,7 +371,7 @@ lbool strategic_solver::check_sat(unsigned num_assumptions, expr * const * assum
|
|||
reset_results();
|
||||
m_check_sat_executed = true;
|
||||
if (num_assumptions > 0 || // assumptions were provided
|
||||
(!m_fparams->m_auto_config && !m_force_tactic) // auto config and force_tactic are turned off
|
||||
(!m_auto_config && !m_force_tactic) // auto config and force_tactic are turned off
|
||||
) {
|
||||
// must use incremental solver
|
||||
return check_sat_with_assumptions(num_assumptions, assumptions);
|
||||
|
@ -438,7 +435,7 @@ lbool strategic_solver::check_sat(unsigned num_assumptions, expr * const * assum
|
|||
|
||||
TRACE("strategic_solver", tout << "using goal...\n"; g->display_with_dependencies(tout););
|
||||
|
||||
mk_tactic tct_maker(this, factory);
|
||||
mk_tactic tct_maker(this, factory, m_params);
|
||||
SASSERT(m_curr_tactic);
|
||||
|
||||
proof_ref pr(m());
|
||||
|
|
|
@ -23,7 +23,6 @@ Notes:
|
|||
#include"tactic.h"
|
||||
|
||||
class progress_callback;
|
||||
struct front_end_params;
|
||||
|
||||
/**
|
||||
\brief Implementation of the solver API that supports:
|
||||
|
@ -57,7 +56,7 @@ public:
|
|||
|
||||
private:
|
||||
ast_manager * m_manager;
|
||||
front_end_params * m_fparams;
|
||||
params_ref m_params;
|
||||
symbol m_logic;
|
||||
bool m_force_tactic; // use tactics even when auto_config = false
|
||||
bool m_inc_mode;
|
||||
|
@ -93,6 +92,8 @@ private:
|
|||
bool m_produce_models;
|
||||
bool m_produce_unsat_cores;
|
||||
|
||||
bool m_auto_config;
|
||||
|
||||
progress_callback * m_callback;
|
||||
|
||||
void reset_results();
|
||||
|
|
|
@ -20,7 +20,6 @@ Notes:
|
|||
|
||||
--*/
|
||||
#include"tactic2solver.h"
|
||||
#include"params2front_end_params.h"
|
||||
#include"ast_smt2_pp.h"
|
||||
|
||||
tactic2solver_core::ctx::ctx(ast_manager & m, symbol const & logic):
|
||||
|
@ -94,8 +93,6 @@ lbool tactic2solver_core::check_sat_core(unsigned num_assumptions, expr * const
|
|||
SASSERT(m_ctx);
|
||||
ast_manager & m = m_ctx->m();
|
||||
params_ref p = m_params;
|
||||
if (m_fparams)
|
||||
front_end_params2params(*m_fparams, p);
|
||||
#pragma omp critical (tactic2solver_core)
|
||||
{
|
||||
m_ctx->m_tactic = get_tactic(m, p);
|
||||
|
|
|
@ -43,13 +43,12 @@ class tactic2solver_core : public solver_na2as {
|
|||
ast_manager & m() const { return m_assertions.m(); }
|
||||
};
|
||||
scoped_ptr<ctx> m_ctx;
|
||||
front_end_params * m_fparams;
|
||||
params_ref m_params;
|
||||
bool m_produce_models;
|
||||
bool m_produce_proofs;
|
||||
bool m_produce_unsat_cores;
|
||||
public:
|
||||
tactic2solver_core():m_ctx(0), m_fparams(0), m_produce_models(false), m_produce_proofs(false), m_produce_unsat_cores(false) {}
|
||||
tactic2solver_core():m_ctx(0), m_produce_models(false), m_produce_proofs(false), m_produce_unsat_cores(false) {}
|
||||
virtual ~tactic2solver_core();
|
||||
|
||||
virtual tactic * get_tactic(ast_manager & m, params_ref const & p) = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue