mirror of
https://github.com/Z3Prover/z3
synced 2025-09-05 01:27:41 +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
|
@ -1162,7 +1162,7 @@ public:
|
|||
: dparser(ctx, ctx.get_manager()),
|
||||
m_bool_sort(ctx.get_manager()),
|
||||
m_short_sort(ctx.get_manager()),
|
||||
m_use_map_names(ctx.get_params().get_bool(":use-map-names", true)) {
|
||||
m_use_map_names(ctx.get_params().get_bool("use_map_names", true)) {
|
||||
}
|
||||
~wpa_parser_impl() {
|
||||
reset_dealloc_values(m_sort_contents);
|
||||
|
|
|
@ -71,7 +71,7 @@ namespace datalog {
|
|||
m_ctx.set_output_predicate(m_query_pred);
|
||||
m_ctx.apply_default_transformation(mc, m_pc);
|
||||
|
||||
if (m_ctx.get_params().get_bool(":slice", true)) {
|
||||
if (m_ctx.get_params().get_bool("slice", true)) {
|
||||
datalog::rule_transformer transformer(m_ctx);
|
||||
datalog::mk_slice* slice = alloc(datalog::mk_slice, m_ctx);
|
||||
transformer.register_plugin(slice);
|
||||
|
|
|
@ -210,7 +210,7 @@ public:
|
|||
datalog::context& dlctx = m_dl_ctx->dlctx();
|
||||
set_background(ctx);
|
||||
dlctx.updt_params(m_params);
|
||||
unsigned timeout = m_params.get_uint(":timeout", UINT_MAX);
|
||||
unsigned timeout = m_params.get_uint("timeout", UINT_MAX);
|
||||
cancel_eh<datalog::context> eh(dlctx);
|
||||
lbool status = l_undef;
|
||||
{
|
||||
|
@ -266,9 +266,9 @@ public:
|
|||
virtual void init_pdescrs(cmd_context & ctx, param_descrs & p) {
|
||||
m_dl_ctx->dlctx().collect_params(p);
|
||||
insert_timeout(p);
|
||||
p.insert(":print-answer", CPK_BOOL, "(default: false) print answer instance(s) to query.");
|
||||
p.insert(":print-certificate", CPK_BOOL, "(default: false) print certificate for reachability or non-reachability.");
|
||||
p.insert(":print-statistics", CPK_BOOL, "(default: false) print statistics.");
|
||||
p.insert("print_answer", CPK_BOOL, "(default: false) print answer instance(s) to query.");
|
||||
p.insert("print_certificate", CPK_BOOL, "(default: false) print certificate for reachability or non-reachability.");
|
||||
p.insert("print_statistics", CPK_BOOL, "(default: false) print statistics.");
|
||||
}
|
||||
|
||||
|
||||
|
@ -283,7 +283,7 @@ private:
|
|||
}
|
||||
|
||||
void print_answer(cmd_context& ctx) {
|
||||
if (m_params.get_bool(":print-answer", false)) {
|
||||
if (m_params.get_bool("print_answer", false)) {
|
||||
datalog::context& dlctx = m_dl_ctx->dlctx();
|
||||
ast_manager& m = ctx.m();
|
||||
expr_ref query_result(dlctx.get_answer_as_formula(), m);
|
||||
|
@ -298,7 +298,7 @@ private:
|
|||
}
|
||||
|
||||
void print_statistics(cmd_context& ctx) {
|
||||
if (m_params.get_bool(":print-statistics", false)) {
|
||||
if (m_params.get_bool("print_statistics", false)) {
|
||||
statistics st;
|
||||
datalog::context& dlctx = m_dl_ctx->dlctx();
|
||||
unsigned long long max_mem = memory::get_max_used_memory();
|
||||
|
@ -312,7 +312,7 @@ private:
|
|||
}
|
||||
|
||||
void print_certificate(cmd_context& ctx) {
|
||||
if (m_params.get_bool(":print-certificate", false)) {
|
||||
if (m_params.get_bool("print_certificate", false)) {
|
||||
datalog::context& dlctx = m_dl_ctx->dlctx();
|
||||
if (!dlctx.display_certificate(ctx.regular_stream())) {
|
||||
throw cmd_exception("certificates are not supported for the selected engine");
|
||||
|
|
|
@ -960,55 +960,55 @@ namespace datalog {
|
|||
}
|
||||
|
||||
void context::collect_params(param_descrs& p) {
|
||||
p.insert(":engine", CPK_SYMBOL, "(default: automatically configured) select 'datalog', PDR 'pdr' engine.");
|
||||
p.insert(":bit-blast", CPK_BOOL, "(default: false) bit-blast bit-vectors (for PDR engine).");
|
||||
p.insert(":default-table", CPK_SYMBOL, "default table implementation: 'sparse' (default), 'hashtable', 'bitvector', 'interval'");
|
||||
p.insert(":default-relation", CPK_SYMBOL, "default relation implementation: 'external_relation', 'pentagon'");
|
||||
p.insert("engine", CPK_SYMBOL, "(default: automatically configured) select 'datalog', PDR 'pdr' engine.");
|
||||
p.insert("bit_blast", CPK_BOOL, "(default: false) bit-blast bit-vectors (for PDR engine).");
|
||||
p.insert("default_table", CPK_SYMBOL, "default table implementation: 'sparse' (default), 'hashtable', 'bitvector', 'interval'");
|
||||
p.insert("default_relation", CPK_SYMBOL, "default relation implementation: 'external_relation', 'pentagon'");
|
||||
|
||||
p.insert(":generate-explanations", CPK_BOOL, "if true, signature of relations will be extended to contain explanations for facts");
|
||||
p.insert(":explanations-on-relation-level", CPK_BOOL, "if true, explanations are generated as history of each relation, "
|
||||
"rather than per fact (:generate-explanations must be set to true for this option to have any effect)");
|
||||
p.insert("generate_explanations", CPK_BOOL, "if true, signature of relations will be extended to contain explanations for facts");
|
||||
p.insert("explanations_on_relation_level", CPK_BOOL, "if true, explanations are generated as history of each relation, "
|
||||
"rather than per fact (generate_explanations must be set to true for this option to have any effect)");
|
||||
|
||||
p.insert(":magic-sets-for-queries", CPK_BOOL, "magic set transformation will be used for queries");
|
||||
p.insert(":unbound-compressor", CPK_BOOL, "auxiliary relations will be introduced to avoid unbound variables in rule heads");
|
||||
p.insert(":similarity-compressor", CPK_BOOL, "rules that differ only in values of constants will be merged into a single rule");
|
||||
p.insert(":similarity-compressor-threshold", CPK_UINT, "if :dl-similiaryt-compressor is on, this value determines how many "
|
||||
p.insert("magic_sets_for_queries", CPK_BOOL, "magic set transformation will be used for queries");
|
||||
p.insert("unbound_compressor", CPK_BOOL, "auxiliary relations will be introduced to avoid unbound variables in rule heads");
|
||||
p.insert("similarity_compressor", CPK_BOOL, "rules that differ only in values of constants will be merged into a single rule");
|
||||
p.insert("similarity_compressor_threshold", CPK_UINT, "if dl_similiaryt_compressor is on, this value determines how many "
|
||||
"similar rules there must be in order for them to be merged");
|
||||
|
||||
p.insert(":all-or-nothing-deltas", CPK_BOOL, "compile rules so that it is enough for the delta relation in union and widening "
|
||||
p.insert("all_or_nothing_deltas", CPK_BOOL, "compile rules so that it is enough for the delta relation in union and widening "
|
||||
"operations to determine only whether the updated relation was modified or not");
|
||||
p.insert(":compile-with-widening", CPK_BOOL, "widening will be used to compile recursive rules");
|
||||
p.insert(":eager-emptiness-checking", CPK_BOOL, "emptiness of affected relations will be checked after each instruction, "
|
||||
p.insert("compile_with_widening", CPK_BOOL, "widening will be used to compile recursive rules");
|
||||
p.insert("eager_emptiness_checking", CPK_BOOL, "emptiness of affected relations will be checked after each instruction, "
|
||||
"so that we may ommit unnecessary instructions");
|
||||
p.insert(":default-table-checked", CPK_BOOL,
|
||||
"if true, the detault table will be :default-table inside a wrapper that checks that "
|
||||
"its results are the same as of :default-table-checker table");
|
||||
p.insert("default_table_checked", CPK_BOOL,
|
||||
"if true, the detault table will be default_table inside a wrapper that checks that "
|
||||
"its results are the same as of default_table_checker table");
|
||||
|
||||
|
||||
p.insert(":initial-restart-timeout", CPK_UINT, "length of saturation run before the first restart (in ms); zero means no restarts");
|
||||
p.insert(":restart-timeout-quotient", CPK_UINT, "restart timeout will be multiplied by this number after each restart");
|
||||
p.insert(":use-map-names", CPK_BOOL, "use names from map files when displaying tuples");
|
||||
p.insert("initial_restart_timeout", CPK_UINT, "length of saturation run before the first restart (in ms); zero means no restarts");
|
||||
p.insert("restart_timeout_quotient", CPK_UINT, "restart timeout will be multiplied by this number after each restart");
|
||||
p.insert("use_map_names", CPK_BOOL, "use names from map files when displaying tuples");
|
||||
|
||||
p.insert(":output-profile", CPK_BOOL, "determines whether profile informations should be output when outputting Datalog rules or instructions");
|
||||
p.insert(":output-tuples", CPK_BOOL, "determines whether tuples for output predicates should be output");
|
||||
p.insert(":profile-timeout-milliseconds", CPK_UINT, "instructions and rules that took less than the threshold will not be printed when printed the instruction/rule list");
|
||||
p.insert("output_profile", CPK_BOOL, "determines whether profile informations should be output when outputting Datalog rules or instructions");
|
||||
p.insert("output_tuples", CPK_BOOL, "determines whether tuples for output predicates should be output");
|
||||
p.insert("profile_timeout_milliseconds", CPK_UINT, "instructions and rules that took less than the threshold will not be printed when printed the instruction/rule list");
|
||||
|
||||
p.insert(":print-with-fixedpoint-extensions", CPK_BOOL, "(default true) use SMT-LIB2 fixedpoint extensions, instead of pure SMT2, when printing rules");
|
||||
p.insert(":print-low-level-smt2", CPK_BOOL, "(default false) use (faster) low-level SMT2 printer (the printer is scalable but the result may not be as readable)");
|
||||
p.insert("print_with_fixedpoint_extensions", CPK_BOOL, "(default true) use SMT-LIB2 fixedpoint extensions, instead of pure SMT2, when printing rules");
|
||||
p.insert("print_low_level_smt2", CPK_BOOL, "(default false) use (faster) low-level SMT2 printer (the printer is scalable but the result may not be as readable)");
|
||||
|
||||
PRIVATE_PARAMS(
|
||||
p.insert(":dbg-fpr-nonempty-relation-signature", CPK_BOOL,
|
||||
p.insert("dbg_fpr_nonempty_relation_signature", CPK_BOOL,
|
||||
"if true, finite_product_relation will attempt to avoid creating inner relation with empty signature "
|
||||
"by putting in half of the table columns, if it would have been empty otherwise");
|
||||
|
||||
p.insert(":smt-relation-ground-recursive", CPK_BOOL, "Ensure recursive relation is ground in union");
|
||||
p.insert("smt_relation_ground_recursive", CPK_BOOL, "Ensure recursive relation is ground in union");
|
||||
);
|
||||
|
||||
p.insert(":fix-unbound-vars", CPK_BOOL, "fix unbound variables in tail");
|
||||
p.insert(":default-table-checker", CPK_SYMBOL, "see :default-table-checked");
|
||||
p.insert(":inline-linear", CPK_BOOL, "(default true) try linear inlining method");
|
||||
p.insert(":inline-eager", CPK_BOOL, "(default true) try eager inlining of rules");
|
||||
PRIVATE_PARAMS(p.insert(":inline-linear-branch", CPK_BOOL, "try linear inlining method with potential expansion"););
|
||||
p.insert("fix_unbound_vars", CPK_BOOL, "fix unbound variables in tail");
|
||||
p.insert("default_table_checker", CPK_SYMBOL, "see default_table_checked");
|
||||
p.insert("inline_linear", CPK_BOOL, "(default true) try linear inlining method");
|
||||
p.insert("inline_eager", CPK_BOOL, "(default true) try eager inlining of rules");
|
||||
PRIVATE_PARAMS(p.insert("inline_linear_branch", CPK_BOOL, "try linear inlining method with potential expansion"););
|
||||
|
||||
pdr::dl_interface::collect_params(p);
|
||||
bmc::collect_params(p);
|
||||
|
@ -1189,7 +1189,7 @@ namespace datalog {
|
|||
};
|
||||
|
||||
void context::configure_engine() {
|
||||
symbol e = m_params.get_sym(":engine", symbol());
|
||||
symbol e = m_params.get_sym("engine", symbol());
|
||||
|
||||
if (e == symbol("datalog")) {
|
||||
m_engine = DATALOG_ENGINE;
|
||||
|
@ -1650,8 +1650,8 @@ namespace datalog {
|
|||
expr_ref fml(m);
|
||||
expr_ref_vector rules(m);
|
||||
svector<symbol> names;
|
||||
bool use_fixedpoint_extensions = m_params.get_bool(":print-with-fixedpoint-extensions", true);
|
||||
bool print_low_level = m_params.get_bool(":print-low-level-smt2", false);
|
||||
bool use_fixedpoint_extensions = m_params.get_bool("print_with_fixedpoint_extensions", true);
|
||||
bool print_low_level = m_params.get_bool("print_low_level_smt2", false);
|
||||
|
||||
#define PP(_e_) if (print_low_level) out << mk_smt_pp(_e_, m); else ast_smt2_pp(out, _e_, env, params);
|
||||
|
||||
|
|
|
@ -156,25 +156,25 @@ namespace datalog {
|
|||
var_subst & get_var_subst() { return m_var_subst; }
|
||||
dl_decl_util & get_decl_util() { return m_decl_util; }
|
||||
|
||||
bool output_profile() const { return m_params.get_bool(":output-profile", false); }
|
||||
bool fix_unbound_vars() const { return m_params.get_bool(":fix-unbound-vars", false); }
|
||||
symbol default_table() const { return m_params.get_sym(":default-table", symbol("sparse")); }
|
||||
symbol default_relation() const { return m_params.get_sym(":default-relation", external_relation_plugin::get_name()); }
|
||||
symbol default_table_checker() const { return m_params.get_sym(":default-table-checker", symbol("sparse")); }
|
||||
bool default_table_checked() const { return m_params.get_bool(":default-table-checked", false); }
|
||||
bool dbg_fpr_nonempty_relation_signature() const { return m_params.get_bool(":dbg-fpr-nonempty-relation-signatures", false); }
|
||||
unsigned dl_profile_milliseconds_threshold() const { return m_params.get_uint(":profile-milliseconds-threshold", 0); }
|
||||
bool all_or_nothing_deltas() const { return m_params.get_bool(":all-or-nothing-deltas", false); }
|
||||
bool compile_with_widening() const { return m_params.get_bool(":compile-with-widening", false); }
|
||||
bool unbound_compressor() const { return m_params.get_bool(":unbound-compressor", true); }
|
||||
bool similarity_compressor() const { return m_params.get_bool(":similarity-compressor", true); }
|
||||
unsigned similarity_compressor_threshold() const { return m_params.get_uint(":similarity-compressor-threshold", 11); }
|
||||
bool output_profile() const { return m_params.get_bool("output_profile", false); }
|
||||
bool fix_unbound_vars() const { return m_params.get_bool("fix_unbound_vars", false); }
|
||||
symbol default_table() const { return m_params.get_sym("default_table", symbol("sparse")); }
|
||||
symbol default_relation() const { return m_params.get_sym("default_relation", external_relation_plugin::get_name()); }
|
||||
symbol default_table_checker() const { return m_params.get_sym("default_table_checker", symbol("sparse")); }
|
||||
bool default_table_checked() const { return m_params.get_bool("default_table_checked", false); }
|
||||
bool dbg_fpr_nonempty_relation_signature() const { return m_params.get_bool("dbg_fpr_nonempty_relation_signatures", false); }
|
||||
unsigned dl_profile_milliseconds_threshold() const { return m_params.get_uint("profile_milliseconds_threshold", 0); }
|
||||
bool all_or_nothing_deltas() const { return m_params.get_bool("all_or_nothing_deltas", false); }
|
||||
bool compile_with_widening() const { return m_params.get_bool("compile_with_widening", false); }
|
||||
bool unbound_compressor() const { return m_params.get_bool("unbound_compressor", true); }
|
||||
bool similarity_compressor() const { return m_params.get_bool("similarity_compressor", true); }
|
||||
unsigned similarity_compressor_threshold() const { return m_params.get_uint("similarity_compressor_threshold", 11); }
|
||||
unsigned soft_timeout() const { return m_fparams.m_soft_timeout; }
|
||||
unsigned initial_restart_timeout() const { return m_params.get_uint(":initial-restart-timeout", 0); }
|
||||
bool generate_explanations() const { return m_params.get_bool(":generate-explanations", false); }
|
||||
bool explanations_on_relation_level() const { return m_params.get_bool(":explanations-on-relation-level", false); }
|
||||
bool magic_sets_for_queries() const { return m_params.get_bool(":magic-sets-for-queries", false); }
|
||||
bool eager_emptiness_checking() const { return m_params.get_bool(":eager-emptiness-checking", true); }
|
||||
unsigned initial_restart_timeout() const { return m_params.get_uint("initial_restart_timeout", 0); }
|
||||
bool generate_explanations() const { return m_params.get_bool("generate_explanations", false); }
|
||||
bool explanations_on_relation_level() const { return m_params.get_bool("explanations_on_relation_level", false); }
|
||||
bool magic_sets_for_queries() const { return m_params.get_bool("magic_sets_for_queries", false); }
|
||||
bool eager_emptiness_checking() const { return m_params.get_bool("eager_emptiness_checking", true); }
|
||||
|
||||
void register_finite_sort(sort * s, sort_kind k);
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ namespace datalog {
|
|||
a(m),
|
||||
rm(ctx.get_rule_manager()),
|
||||
m_rewriter(m, m_params){
|
||||
m_params.set_bool(":expand-select-store",true);
|
||||
m_params.set_bool("expand_select_store",true);
|
||||
m_rewriter.updt_params(m_params);
|
||||
}
|
||||
|
||||
|
|
|
@ -165,14 +165,14 @@ namespace datalog {
|
|||
m_rules(ctx.get_rule_manager()),
|
||||
m_blaster(ctx.get_manager(), m_params),
|
||||
m_rewriter(ctx.get_manager(), ctx, m_rules) {
|
||||
m_params.set_bool(":blast-full", true);
|
||||
m_params.set_bool(":blast-quant", true);
|
||||
m_params.set_bool("blast_full", true);
|
||||
m_params.set_bool("blast_quant", true);
|
||||
m_blaster.updt_params(m_params);
|
||||
}
|
||||
|
||||
rule_set * operator()(rule_set const & source, model_converter_ref& mc, proof_converter_ref& pc) {
|
||||
// TODO mc, pc
|
||||
if (!m_context.get_params().get_bool(":bit-blast", false)) {
|
||||
if (!m_context.get_params().get_bool("bit_blast", false)) {
|
||||
return 0;
|
||||
}
|
||||
if (m_context.get_engine() != PDR_ENGINE) {
|
||||
|
|
|
@ -751,7 +751,7 @@ namespace datalog {
|
|||
valid.resize(sz, true);
|
||||
|
||||
params_ref const& params = m_context.get_params();
|
||||
bool allow_branching = params.get_bool(":inline-linear-branch", false);
|
||||
bool allow_branching = params.get_bool("inline_linear_branch", false);
|
||||
|
||||
for (unsigned i = 0; i < sz; ++i) {
|
||||
|
||||
|
@ -867,7 +867,7 @@ namespace datalog {
|
|||
|
||||
scoped_ptr<rule_set> res = alloc(rule_set, m_context);
|
||||
|
||||
if (params.get_bool(":inline-eager", true)) {
|
||||
if (params.get_bool("inline_eager", true)) {
|
||||
TRACE("dl", source.display(tout << "before eager inlining\n"););
|
||||
plan_inlining(source);
|
||||
something_done = transform_rules(source, *res);
|
||||
|
@ -879,7 +879,7 @@ namespace datalog {
|
|||
TRACE("dl", res->display(tout << "after eager inlining\n"););
|
||||
}
|
||||
|
||||
if (params.get_bool(":inline-linear", true) && inline_linear(res)) {
|
||||
if (params.get_bool("inline_linear", true) && inline_linear(res)) {
|
||||
something_done = true;
|
||||
}
|
||||
|
||||
|
|
|
@ -533,7 +533,7 @@ namespace datalog {
|
|||
|
||||
IF_VERBOSE(10, verbose_stream() << "Computing delta...\n"; );
|
||||
|
||||
if (params.get_bool(":smt-relation-ground-recursive", false)) {
|
||||
if (params.get_bool("smt_relation_ground_recursive", false)) {
|
||||
// ensure R is ground. Simplify S using assumption not R
|
||||
if (!is_ground(rInst)) {
|
||||
proof_ref pr(m);
|
||||
|
|
|
@ -161,9 +161,9 @@ class horn_tactic : public tactic {
|
|||
bool produce_proofs = g->proofs_enabled();
|
||||
|
||||
if (produce_proofs) {
|
||||
if (!m_ctx.get_params().get_bool(":generate-proof-trace", true)) {
|
||||
if (!m_ctx.get_params().get_bool("generate_proof_trace", true)) {
|
||||
params_ref params = m_ctx.get_params();
|
||||
params.set_bool(":generate-proof-trace", true);
|
||||
params.set_bool("generate_proof_trace", true);
|
||||
updt_params(params);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1098,7 +1098,7 @@ namespace pdr {
|
|||
m_pm(m_fparams, m_params, m),
|
||||
m_query_pred(m),
|
||||
m_query(0),
|
||||
m_search(m_params.get_bool(":bfs-model-search", true)),
|
||||
m_search(m_params.get_bool("bfs_model_search", true)),
|
||||
m_last_result(l_undef),
|
||||
m_inductive_lvl(0),
|
||||
m_cancel(false)
|
||||
|
@ -1323,7 +1323,7 @@ namespace pdr {
|
|||
};
|
||||
|
||||
void context::validate() {
|
||||
if (!m_params.get_bool(":validate-result", false)) {
|
||||
if (!m_params.get_bool("validate_result", false)) {
|
||||
return;
|
||||
}
|
||||
switch(m_last_result) {
|
||||
|
@ -1414,12 +1414,12 @@ namespace pdr {
|
|||
void context::init_core_generalizers(datalog::rule_set& rules) {
|
||||
reset_core_generalizers();
|
||||
classifier_proc classify(m, rules);
|
||||
bool use_mc = m_params.get_bool(":use-multicore-generalizer", false);
|
||||
bool use_mc = m_params.get_bool("use_multicore_generalizer", false);
|
||||
if (use_mc) {
|
||||
m_core_generalizers.push_back(alloc(core_multi_generalizer, *this, 0));
|
||||
}
|
||||
if (m_params.get_bool(":use-farkas", true) && !classify.is_bool()) {
|
||||
if (m_params.get_bool(":inline-proof-mode", true)) {
|
||||
if (m_params.get_bool("use_farkas", true) && !classify.is_bool()) {
|
||||
if (m_params.get_bool("inline_proof_mode", true)) {
|
||||
m.toggle_proof_mode(PGM_FINE);
|
||||
m_fparams.m_proof_mode = PGM_FINE;
|
||||
m_fparams.m_arith_bound_prop = BP_NONE;
|
||||
|
@ -1435,13 +1435,13 @@ namespace pdr {
|
|||
m_core_generalizers.push_back(alloc(core_farkas_generalizer, *this, m, m_fparams));
|
||||
}
|
||||
}
|
||||
if (!use_mc && m_params.get_bool(":use-inductive-generalizer", true)) {
|
||||
if (!use_mc && m_params.get_bool("use_inductive_generalizer", true)) {
|
||||
m_core_generalizers.push_back(alloc(core_bool_inductive_generalizer, *this, 0));
|
||||
}
|
||||
if (m_params.get_bool(":use-interpolants", false)) {
|
||||
if (m_params.get_bool("use_interpolants", false)) {
|
||||
m_core_generalizers.push_back(alloc(core_interpolant_generalizer, *this));
|
||||
}
|
||||
if (m_params.get_bool(":inductive-reachability-check", false)) {
|
||||
if (m_params.get_bool("inductive_reachability_check", false)) {
|
||||
m_core_generalizers.push_back(alloc(core_induction_generalizer, *this));
|
||||
}
|
||||
}
|
||||
|
@ -1553,7 +1553,7 @@ namespace pdr {
|
|||
\brief Retrieve satisfying assignment with explanation.
|
||||
*/
|
||||
expr_ref context::mk_sat_answer() const {
|
||||
if (m_params.get_bool(":generate-proof-trace", false)) {
|
||||
if (m_params.get_bool("generate_proof_trace", false)) {
|
||||
proof_ref pr = get_proof();
|
||||
return expr_ref(pr.get(), m);
|
||||
}
|
||||
|
@ -1674,7 +1674,7 @@ namespace pdr {
|
|||
n.pt().add_property(ncore, uses_level?n.level():infty_level);
|
||||
}
|
||||
CASSERT("pdr",n.level() == 0 || check_invariant(n.level()-1));
|
||||
m_search.backtrack_level(!found_invariant && m_params.get_bool(":flexible-trace", false), n);
|
||||
m_search.backtrack_level(!found_invariant && m_params.get_bool("flexible_trace", false), n);
|
||||
break;
|
||||
}
|
||||
case l_undef: {
|
||||
|
@ -1696,7 +1696,7 @@ namespace pdr {
|
|||
}
|
||||
|
||||
void context::propagate(unsigned max_prop_lvl) {
|
||||
if (m_params.get_bool(":simplify-formulas-pre", false)) {
|
||||
if (m_params.get_bool("simplify_formulas_pre", false)) {
|
||||
simplify_formulas();
|
||||
}
|
||||
for (unsigned lvl = 0; lvl <= max_prop_lvl; lvl++) {
|
||||
|
@ -1715,7 +1715,7 @@ namespace pdr {
|
|||
throw inductive_exception();
|
||||
}
|
||||
}
|
||||
if (m_params.get_bool(":simplify-formulas-post", false)) {
|
||||
if (m_params.get_bool("simplify_formulas_post", false)) {
|
||||
simplify_formulas();
|
||||
}
|
||||
}
|
||||
|
@ -1763,7 +1763,7 @@ namespace pdr {
|
|||
*/
|
||||
void context::create_children(model_node& n) {
|
||||
SASSERT(n.level() > 0);
|
||||
bool use_model_generalizer = m_params.get_bool(":use-model-generalizer", false);
|
||||
bool use_model_generalizer = m_params.get_bool("use_model_generalizer", false);
|
||||
datalog::scoped_no_proof _sc(m);
|
||||
|
||||
pred_transformer& pt = n.pt();
|
||||
|
|
|
@ -108,13 +108,13 @@ lbool dl_interface::query(expr * query) {
|
|||
|
||||
model_converter_ref mc = datalog::mk_skip_model_converter();
|
||||
proof_converter_ref pc;
|
||||
if (m_ctx.get_params().get_bool(":generate-proof-trace", false)) {
|
||||
if (m_ctx.get_params().get_bool("generate_proof_trace", false)) {
|
||||
pc = datalog::mk_skip_proof_converter();
|
||||
}
|
||||
m_ctx.set_output_predicate(query_pred);
|
||||
m_ctx.apply_default_transformation(mc, pc);
|
||||
|
||||
if (m_ctx.get_params().get_bool(":slice", true)) {
|
||||
if (m_ctx.get_params().get_bool("slice", true)) {
|
||||
datalog::rule_transformer transformer(m_ctx);
|
||||
datalog::mk_slice* slice = alloc(datalog::mk_slice, m_ctx);
|
||||
transformer.register_plugin(slice);
|
||||
|
@ -133,10 +133,10 @@ lbool dl_interface::query(expr * query) {
|
|||
}
|
||||
}
|
||||
|
||||
if (m_ctx.get_params().get_uint(":unfold-rules",0) > 0) {
|
||||
unsigned num_unfolds = m_ctx.get_params().get_uint(":unfold-rules", 0);
|
||||
if (m_ctx.get_params().get_uint("unfold_rules",0) > 0) {
|
||||
unsigned num_unfolds = m_ctx.get_params().get_uint("unfold_rules", 0);
|
||||
datalog::rule_transformer transformer1(m_ctx), transformer2(m_ctx);
|
||||
if (m_ctx.get_params().get_uint(":coalesce-rules", false)) {
|
||||
if (m_ctx.get_params().get_uint("coalesce_rules", false)) {
|
||||
transformer1.register_plugin(alloc(datalog::mk_coalesce, m_ctx));
|
||||
m_ctx.transform_rules(transformer1, mc, pc);
|
||||
}
|
||||
|
@ -198,7 +198,7 @@ expr_ref dl_interface::get_cover_delta(int level, func_decl* pred_orig) {
|
|||
}
|
||||
|
||||
void dl_interface::add_cover(int level, func_decl* pred, expr* property) {
|
||||
if (m_ctx.get_params().get_bool(":slice", true)) {
|
||||
if (m_ctx.get_params().get_bool("slice", true)) {
|
||||
throw default_exception("Covers are incompatible with slicing. Disable slicing before using covers");
|
||||
}
|
||||
m_context->add_cover(level, pred, property);
|
||||
|
@ -248,28 +248,28 @@ proof_ref dl_interface::get_proof() {
|
|||
}
|
||||
|
||||
void dl_interface::collect_params(param_descrs& p) {
|
||||
p.insert(":bfs-model-search", CPK_BOOL, "PDR: (default true) use BFS strategy for expanding model search");
|
||||
p.insert(":use-farkas", CPK_BOOL, "PDR: (default true) use lemma generator based on Farkas (for linear real arithmetic)");
|
||||
p.insert(":generate-proof-trace", CPK_BOOL, "PDR: (default false) trace for 'sat' answer as proof object");
|
||||
p.insert(":inline-proofs", CPK_BOOL, "PDR: (default true) run PDR with proof mode turned on and extract "
|
||||
p.insert("bfs_model_search", CPK_BOOL, "PDR: (default true) use BFS strategy for expanding model search");
|
||||
p.insert("use_farkas", CPK_BOOL, "PDR: (default true) use lemma generator based on Farkas (for linear real arithmetic)");
|
||||
p.insert("generate_proof_trace", CPK_BOOL, "PDR: (default false) trace for 'sat' answer as proof object");
|
||||
p.insert("inline_proofs", CPK_BOOL, "PDR: (default true) run PDR with proof mode turned on and extract "
|
||||
"Farkas coefficients directly (instead of creating a separate proof object when extracting coefficients)");
|
||||
p.insert(":flexible-trace", CPK_BOOL, "PDR: (default false) allow PDR generate long counter-examples "
|
||||
p.insert("flexible_trace", CPK_BOOL, "PDR: (default false) allow PDR generate long counter-examples "
|
||||
"by extending candidate trace within search area");
|
||||
p.insert(":unfold-rules", CPK_UINT, "PDR: (default 0) unfold rules statically using iterative squarring");
|
||||
p.insert(":use-model-generalizer", CPK_BOOL, "PDR: (default false) use model for backwards propagation (instead of symbolic simulation)");
|
||||
p.insert(":validate-result", CPK_BOOL, "PDR (default false) validate result (by proof checking or model checking)");
|
||||
PRIVATE_PARAMS(p.insert(":use-multicore-generalizer", CPK_BOOL, "PDR: (default false) extract multiple cores for blocking states"););
|
||||
PRIVATE_PARAMS(p.insert(":use-inductive-generalizer", CPK_BOOL, "PDR: (default true) generalize lemmas using induction strengthening"););
|
||||
PRIVATE_PARAMS(p.insert(":use-interpolants", CPK_BOOL, "PDR: (default false) use iZ3 interpolation for lemma generation"););
|
||||
PRIVATE_PARAMS(p.insert(":dump-interpolants", CPK_BOOL, "PDR: (default false) display interpolants"););
|
||||
PRIVATE_PARAMS(p.insert(":cache-mode", CPK_UINT, "PDR: use no (0 - default) symbolic (1) or explicit cache (2) for model search"););
|
||||
PRIVATE_PARAMS(p.insert(":inductive-reachability-check", CPK_BOOL,
|
||||
p.insert("unfold_rules", CPK_UINT, "PDR: (default 0) unfold rules statically using iterative squarring");
|
||||
p.insert("use_model_generalizer", CPK_BOOL, "PDR: (default false) use model for backwards propagation (instead of symbolic simulation)");
|
||||
p.insert("validate_result", CPK_BOOL, "PDR (default false) validate result (by proof checking or model checking)");
|
||||
PRIVATE_PARAMS(p.insert("use_multicore_generalizer", CPK_BOOL, "PDR: (default false) extract multiple cores for blocking states"););
|
||||
PRIVATE_PARAMS(p.insert("use_inductive_generalizer", CPK_BOOL, "PDR: (default true) generalize lemmas using induction strengthening"););
|
||||
PRIVATE_PARAMS(p.insert("use_interpolants", CPK_BOOL, "PDR: (default false) use iZ3 interpolation for lemma generation"););
|
||||
PRIVATE_PARAMS(p.insert("dump_interpolants", CPK_BOOL, "PDR: (default false) display interpolants"););
|
||||
PRIVATE_PARAMS(p.insert("cache_mode", CPK_UINT, "PDR: use no (0 - default) symbolic (1) or explicit cache (2) for model search"););
|
||||
PRIVATE_PARAMS(p.insert("inductive_reachability_check", CPK_BOOL,
|
||||
"PDR: (default false) assume negation of the cube on the previous level when "
|
||||
"checking for reachability (not only during cube weakening)"););
|
||||
PRIVATE_PARAMS(p.insert(":max-num-contexts", CPK_UINT, "PDR: (default 500) maximal number of contexts to create"););
|
||||
PRIVATE_PARAMS(p.insert(":try-minimize-core", CPK_BOOL, "PDR: (default false) try to reduce core size (before inductive minimization)"););
|
||||
p.insert(":simplify-formulas-pre", CPK_BOOL, "PDR: (default false) simplify derived formulas before inductive propagation");
|
||||
p.insert(":simplify-formulas-post", CPK_BOOL, "PDR: (default false) simplify derived formulas after inductive propagation");
|
||||
p.insert(":slice", CPK_BOOL, "PDR: (default true) simplify clause set using slicing");
|
||||
p.insert(":coalesce-rules", CPK_BOOL, "BMC: (default false) coalesce rules");
|
||||
PRIVATE_PARAMS(p.insert("max_num_contexts", CPK_UINT, "PDR: (default 500) maximal number of contexts to create"););
|
||||
PRIVATE_PARAMS(p.insert("try_minimize_core", CPK_BOOL, "PDR: (default false) try to reduce core size (before inductive minimization)"););
|
||||
p.insert("simplify_formulas_pre", CPK_BOOL, "PDR: (default false) simplify derived formulas before inductive propagation");
|
||||
p.insert("simplify_formulas_post", CPK_BOOL, "PDR: (default false) simplify derived formulas after inductive propagation");
|
||||
p.insert("slice", CPK_BOOL, "PDR: (default true) simplify clause set using slicing");
|
||||
p.insert("coalesce_rules", CPK_BOOL, "BMC: (default false) coalesce rules");
|
||||
}
|
||||
|
|
|
@ -318,7 +318,7 @@ lbool interpolant_provider_impl::get_interpolant(expr * f1, expr * f2, expr_ref&
|
|||
throw default_exception("invalid interpolator output");
|
||||
}
|
||||
res = *ait;
|
||||
if (m_params.get_bool(":dump-interpolants", false)) {
|
||||
if (m_params.get_bool("dump_interpolants", false)) {
|
||||
interpolant_provider::output_interpolant(m, f1, f2, res);
|
||||
}
|
||||
return l_true;
|
||||
|
|
|
@ -212,7 +212,7 @@ namespace pdr {
|
|||
m(pm.get_manager()),
|
||||
m_pm(pm),
|
||||
m_name(name),
|
||||
m_try_minimize_core(pm.get_params().get_bool(":try-minimize-core", false)),
|
||||
m_try_minimize_core(pm.get_params().get_bool("try_minimize_core", false)),
|
||||
m_ctx(pm.mk_fresh()),
|
||||
m_pos_level_atoms(m),
|
||||
m_neg_level_atoms(m),
|
||||
|
|
|
@ -27,7 +27,7 @@ namespace pdr {
|
|||
m_ctx(0),
|
||||
m_ref_holder(m),
|
||||
m_disj_connector(m),
|
||||
m_cache_mode((datalog::PDR_CACHE_MODE)params.get_uint(":cache-mode",0)) {
|
||||
m_cache_mode((datalog::PDR_CACHE_MODE)params.get_uint("cache_mode",0)) {
|
||||
if (m_cache_mode == datalog::CONSTRAINT_CACHE) {
|
||||
m_ctx = pm.mk_fresh();
|
||||
m_ctx->assert_expr(m_pm.get_background());
|
||||
|
|
|
@ -96,7 +96,7 @@ namespace pdr {
|
|||
smt_context_manager::smt_context_manager(front_end_params& fp, params_ref const& p, ast_manager& m):
|
||||
m_fparams(fp),
|
||||
m(m),
|
||||
m_max_num_contexts(p.get_uint(":max-num-contexts", 500)),
|
||||
m_max_num_contexts(p.get_uint("max_num_contexts", 500)),
|
||||
m_num_contexts(0),
|
||||
m_predicate_list(m) {
|
||||
}
|
||||
|
|
|
@ -1340,7 +1340,7 @@ namespace qe {
|
|||
m_nnf(m, get_is_relevant(), get_mk_atom())
|
||||
{
|
||||
params_ref params;
|
||||
params.set_bool(":gcd-rounding", true);
|
||||
params.set_bool("gcd_rounding", true);
|
||||
m_rewriter.updt_params(params);
|
||||
}
|
||||
|
||||
|
@ -2010,7 +2010,7 @@ namespace qe {
|
|||
}
|
||||
|
||||
void updt_params(params_ref const& p) {
|
||||
m_eliminate_variables_as_block = p.get_bool(":eliminate-variables-as-block", m_eliminate_variables_as_block);
|
||||
m_eliminate_variables_as_block = p.get_bool("eliminate_variables_as_block", m_eliminate_variables_as_block);
|
||||
}
|
||||
|
||||
void eliminate(bool is_forall, unsigned num_vars, app* const* vars, expr_ref& fml) {
|
||||
|
@ -2194,7 +2194,7 @@ namespace qe {
|
|||
}
|
||||
|
||||
void expr_quant_elim::updt_params(params_ref const& p) {
|
||||
bool r = p.get_bool(":use-neq-qe", m_use_new_qe);
|
||||
bool r = p.get_bool("use_neq_qe", m_use_new_qe);
|
||||
if (r != m_use_new_qe) {
|
||||
dealloc(m_qe);
|
||||
m_qe = 0;
|
||||
|
@ -2205,9 +2205,9 @@ namespace qe {
|
|||
}
|
||||
|
||||
void expr_quant_elim::collect_param_descrs(param_descrs& r) {
|
||||
r.insert(":eliminate-variables-as-block", CPK_BOOL,
|
||||
r.insert("eliminate_variables_as_block", CPK_BOOL,
|
||||
"(default: true) eliminate variables as a block (true) or one at a time (false)");
|
||||
// r.insert(":use-new-qe", CPK_BOOL, "(default: true) invoke quantifier engine based on abstracted solver");
|
||||
// r.insert("use_new_qe", CPK_BOOL, "(default: true) invoke quantifier engine based on abstracted solver");
|
||||
}
|
||||
|
||||
void expr_quant_elim::init_qe() {
|
||||
|
|
|
@ -16,8 +16,8 @@ public:
|
|||
|
||||
virtual void init_pdescrs(cmd_context & ctx, param_descrs & p) {
|
||||
insert_timeout(p);
|
||||
p.insert(":print", CPK_BOOL, "(default: true) print the simplified term.");
|
||||
p.insert(":print-statistics", CPK_BOOL, "(default: false) print statistics.");
|
||||
p.insert("print", CPK_BOOL, "(default: true) print the simplified term.");
|
||||
p.insert("print_statistics", CPK_BOOL, "(default: false) print statistics.");
|
||||
}
|
||||
|
||||
virtual ~qe_cmd() {
|
||||
|
@ -45,11 +45,11 @@ public:
|
|||
|
||||
qe(m_target, result, pr);
|
||||
|
||||
if (m_params.get_bool(":print", true)) {
|
||||
if (m_params.get_bool("print", true)) {
|
||||
ctx.display(ctx.regular_stream(), result);
|
||||
ctx.regular_stream() << std::endl;
|
||||
}
|
||||
if (m_params.get_bool(":print-statistics", false)) {
|
||||
if (m_params.get_bool("print_statistics", false)) {
|
||||
statistics st;
|
||||
qe.collect_statistics(st);
|
||||
st.display(ctx.regular_stream());
|
||||
|
|
|
@ -1048,13 +1048,13 @@ namespace fm {
|
|||
}
|
||||
|
||||
void updt_params(params_ref const & p) {
|
||||
m_max_memory = megabytes_to_bytes(p.get_uint(":max-memory", UINT_MAX));
|
||||
m_fm_real_only = p.get_bool(":fm-real-only", true);
|
||||
m_fm_limit = p.get_uint(":fm-limit", 5000000);
|
||||
m_fm_cutoff1 = p.get_uint(":fm-cutoff1", 8);
|
||||
m_fm_cutoff2 = p.get_uint(":fm-cutoff2", 256);
|
||||
m_fm_extra = p.get_uint(":fm-extra", 0);
|
||||
m_fm_occ = p.get_bool(":fm-occ", false);
|
||||
m_max_memory = megabytes_to_bytes(p.get_uint("max_memory", UINT_MAX));
|
||||
m_fm_real_only = p.get_bool("fm_real_only", true);
|
||||
m_fm_limit = p.get_uint("fm_limit", 5000000);
|
||||
m_fm_cutoff1 = p.get_uint("fm_cutoff1", 8);
|
||||
m_fm_cutoff2 = p.get_uint("fm_cutoff2", 256);
|
||||
m_fm_extra = p.get_uint("fm_extra", 0);
|
||||
m_fm_occ = p.get_bool("fm_occ", false);
|
||||
}
|
||||
|
||||
void set_cancel(bool f) {
|
||||
|
|
|
@ -301,17 +301,17 @@ namespace qe {
|
|||
virtual void cleanup() {}
|
||||
|
||||
virtual void updt_params(params_ref const & p) {
|
||||
m_extrapolate_strategy_param = p.get_uint(":extrapolate-strategy", m_extrapolate_strategy_param);
|
||||
m_projection_mode_param = p.get_bool(":projection-mode", m_projection_mode_param);
|
||||
m_strong_context_simplify_param = p.get_bool(":strong-context-simplify", m_strong_context_simplify_param);
|
||||
m_ctx_simplify_local_param = p.get_bool(":strong-context-simplify-local", m_ctx_simplify_local_param);
|
||||
m_extrapolate_strategy_param = p.get_uint("extrapolate_strategy", m_extrapolate_strategy_param);
|
||||
m_projection_mode_param = p.get_bool("projection_mode", m_projection_mode_param);
|
||||
m_strong_context_simplify_param = p.get_bool("strong_context_simplify", m_strong_context_simplify_param);
|
||||
m_ctx_simplify_local_param = p.get_bool("strong_context_simplify_local", m_ctx_simplify_local_param);
|
||||
}
|
||||
|
||||
virtual void collect_param_descrs(param_descrs & r) {
|
||||
r.insert(":extrapolate-strategy",CPK_UINT, "(default: 0 trivial extrapolation) 1 - nnf strengthening 2 - smt-test 3 - nnf_weakening");
|
||||
r.insert(":projection-mode", CPK_BOOL, "(default: true - full) false - partial quantifier instantiation");
|
||||
r.insert(":strong-context-simplify", CPK_BOOL, "(default: true) use strong context simplifier on result of quantifier elimination");
|
||||
r.insert(":strong-context-simplify-local", CPK_BOOL, "(default: false) use strong context simplifier locally on the new formula only");
|
||||
r.insert("extrapolate_strategy",CPK_UINT, "(default: 0 trivial extrapolation) 1 - nnf strengthening 2 - smt-test 3 - nnf_weakening");
|
||||
r.insert("projection_mode", CPK_BOOL, "(default: true - full) false - partial quantifier instantiation");
|
||||
r.insert("strong_context_simplify", CPK_BOOL, "(default: true) use strong context simplifier on result of quantifier elimination");
|
||||
r.insert("strong_context_simplify_local", CPK_BOOL, "(default: false) use strong context simplifier locally on the new formula only");
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ class qe_tactic : public tactic {
|
|||
}
|
||||
|
||||
void updt_params(params_ref const & p) {
|
||||
m_fparams.m_nlquant_elim = p.get_bool(":qe-nonlinear", false);
|
||||
m_fparams.m_nlquant_elim = p.get_bool("qe_nonlinear", false);
|
||||
m_qe.updt_params(p);
|
||||
}
|
||||
|
||||
|
@ -113,7 +113,7 @@ public:
|
|||
|
||||
|
||||
virtual void collect_param_descrs(param_descrs & r) {
|
||||
r.insert(":qe-nonlinear", CPK_BOOL, "(default: false) enable virtual term substitution.");
|
||||
r.insert("qe_nonlinear", CPK_BOOL, "(default: false) enable virtual term substitution.");
|
||||
m_imp->collect_param_descrs(r);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue