3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-29 11:55:51 +00:00

saved params work

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
Leonardo de Moura 2012-11-29 17:19:12 -08:00
parent c3055207ed
commit cf28cbab0a
130 changed files with 1469 additions and 948 deletions

View file

@ -39,6 +39,22 @@ Notes:
#include"model_evaluator.h"
#include"for_each_expr.h"
std::string smt2_keyword_to_param(symbol const & opt) {
std::string r;
SASSERT(opt.bare_str()[0] == ':');
r = opt.bare_str() + 1;
unsigned sz = static_cast<unsigned>(r.size());
for (unsigned i = 0; i < sz; i++) {
char curr = r[i];
if ('A' <= curr && curr <= 'Z')
r[i] = curr - 'A' + 'a';
else if (curr == '-')
r[i] = '_';
}
TRACE("smt2_keyword_to_param", tout << opt << " -> '" << r << "'\n";);
return r;
}
func_decls::func_decls(ast_manager & m, func_decl * f):
m_decls(TAG(func_decl*, f, 0)) {
m.inc_ref(f);
@ -1400,9 +1416,9 @@ void cmd_context::validate_model() {
get_check_sat_result()->get_model(md);
SASSERT(md.get() != 0);
params_ref p;
p.set_uint(":max-degree", UINT_MAX); // evaluate algebraic numbers of any degree.
p.set_uint(":sort-store", true);
p.set_bool(":model-completion", true);
p.set_uint("max_degree", UINT_MAX); // evaluate algebraic numbers of any degree.
p.set_uint("sort_store", true);
p.set_bool("model_completion", true);
model_evaluator evaluator(*(md.get()), p);
contains_array_op_proc contains_array(m());
{