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

exposed solver object param descrs

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
Leonardo de Moura 2012-10-12 09:42:45 -07:00
parent f7bcd40137
commit 44db8c083d
4 changed files with 19 additions and 10 deletions

View file

@ -146,6 +146,12 @@ public:
if (m_context)
m_context->set_progress_callback(callback);
}
virtual void collect_param_descrs(param_descrs & r) {
smt::solver::collect_param_descrs(r);
}
};
solver * mk_non_incremental_smt_solver(cmd_context & ctx) {

View file

@ -181,10 +181,6 @@ namespace smt {
void updt_params(params_ref const & p) {
params2front_end_params(p, fparams());
}
void collect_param_descrs(param_descrs & d) {
solver_front_end_params_descrs(d);
}
};
solver::solver(ast_manager & m, front_end_params & fp, params_ref const & p) {
@ -346,8 +342,8 @@ namespace smt {
return m_imp->updt_params(p);
}
void solver::collect_param_descrs(param_descrs & d) const {
return m_imp->collect_param_descrs(d);
void solver::collect_param_descrs(param_descrs & d) {
solver_front_end_params_descrs(d);
}
context & solver::kernel() {

View file

@ -228,7 +228,7 @@ namespace smt {
/**
\brief Collect a description of the configuration parameters.
*/
void collect_param_descrs(param_descrs & d) const;
static void collect_param_descrs(param_descrs & d);
/**
\brief Return a reference to the kernel.

View file

@ -55,9 +55,16 @@ public:
}
virtual void collect_param_descrs(param_descrs & r) {
if (m_context == 0)
return;
m_context->collect_param_descrs(r);
if (m_context == 0) {
ast_manager m;
m.register_decl_plugins();
front_end_params p;
smt::solver s(m, p);
s.collect_param_descrs(r);
}
else {
m_context->collect_param_descrs(r);
}
}
virtual void init(ast_manager & m, symbol const & logic) {