mirror of
https://github.com/Z3Prover/z3
synced 2025-05-05 14:55:45 +00:00
fixing problems with the new parameter framework
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
f7528456da
commit
9754ccf8a1
7 changed files with 32 additions and 9 deletions
|
@ -307,7 +307,7 @@ class set_option_cmd : public set_get_option_cmd {
|
|||
try {
|
||||
gparams::set(m_option, value);
|
||||
env_params::updt_params();
|
||||
ctx.params().updt_params();
|
||||
ctx.global_params_updated();
|
||||
}
|
||||
catch (gparams::exception ex) {
|
||||
throw cmd_exception(ex.msg());
|
||||
|
@ -517,7 +517,7 @@ public:
|
|||
}
|
||||
else {
|
||||
try {
|
||||
std::string val = gparams::get_value(opt);
|
||||
ctx.regular_stream() << gparams::get_value(opt) << std::endl;
|
||||
}
|
||||
catch (gparams::exception ex) {
|
||||
ctx.print_unsupported(opt);
|
||||
|
|
|
@ -342,6 +342,16 @@ cmd_context::~cmd_context() {
|
|||
m_check_sat_result = 0;
|
||||
}
|
||||
|
||||
void cmd_context::global_params_updated() {
|
||||
m_params.updt_params();
|
||||
if (m_solver) {
|
||||
params_ref p;
|
||||
if (!m_params.m_auto_config)
|
||||
p.set_bool("auto_config", false);
|
||||
m_solver->updt_params(p);
|
||||
}
|
||||
}
|
||||
|
||||
void cmd_context::set_produce_models(bool f) {
|
||||
if (m_solver)
|
||||
m_solver->set_produce_models(f);
|
||||
|
|
|
@ -249,6 +249,7 @@ public:
|
|||
cmd_context(bool main_ctx = true, ast_manager * m = 0, symbol const & l = symbol::null);
|
||||
~cmd_context();
|
||||
context_params & params() { return m_params; }
|
||||
void global_params_updated(); // this method should be invoked when global (and module) params are updated.
|
||||
void set_logic(symbol const & s);
|
||||
bool has_logic() const { return m_logic != symbol::null; }
|
||||
symbol const & get_logic() const { return m_logic; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue