mirror of
https://github.com/Z3Prover/z3
synced 2025-04-27 19:05:51 +00:00
saved params work
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
c3055207ed
commit
cf28cbab0a
130 changed files with 1469 additions and 948 deletions
|
@ -304,7 +304,7 @@ struct cofactor_elim_term_ite::imp {
|
|||
}
|
||||
|
||||
void updt_params(params_ref const & p) {
|
||||
m_max_memory = megabytes_to_bytes(p.get_uint(":max-memory", UINT_MAX));
|
||||
m_max_memory = megabytes_to_bytes(p.get_uint("max_memory", UINT_MAX));
|
||||
}
|
||||
|
||||
void set_cancel(bool f) {
|
||||
|
|
|
@ -90,10 +90,10 @@ struct ctx_simplify_tactic::imp {
|
|||
}
|
||||
|
||||
void updt_params(params_ref const & p) {
|
||||
m_max_memory = megabytes_to_bytes(p.get_uint(":max-memory", UINT_MAX));
|
||||
m_max_steps = p.get_uint(":max-steps", UINT_MAX);
|
||||
m_max_depth = p.get_uint(":max-depth", 1024);
|
||||
m_bail_on_blowup = p.get_bool(":bail-on-blowup", false);
|
||||
m_max_memory = megabytes_to_bytes(p.get_uint("max_memory", UINT_MAX));
|
||||
m_max_steps = p.get_uint("max_steps", UINT_MAX);
|
||||
m_max_depth = p.get_uint("max_depth", 1024);
|
||||
m_bail_on_blowup = p.get_bool("bail_on_blowup", false);
|
||||
}
|
||||
|
||||
void checkpoint() {
|
||||
|
@ -519,7 +519,7 @@ void ctx_simplify_tactic::updt_params(params_ref const & p) {
|
|||
void ctx_simplify_tactic::get_param_descrs(param_descrs & r) {
|
||||
insert_max_memory(r);
|
||||
insert_max_steps(r);
|
||||
r.insert(":max-depth", CPK_UINT, "(default: 1024) maximum term depth.");
|
||||
r.insert("max_depth", CPK_UINT, "(default: 1024) maximum term depth.");
|
||||
}
|
||||
|
||||
void ctx_simplify_tactic::operator()(goal_ref const & in,
|
||||
|
|
|
@ -72,7 +72,7 @@ class elim_term_ite_tactic : public tactic {
|
|||
}
|
||||
|
||||
void updt_params(params_ref const & p) {
|
||||
m_max_memory = megabytes_to_bytes(p.get_uint(":max-memory", UINT_MAX));
|
||||
m_max_memory = megabytes_to_bytes(p.get_uint("max_memory", UINT_MAX));
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -160,7 +160,7 @@ public:
|
|||
virtual void collect_param_descrs(param_descrs & r) {
|
||||
insert_max_memory(r);
|
||||
insert_max_steps(r);
|
||||
r.insert(":max-args", CPK_UINT,
|
||||
r.insert("max_args", CPK_UINT,
|
||||
"(default: 128) maximum number of arguments (per application) that will be considered by the greedy (quadratic) heuristic.");
|
||||
}
|
||||
|
||||
|
|
|
@ -881,8 +881,8 @@ class elim_uncnstr_tactic : public tactic {
|
|||
}
|
||||
|
||||
void updt_params(params_ref const & p) {
|
||||
m_max_memory = megabytes_to_bytes(p.get_uint(":max-memory", UINT_MAX));
|
||||
m_max_steps = p.get_uint(":max-steps", UINT_MAX);
|
||||
m_max_memory = megabytes_to_bytes(p.get_uint("max_memory", UINT_MAX));
|
||||
m_max_steps = p.get_uint("max_steps", UINT_MAX);
|
||||
}
|
||||
|
||||
ast_manager & m() { return m_manager; }
|
||||
|
|
|
@ -120,7 +120,7 @@ tactic * mk_snf_tactic(ast_manager & m, params_ref const & p) {
|
|||
|
||||
tactic * mk_nnf_tactic(ast_manager & m, params_ref const & p) {
|
||||
params_ref new_p(p);
|
||||
new_p.set_sym(":nnf-mode", symbol("full"));
|
||||
new_p.set_sym("nnf_mode", symbol("full"));
|
||||
TRACE("nnf", tout << "mk_nnf: " << new_p << "\n";);
|
||||
return using_params(mk_snf_tactic(m, p), new_p);
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@ class propagate_values_tactic : public tactic {
|
|||
}
|
||||
|
||||
void updt_params_core(params_ref const & p) {
|
||||
m_max_rounds = p.get_uint(":max-rounds", 4);
|
||||
m_max_rounds = p.get_uint("max_rounds", 4);
|
||||
}
|
||||
|
||||
void updt_params(params_ref const & p) {
|
||||
|
@ -237,7 +237,7 @@ public:
|
|||
|
||||
virtual void collect_param_descrs(param_descrs & r) {
|
||||
th_rewriter::get_param_descrs(r);
|
||||
r.insert(":max-rounds", CPK_UINT, "(default: 2) maximum number of rounds.");
|
||||
r.insert("max_rounds", CPK_UINT, "(default: 2) maximum number of rounds.");
|
||||
}
|
||||
|
||||
virtual void operator()(goal_ref const & in,
|
||||
|
|
|
@ -138,7 +138,7 @@ tactic * mk_simplify_tactic(ast_manager & m, params_ref const & p) {
|
|||
|
||||
tactic * mk_elim_and_tactic(ast_manager & m, params_ref const & p) {
|
||||
params_ref xp = p;
|
||||
xp.set_bool(":elim-and", true);
|
||||
xp.set_bool("elim_and", true);
|
||||
return using_params(mk_simplify_tactic(m, xp), xp);
|
||||
}
|
||||
|
||||
|
|
|
@ -71,9 +71,9 @@ class solve_eqs_tactic : public tactic {
|
|||
ast_manager & m() const { return m_manager; }
|
||||
|
||||
void updt_params(params_ref const & p) {
|
||||
m_ite_solver = p.get_bool(":ite-solver", true);
|
||||
m_theory_solver = p.get_bool(":theory-solver", true);
|
||||
m_max_occs = p.get_uint(":solve-eqs-max-occs", UINT_MAX);
|
||||
m_ite_solver = p.get_bool("ite_solver", true);
|
||||
m_theory_solver = p.get_bool("theory_solver", true);
|
||||
m_max_occs = p.get_uint("solve_eqs_max_occs", UINT_MAX);
|
||||
}
|
||||
|
||||
void set_cancel(bool f) {
|
||||
|
@ -732,9 +732,9 @@ public:
|
|||
}
|
||||
|
||||
virtual void collect_param_descrs(param_descrs & r) {
|
||||
r.insert(":solve-eqs-max-occs", CPK_UINT, "(default: infty) maximum number of occurrences for considering a variable for gaussian eliminations.");
|
||||
r.insert(":theory-solver", CPK_BOOL, "(default: true) use theory solvers.");
|
||||
r.insert(":ite-solver", CPK_BOOL, "(default: true) use if-then-else solver.");
|
||||
r.insert("solve_eqs_max_occs", CPK_UINT, "(default: infty) maximum number of occurrences for considering a variable for gaussian eliminations.");
|
||||
r.insert("theory_solver", CPK_BOOL, "(default: true) use theory solvers.");
|
||||
r.insert("ite_solver", CPK_BOOL, "(default: true) use if-then-else solver.");
|
||||
}
|
||||
|
||||
virtual void operator()(goal_ref const & in,
|
||||
|
|
|
@ -96,11 +96,11 @@ public:
|
|||
}
|
||||
|
||||
virtual void updt_params(params_ref const & p) {
|
||||
m_largest_clause = p.get_bool(":split-largest-clause", false);
|
||||
m_largest_clause = p.get_bool("split_largest_clause", false);
|
||||
}
|
||||
|
||||
virtual void collect_param_descrs(param_descrs & r) {
|
||||
r.insert(":split-largest-clause", CPK_BOOL, "(default: false) split the largest clause in the goal.");
|
||||
r.insert("split_largest_clause", CPK_BOOL, "(default: false) split the largest clause in the goal.");
|
||||
}
|
||||
|
||||
virtual void operator()(goal_ref const & in,
|
||||
|
|
|
@ -122,12 +122,12 @@ class tseitin_cnf_tactic : public tactic {
|
|||
}
|
||||
|
||||
void updt_params(params_ref const & p) {
|
||||
m_common_patterns = p.get_bool(":common-patterns", true);
|
||||
m_distributivity = p.get_bool(":distributivity", true);
|
||||
m_distributivity_blowup = p.get_uint(":distributivity-blowup", 32);
|
||||
m_ite_chains = p.get_bool(":ite-chains", true);
|
||||
m_ite_extra = p.get_bool(":ite-extra", true);
|
||||
m_max_memory = megabytes_to_bytes(p.get_uint(":max-memory", UINT_MAX));
|
||||
m_common_patterns = p.get_bool("common_patterns", true);
|
||||
m_distributivity = p.get_bool("distributivity", true);
|
||||
m_distributivity_blowup = p.get_uint("distributivity_blowup", 32);
|
||||
m_ite_chains = p.get_bool("ite_chains", true);
|
||||
m_ite_extra = p.get_bool("ite_extra", true);
|
||||
m_max_memory = megabytes_to_bytes(p.get_uint("max_memory", UINT_MAX));
|
||||
}
|
||||
|
||||
void push_frame(app * n) { m_frame_stack.push_back(frame(n)); }
|
||||
|
@ -881,11 +881,11 @@ public:
|
|||
|
||||
virtual void collect_param_descrs(param_descrs & r) {
|
||||
insert_max_memory(r);
|
||||
r.insert(":common-patterns", CPK_BOOL, "(default: true) minimize the number of auxiliary variables during CNF encoding by identifing commonly used patterns");
|
||||
r.insert(":distributivity", CPK_BOOL, "(default: true) minimize the number of auxiliary variables during CNF encoding by applying distributivity over unshared subformulas");
|
||||
r.insert(":distributivity-blowup", CPK_UINT, "(default: 32) maximum overhead for applying distributivity during CNF encoding");
|
||||
r.insert("ite-chaing", CPK_BOOL, "(default: true) minimize the number of auxiliary variables during CNF encoding by identifing if-then-else chains");
|
||||
r.insert(":ite-extra", CPK_BOOL, "(default: true) add redundant clauses (that improve unit propagation) when encoding if-then-else formulas");
|
||||
r.insert("common_patterns", CPK_BOOL, "(default: true) minimize the number of auxiliary variables during CNF encoding by identifing commonly used patterns");
|
||||
r.insert("distributivity", CPK_BOOL, "(default: true) minimize the number of auxiliary variables during CNF encoding by applying distributivity over unshared subformulas");
|
||||
r.insert("distributivity_blowup", CPK_UINT, "(default: 32) maximum overhead for applying distributivity during CNF encoding");
|
||||
r.insert("ite_chaing", CPK_BOOL, "(default: true) minimize the number of auxiliary variables during CNF encoding by identifing if-then-else chains");
|
||||
r.insert("ite_extra", CPK_BOOL, "(default: true) add redundant clauses (that improve unit propagation) when encoding if-then-else formulas");
|
||||
}
|
||||
|
||||
virtual void operator()(goal_ref const & in,
|
||||
|
@ -934,8 +934,8 @@ tactic * mk_tseitin_cnf_core_tactic(ast_manager & m, params_ref const & p) {
|
|||
|
||||
tactic * mk_tseitin_cnf_tactic(ast_manager & m, params_ref const & p) {
|
||||
params_ref simp_p = p;
|
||||
simp_p.set_bool(":elim-and", true);
|
||||
simp_p.set_bool(":blast-distinct", true);
|
||||
simp_p.set_bool("elim_and", true);
|
||||
simp_p.set_bool("blast_distinct", true);
|
||||
return or_else(mk_tseitin_cnf_core_tactic(m, p),
|
||||
and_then(using_params(mk_simplify_tactic(m, p), simp_p),
|
||||
mk_tseitin_cnf_core_tactic(m, p)));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue