3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-06-28 00:48:45 +00:00

move smt params to params directory, update release.yml

This commit is contained in:
Nikolaj Bjorner 2025-06-09 10:47:22 -07:00
parent dc420332b8
commit c387b20ac6
91 changed files with 165 additions and 144 deletions

View file

@ -19,7 +19,7 @@ Revision History:
#pragma once
#include "ast/ast.h"
#include "smt/params/dyn_ack_params.h"
#include "params/dyn_ack_params.h"
#include "util/obj_hashtable.h"
#include "util/obj_pair_hashtable.h"
#include "util/obj_triple_hashtable.h"

View file

@ -20,7 +20,7 @@ Revision History:
#include "ast/ast.h"
#include "util/obj_hashtable.h"
#include "smt/params/smt_params.h"
#include "params/smt_params.h"
#include "smt/smt_kernel.h"
#include "ast/arith_decl_plugin.h"
#include "ast/rewriter/bool_rewriter.h"

View file

@ -1,18 +0,0 @@
z3_add_component(smt_params
SOURCES
dyn_ack_params.cpp
preprocessor_params.cpp
qi_params.cpp
smt_params.cpp
theory_arith_params.cpp
theory_array_params.cpp
theory_bv_params.cpp
theory_pb_params.cpp
theory_seq_params.cpp
theory_str_params.cpp
COMPONENT_DEPENDENCIES
params
ast
PYG_FILES
smt_params_helper.pyg
)

View file

@ -1,41 +0,0 @@
/*++
Copyright (c) 2006 Microsoft Corporation
Module Name:
dyn_ack_params.cpp
Abstract:
<abstract>
Author:
Leonardo de Moura (leonardo) 2007-05-18.
Revision History:
--*/
#include "smt/params/dyn_ack_params.h"
#include "smt/params/smt_params_helper.hpp"
void dyn_ack_params::updt_params(params_ref const & _p) {
smt_params_helper p(_p);
m_dack = static_cast<dyn_ack_strategy>(p.dack());
m_dack_eq = p.dack_eq();
m_dack_factor = p.dack_factor();
m_dack_threshold = p.dack_threshold();
m_dack_gc = p.dack_gc();
m_dack_gc_inv_decay = p.dack_gc_inv_decay();
}
#define DISPLAY_PARAM(X) out << #X"=" << X << '\n';
void dyn_ack_params::display(std::ostream & out) const {
DISPLAY_PARAM((unsigned)m_dack);
DISPLAY_PARAM(m_dack_eq);
DISPLAY_PARAM(m_dack_factor);
DISPLAY_PARAM(m_dack_threshold);
DISPLAY_PARAM(m_dack_gc);
DISPLAY_PARAM(m_dack_gc_inv_decay);
}

View file

@ -1,48 +0,0 @@
/*++
Copyright (c) 2006 Microsoft Corporation
Module Name:
dyn_ack_params.h
Abstract:
<abstract>
Author:
Leonardo de Moura (leonardo) 2007-05-18.
Revision History:
--*/
#pragma once
#include "util/params.h"
enum class dyn_ack_strategy {
DACK_DISABLED,
DACK_ROOT, // congruence is the root of the conflict
DACK_CR // congruence used during conflict resolution
};
struct dyn_ack_params {
dyn_ack_strategy m_dack = dyn_ack_strategy::DACK_ROOT;
bool m_dack_eq = false;
double m_dack_factor = 0.1;
unsigned m_dack_threshold = 10;
unsigned m_dack_gc = 2000;
double m_dack_gc_inv_decay = 0.8;
public:
dyn_ack_params(params_ref const & p = params_ref()) {
updt_params(p);
}
void updt_params(params_ref const & _p);
void display(std::ostream & out) const;
};

View file

@ -1,68 +0,0 @@
/*++
Copyright (c) 2012 Microsoft Corporation
Module Name:
preprocessor_params.h
Abstract:
Preprocess AST before adding them to the logical context
Author:
Leonardo de Moura (leonardo) 2012-12-02.
Revision History:
--*/
#include "smt/params/preprocessor_params.h"
#include "smt/params/smt_params_helper.hpp"
void preprocessor_params::updt_local_params(params_ref const & _p) {
smt_params_helper p(_p);
m_macro_finder = p.macro_finder();
m_quasi_macros = p.quasi_macros();
m_restricted_quasi_macros = p.restricted_quasi_macros();
m_pull_nested_quantifiers = p.pull_nested_quantifiers();
m_refine_inj_axiom = p.refine_inj_axioms();
m_propagate_values = p.propagate_values();
m_elim_unconstrained = p.elim_unconstrained();
m_solve_eqs = p.solve_eqs();
m_ng_lift_ite = static_cast<lift_ite_kind>(p.q_lift_ite());
m_bound_simplifier = p.bound_simplifier();
}
void preprocessor_params::updt_params(params_ref const & p) {
pattern_inference_params::updt_params(p);
updt_local_params(p);
}
#define DISPLAY_PARAM(X) out << #X"=" << X << '\n';
void preprocessor_params::display(std::ostream & out) const {
pattern_inference_params::display(out);
bit_blaster_params::display(out);
DISPLAY_PARAM((int)m_lift_ite);
DISPLAY_PARAM((int)m_ng_lift_ite);
DISPLAY_PARAM(m_pull_cheap_ite);
DISPLAY_PARAM(m_pull_nested_quantifiers);
DISPLAY_PARAM(m_eliminate_term_ite);
DISPLAY_PARAM(m_macro_finder);
DISPLAY_PARAM(m_propagate_values);
DISPLAY_PARAM(m_solve_eqs);
DISPLAY_PARAM(m_elim_unconstrained);
DISPLAY_PARAM(m_refine_inj_axiom);
DISPLAY_PARAM(m_eliminate_bounds);
DISPLAY_PARAM(m_simplify_bit2int);
DISPLAY_PARAM(m_nnf_cnf);
DISPLAY_PARAM(m_distribute_forall);
DISPLAY_PARAM(m_reduce_args);
DISPLAY_PARAM(m_quasi_macros);
DISPLAY_PARAM(m_restricted_quasi_macros);
DISPLAY_PARAM(m_max_bv_sharing);
DISPLAY_PARAM(m_pre_simplifier);
DISPLAY_PARAM(m_nlquant_elim);
DISPLAY_PARAM(m_bound_simplifier);
}

View file

@ -1,67 +0,0 @@
/*++
Copyright (c) 2006 Microsoft Corporation
Module Name:
preprocessor_params.h
Abstract:
Preprocess AST before adding them to the logical context
Author:
Leonardo de Moura (leonardo) 2008-01-17.
Revision History:
--*/
#pragma once
#include "params/pattern_inference_params.h"
#include "params/bit_blaster_params.h"
enum class lift_ite_kind {
LI_NONE,
LI_CONSERVATIVE,
LI_FULL
};
struct preprocessor_params : public pattern_inference_params,
public bit_blaster_params {
lift_ite_kind m_lift_ite;
lift_ite_kind m_ng_lift_ite; // lift ite for non ground terms
bool m_pull_cheap_ite = false;
bool m_pull_nested_quantifiers = false;
bool m_eliminate_term_ite = false;
bool m_macro_finder = false;
bool m_propagate_values = true;
bool m_elim_unconstrained = true;
bool m_solve_eqs = true;
bool m_refine_inj_axiom = true;
bool m_eliminate_bounds = false;
bool m_simplify_bit2int = false;
bool m_nnf_cnf = true;
bool m_distribute_forall = false;
bool m_reduce_args = false;
bool m_quasi_macros = false;
bool m_restricted_quasi_macros = false;
bool m_max_bv_sharing = true;
bool m_pre_simplifier = true;
bool m_nlquant_elim = false;
bool m_bound_simplifier = true;
public:
preprocessor_params(params_ref const & p = params_ref()):
m_lift_ite(lift_ite_kind::LI_NONE),
m_ng_lift_ite(lift_ite_kind::LI_NONE) {
updt_local_params(p);
}
void updt_local_params(params_ref const & p);
void updt_params(params_ref const & p);
void display(std::ostream & out) const;
};

View file

@ -1,66 +0,0 @@
/*++
Copyright (c) 2012 Microsoft Corporation
Module Name:
qi_params.cpp
Abstract:
<abstract>
Author:
Leonardo de Moura (leonardo) 2012-12-02.
Revision History:
--*/
#include "smt/params/qi_params.h"
#include "smt/params/smt_params_helper.hpp"
void qi_params::updt_params(params_ref const & _p) {
smt_params_helper p(_p);
m_mbqi = p.mbqi();
m_mbqi_max_cexs = p.mbqi_max_cexs();
m_mbqi_max_cexs_incr = p.mbqi_max_cexs_incr();
m_mbqi_max_iterations = p.mbqi_max_iterations();
m_mbqi_trace = p.mbqi_trace();
m_mbqi_force_template = p.mbqi_force_template();
m_mbqi_id = p.mbqi_id();
m_qe_lite = p.q_lite();
m_qi_profile = p.qi_profile();
m_qi_profile_freq = p.qi_profile_freq();
m_qi_max_instances = p.qi_max_instances();
m_qi_eager_threshold = p.qi_eager_threshold();
m_qi_lazy_threshold = p.qi_lazy_threshold();
m_qi_cost = p.qi_cost();
m_qi_max_eager_multipatterns = p.qi_max_multi_patterns();
m_qi_quick_checker = static_cast<quick_checker_mode>(p.qi_quick_checker());
}
#define DISPLAY_PARAM(X) out << #X"=" << X << '\n';
void qi_params::display(std::ostream & out) const {
DISPLAY_PARAM(m_qi_cost);
DISPLAY_PARAM(m_qi_new_gen);
DISPLAY_PARAM(m_qi_eager_threshold);
DISPLAY_PARAM(m_qi_lazy_threshold);
DISPLAY_PARAM(m_qi_max_eager_multipatterns);
DISPLAY_PARAM(m_qi_max_lazy_multipattern_matching);
DISPLAY_PARAM(m_qi_profile);
DISPLAY_PARAM(m_qi_profile_freq);
DISPLAY_PARAM(m_qi_quick_checker);
DISPLAY_PARAM(m_qi_lazy_quick_checker);
DISPLAY_PARAM(m_qi_promote_unsat);
DISPLAY_PARAM(m_qi_max_instances);
DISPLAY_PARAM(m_qi_lazy_instantiation);
DISPLAY_PARAM(m_qi_conservative_final_check);
DISPLAY_PARAM(m_mbqi);
DISPLAY_PARAM(m_mbqi_max_cexs);
DISPLAY_PARAM(m_mbqi_max_cexs_incr);
DISPLAY_PARAM(m_mbqi_max_iterations);
DISPLAY_PARAM(m_mbqi_trace);
DISPLAY_PARAM(m_mbqi_force_template);
DISPLAY_PARAM(m_mbqi_id);
}

View file

@ -1,92 +0,0 @@
/*++
Copyright (c) 2006 Microsoft Corporation
Module Name:
qi_params.h
Abstract:
<abstract>
Author:
Leonardo de Moura (leonardo) 2008-06-15.
Revision History:
--*/
#pragma once
#include "util/util.h"
#include "util/params.h"
enum quick_checker_mode {
MC_NO, // do not use (cheap) model checking based instantiation
MC_UNSAT, // instantiate unsatisfied instances
MC_NO_SAT // instantiate unsatisfied and not-satisfied instances
};
struct qi_params {
std::string m_qi_cost;
std::string m_qi_new_gen;
double m_qi_eager_threshold = 10.0;
double m_qi_lazy_threshold = 20.0;
unsigned m_qi_max_eager_multipatterns = 0;
unsigned m_qi_max_lazy_multipattern_matching = 2;
bool m_qi_profile = false;
unsigned m_qi_profile_freq = UINT_MAX;
quick_checker_mode m_qi_quick_checker = MC_NO;
bool m_qi_lazy_quick_checker = true;
bool m_qi_promote_unsat = true;
unsigned m_qi_max_instances = UINT_MAX;
bool m_qi_lazy_instantiation = false;
bool m_qi_conservative_final_check = false;
bool m_qe_lite = false;
bool m_mbqi = true;
unsigned m_mbqi_max_cexs = 1;
unsigned m_mbqi_max_cexs_incr = 1;
unsigned m_mbqi_max_iterations = 1000;
bool m_mbqi_trace = false;
unsigned m_mbqi_force_template = 10;
const char * m_mbqi_id = nullptr;
qi_params(params_ref const & p = params_ref()):
/*
The "weight 0" performance bug
------------------------------
The parameters m_qi_cost and m_qi_new_gen influence quantifier instantiation.
- m_qi_cost: specify the cost of a quantifier instantiation. Z3 will block instantiations using m_qi_eager_threshold and m_qi_lazy_threshold.
- m_qi_new_gen: specify how the "generation" tag of an enode created by quantifier instantiation is set.
Enodes in the input problem have generation 0.
Some combinations of m_qi_cost and m_qi_new_gen will prevent Z3 from breaking matching loops.
For example, the "Weight 0" performance bug was triggered by the following combination:
- m_qi_cost: (+ weight generation)
- m_qi_new_gen: cost
If a quantifier has weight 0, then the cost of instantiating it with a term in the input problem has cost 0.
The new enodes created during the instantiation will be tagged with generation = const = 0. So, every enode
will have generation 0, and consequently every quantifier instantiation will have cost 0.
Although dangerous, this feature was requested by the Boogie team. In their case, the patterns are carefully constructed,
and there are no matching loops. Moreover, the tag some quantifiers with weight 0 to instruct Z3 to never block their instances.
An example is the select-store axiom. They need this feature to be able to analyze code that contains very long execution paths.
So, unless requested by the user, the default weight must be > 0. Otherwise, Z3 will execute without any
matching loop detection.
*/
m_qi_cost("(+ weight generation)"),
m_qi_new_gen("cost")
{
updt_params(p);
}
void updt_params(params_ref const & p);
void display(std::ostream & out) const;
};

View file

@ -1,435 +0,0 @@
/*++
Copyright (c) 2006 Microsoft Corporation
Module Name:
smt_params.cpp
Abstract:
<abstract>
Author:
Leonardo de Moura (leonardo) 2008-02-20.
Revision History:
--*/
#include "smt/params/smt_params.h"
#include "smt/params/smt_params_helper.hpp"
#include "util/gparams.h"
#include "params/solver_params.hpp"
void smt_params::updt_local_params(params_ref const & _p) {
smt_params_helper p(_p);
m_auto_config = p.auto_config() && gparams::get_value("auto_config") == "true"; // auto-config is not scoped by smt in gparams.
m_random_seed = p.random_seed();
m_relevancy_lvl = p.relevancy();
m_ematching = p.ematching();
m_induction = p.induction();
m_clause_proof = p.clause_proof();
m_phase_selection = static_cast<phase_selection>(p.phase_selection());
if (m_phase_selection > PS_THEORY) throw default_exception("illegal phase selection numeral");
m_phase_caching_on = p.phase_caching_on();
m_phase_caching_off = p.phase_caching_off();
m_restart_strategy = static_cast<restart_strategy>(p.restart_strategy());
if (m_restart_strategy > RS_ARITHMETIC) throw default_exception("illegal restart strategy numeral");
m_restart_factor = p.restart_factor();
m_case_split_strategy = static_cast<case_split_strategy>(p.case_split());
m_theory_case_split = p.theory_case_split();
m_theory_aware_branching = p.theory_aware_branching();
m_delay_units = p.delay_units();
m_delay_units_threshold = p.delay_units_threshold();
m_preprocess = _p.get_bool("preprocess", true); // hidden parameter
m_max_conflicts = p.max_conflicts();
m_restart_max = p.restart_max();
m_cube_depth = p.cube_depth();
m_threads = p.threads();
m_threads_max_conflicts = p.threads_max_conflicts();
m_threads_cube_frequency = p.threads_cube_frequency();
m_core_validate = p.core_validate();
m_sls_enable = p.sls_enable();
m_sls_parallel = p.sls_parallel();
m_logic = _p.get_sym("logic", m_logic);
m_string_solver = p.string_solver();
m_up_persist_clauses = p.up_persist_clauses();
validate_string_solver(m_string_solver);
if (_p.get_bool("arith.greatest_error_pivot", false))
m_arith_pivot_strategy = arith_pivot_strategy::ARITH_PIVOT_GREATEST_ERROR;
else if (_p.get_bool("arith.least_error_pivot", false))
m_arith_pivot_strategy = arith_pivot_strategy::ARITH_PIVOT_LEAST_ERROR;
theory_array_params::updt_params(_p);
m_dump_benchmarks = false;
m_dump_min_time = 0.5;
m_dump_recheck = false;
solver_params sp(_p);
m_axioms2files = sp.axioms2files();
m_lemmas2console = sp.lemmas2console();
m_instantiations2console = sp.instantiations2console();
m_proof_log = sp.proof_log();
}
void smt_params::updt_params(params_ref const & p) {
preprocessor_params::updt_params(p);
dyn_ack_params::updt_params(p);
qi_params::updt_params(p);
theory_arith_params::updt_params(p);
theory_bv_params::updt_params(p);
theory_pb_params::updt_params(p);
// theory_array_params::updt_params(p);
theory_datatype_params::updt_params(p);
theory_str_params::updt_params(p);
updt_local_params(p);
}
void smt_params::updt_params(context_params const & p) {
m_auto_config = p.m_auto_config;
m_model = p.m_model;
}
#define DISPLAY_PARAM(X) out << #X"=" << X << '\n';
void smt_params::display(std::ostream & out) const {
preprocessor_params::display(out);
dyn_ack_params::display(out);
qi_params::display(out);
theory_arith_params::display(out);
theory_array_params::display(out);
theory_bv_params::display(out);
theory_pb_params::display(out);
theory_datatype_params::display(out);
theory_str_params::display(out);
DISPLAY_PARAM(m_display_proof);
DISPLAY_PARAM(m_display_dot_proof);
DISPLAY_PARAM(m_display_unsat_core);
DISPLAY_PARAM(m_check_proof);
DISPLAY_PARAM(m_eq_propagation);
DISPLAY_PARAM(m_binary_clause_opt);
DISPLAY_PARAM(m_relevancy_lvl);
DISPLAY_PARAM(m_relevancy_lemma);
DISPLAY_PARAM(m_random_seed);
DISPLAY_PARAM(m_random_var_freq);
DISPLAY_PARAM(m_inv_decay);
DISPLAY_PARAM(m_clause_decay);
DISPLAY_PARAM(m_random_initial_activity);
DISPLAY_PARAM(m_phase_selection);
DISPLAY_PARAM(m_phase_caching_on);
DISPLAY_PARAM(m_phase_caching_off);
DISPLAY_PARAM(m_minimize_lemmas);
DISPLAY_PARAM(m_max_conflicts);
DISPLAY_PARAM(m_cube_depth);
DISPLAY_PARAM(m_threads);
DISPLAY_PARAM(m_threads_max_conflicts);
DISPLAY_PARAM(m_threads_cube_frequency);
DISPLAY_PARAM(m_simplify_clauses);
DISPLAY_PARAM(m_tick);
DISPLAY_PARAM(m_display_features);
DISPLAY_PARAM(m_new_core2th_eq);
DISPLAY_PARAM(m_ematching);
DISPLAY_PARAM(m_induction);
DISPLAY_PARAM(m_clause_proof);
DISPLAY_PARAM(m_proof_log);
DISPLAY_PARAM(m_case_split_strategy);
DISPLAY_PARAM(m_rel_case_split_order);
DISPLAY_PARAM(m_lookahead_diseq);
DISPLAY_PARAM(m_delay_units);
DISPLAY_PARAM(m_delay_units_threshold);
DISPLAY_PARAM(m_theory_resolve);
DISPLAY_PARAM(m_restart_strategy);
DISPLAY_PARAM(m_restart_initial);
DISPLAY_PARAM(m_restart_factor);
DISPLAY_PARAM(m_restart_adaptive);
DISPLAY_PARAM(m_agility_factor);
DISPLAY_PARAM(m_restart_agility_threshold);
DISPLAY_PARAM(m_up_persist_clauses);
DISPLAY_PARAM(m_lemma_gc_strategy);
DISPLAY_PARAM(m_lemma_gc_half);
DISPLAY_PARAM(m_recent_lemmas_size);
DISPLAY_PARAM(m_lemma_gc_initial);
DISPLAY_PARAM(m_lemma_gc_factor);
DISPLAY_PARAM(m_new_old_ratio);
DISPLAY_PARAM(m_new_clause_activity);
DISPLAY_PARAM(m_old_clause_activity);
DISPLAY_PARAM(m_new_clause_relevancy);
DISPLAY_PARAM(m_old_clause_relevancy);
DISPLAY_PARAM(m_inv_clause_decay);
DISPLAY_PARAM(m_axioms2files);
DISPLAY_PARAM(m_lemmas2console);
DISPLAY_PARAM(m_logic);
DISPLAY_PARAM(m_string_solver);
DISPLAY_PARAM(m_profile_res_sub);
DISPLAY_PARAM(m_display_bool_var2expr);
DISPLAY_PARAM(m_display_ll_bool_var2expr);
DISPLAY_PARAM(m_model);
DISPLAY_PARAM(m_model_on_timeout);
DISPLAY_PARAM(m_model_on_final_check);
DISPLAY_PARAM(m_progress_sampling_freq);
DISPLAY_PARAM(m_core_validate);
DISPLAY_PARAM(m_preprocess);
DISPLAY_PARAM(m_user_theory_preprocess_axioms);
DISPLAY_PARAM(m_user_theory_persist_axioms);
DISPLAY_PARAM(m_at_labels_cex);
DISPLAY_PARAM(m_check_at_labels);
DISPLAY_PARAM(m_dump_goal_as_smt);
DISPLAY_PARAM(m_auto_config);
}
void smt_params::validate_string_solver(symbol const& s) const {
if (s == "z3str3" || s == "seq" || s == "empty" || s == "auto" || s == "none")
return;
throw default_exception("Invalid string solver value. Legal values are z3str3, seq, empty, auto, none");
}
void smt_params::setup_QF_UF() {
m_relevancy_lvl = 0;
m_nnf_cnf = false;
m_restart_strategy = RS_LUBY;
m_phase_selection = PS_CACHING_CONSERVATIVE2;
m_random_initial_activity = IA_RANDOM;
}
void smt_params::setup_QF_RDL() {
m_relevancy_lvl = 0;
m_arith_eq2ineq = true;
m_arith_reflect = false;
m_arith_propagate_eqs = false;
m_nnf_cnf = false;
}
void smt_params::setup_QF_RDL(static_features & st) {
}
void smt_params::setup_QF_IDL() {
m_relevancy_lvl = 0;
m_arith_eq2ineq = true;
m_arith_reflect = false;
m_arith_propagate_eqs = false;
m_arith_small_lemma_size = 30;
m_nnf_cnf = false;
}
void smt_params::setup_QF_IDL(static_features & st) {
}
void smt_params::setup_QF_LRA() {
m_relevancy_lvl = 0;
m_arith_eq2ineq = true;
m_arith_reflect = false;
m_arith_propagate_eqs = false;
m_eliminate_term_ite = true;
m_nnf_cnf = false;
m_phase_selection = PS_THEORY;
}
void smt_params::setup_QF_LRA(static_features const& st) {
m_relevancy_lvl = 0;
m_arith_eq2ineq = true;
m_arith_reflect = false;
m_arith_propagate_eqs = false;
m_eliminate_term_ite = true;
m_nnf_cnf = false;
if (numerator(st.m_arith_k_sum) > rational(2000000) && denominator(st.m_arith_k_sum) > rational(500)) {
m_relevancy_lvl = 2;
m_relevancy_lemma = false;
}
m_phase_selection = PS_THEORY;
if (!st.m_cnf) {
m_restart_strategy = RS_GEOMETRIC;
m_arith_stronger_lemmas = false;
m_restart_adaptive = false;
}
m_arith_small_lemma_size = 32;
}
void smt_params::setup_QF_LIA() {
m_relevancy_lvl = 0;
m_arith_eq2ineq = true;
m_arith_reflect = false;
m_arith_propagate_eqs = false;
m_nnf_cnf = false;
}
void smt_params::setup_QF_LIA(static_features const& st) {
m_relevancy_lvl = 0;
m_arith_eq2ineq = true;
m_arith_reflect = false;
m_arith_propagate_eqs = false;
m_nnf_cnf = false;
if (st.m_max_ite_tree_depth > 50) {
m_arith_eq2ineq = false;
m_pull_cheap_ite = true;
m_arith_propagate_eqs = true;
m_relevancy_lvl = 2;
m_relevancy_lemma = false;
}
else if (st.m_num_clauses == st.m_num_units) {
m_arith_gcd_test = false;
m_arith_branch_cut_ratio = 4;
m_relevancy_lvl = 2;
m_arith_eq2ineq = true;
m_eliminate_term_ite = true;
}
else {
m_eliminate_term_ite = true;
m_restart_adaptive = false;
m_restart_strategy = RS_GEOMETRIC;
m_restart_factor = 1.5;
}
if (st.m_num_bin_clauses + st.m_num_units == st.m_num_clauses && st.m_cnf && st.m_arith_k_sum > rational(100000)) {
m_arith_bound_prop = bound_prop_mode::BP_NONE;
m_arith_stronger_lemmas = false;
}
}
void smt_params::setup_QF_UFIDL() {
m_relevancy_lvl = 0;
m_arith_reflect = false;
m_nnf_cnf = false;
m_arith_eq_bounds = true;
m_arith_eq2ineq = true;
// m_params.m_phase_selection = PS_THEORY;
m_restart_strategy = RS_GEOMETRIC;
m_restart_factor = 1.5;
m_restart_adaptive = false;
}
void smt_params::setup_QF_UFLIA() {
m_relevancy_lvl = 0;
m_arith_reflect = false;
m_nnf_cnf = false;
m_arith_propagation_threshold = 1000;
}
void smt_params::setup_QF_UFLRA() {
m_relevancy_lvl = 0;
m_arith_reflect = false;
m_nnf_cnf = false;
}
void smt_params::setup_QF_BV() {
m_relevancy_lvl = 0;
m_arith_reflect = false;
m_bv_cc = false;
m_bb_ext_gates = true;
m_nnf_cnf = false;
}
void smt_params::setup_QF_AUFBV() {
m_array_mode = AR_FULL;
m_relevancy_lvl = 0;
m_bv_cc = false;
m_bb_ext_gates = true;
m_nnf_cnf = false;
}
void smt_params::setup_QF_AX() {
m_array_mode = AR_SIMPLE;
m_nnf_cnf = false;
}
void smt_params::setup_QF_AX(static_features const& st) {
m_array_mode = st.m_has_ext_arrays ? AR_FULL : AR_SIMPLE;
m_nnf_cnf = false;
if (st.m_num_clauses == st.m_num_units) {
m_relevancy_lvl = 0;
m_phase_selection = PS_ALWAYS_FALSE;
}
else
m_relevancy_lvl = 2;
}
void smt_params::setup_QF_AUFLIA() {
m_array_mode = AR_SIMPLE;
m_nnf_cnf = false;
m_relevancy_lvl = 2;
m_restart_strategy = RS_GEOMETRIC;
m_restart_factor = 1.5;
m_phase_selection = PS_CACHING_CONSERVATIVE2;
}
void smt_params::setup_QF_AUFLIA(static_features const& st) {
m_array_mode = st.m_has_ext_arrays ? AR_FULL : AR_SIMPLE;
if (st.m_has_real)
throw default_exception("Benchmark has real variables but it is marked as QF_AUFLIA (arrays, uninterpreted functions and linear integer arithmetic).");
m_nnf_cnf = false;
if (st.m_num_clauses == st.m_num_units) {
TRACE(QF_AUFLIA, tout << "using relevancy: 0\n";);
m_relevancy_lvl = 0;
m_phase_selection = PS_ALWAYS_FALSE;
}
else {
m_relevancy_lvl = 0; // it was 2, for some reason 2 doesn't work anymore TODO: investigate
m_restart_strategy = RS_GEOMETRIC;
m_restart_factor = 1.5;
m_phase_selection = PS_CACHING_CONSERVATIVE2;
m_random_initial_activity = IA_ZERO;
}
}
void smt_params::setup_AUFLIA(bool simple_array) {
m_array_mode = simple_array ? AR_SIMPLE : AR_FULL;
m_pi_use_database = true;
m_phase_selection = PS_ALWAYS_FALSE;
m_restart_strategy = RS_GEOMETRIC;
m_restart_factor = 1.5;
m_eliminate_bounds = true;
m_qi_quick_checker = MC_UNSAT;
m_qi_lazy_threshold = 20;
m_mbqi = true; // enabling MBQI and MACRO_FINDER by default :-)
// MACRO_FINDER is a horrible for AUFLIA and UFNIA benchmarks (boogie benchmarks in general)
// It destroys the existing patterns.
// m_macro_finder = true;
if (m_ng_lift_ite == lift_ite_kind::LI_NONE)
m_ng_lift_ite = lift_ite_kind::LI_CONSERVATIVE;
}
void smt_params::setup_AUFLIA(static_features const & st) {
m_qi_eager_threshold = st.m_num_quantifiers_with_patterns == 0 ? 5 : 7;
}
void smt_params::setup_AUFLIRA(bool simple_array) {
m_array_mode = simple_array ? AR_SIMPLE : AR_FULL;
m_phase_selection = PS_ALWAYS_FALSE;
m_eliminate_bounds = true;
m_qi_quick_checker = MC_UNSAT;
m_qi_eager_threshold = 5;
// Added for MBQI release
m_qi_lazy_threshold = 20;
//
m_macro_finder = true;
if (m_ng_lift_ite == lift_ite_kind::LI_NONE)
m_ng_lift_ite = lift_ite_kind::LI_CONSERVATIVE;
m_pi_max_multi_patterns = 10; //<< it was used for SMT-COMP
m_array_lazy_ieq = true;
m_array_lazy_ieq_delay = 4;
//
m_mbqi = true; // enabling MBQI by default :-)
//
}
void smt_params::setup_LRA() {
m_relevancy_lvl = 0;
m_arith_reflect = false;
m_arith_propagate_eqs = false;
m_eliminate_term_ite = true;
}

View file

@ -1,315 +0,0 @@
/*++
Copyright (c) 2006 Microsoft Corporation
Module Name:
smt_params.h
Abstract:
<abstract>
Author:
Leonardo de Moura (leonardo) 2008-02-20.
Revision History:
--*/
#pragma once
#include "ast/static_features.h"
#include "smt/params/dyn_ack_params.h"
#include "smt/params/qi_params.h"
#include "smt/params/theory_arith_params.h"
#include "smt/params/theory_array_params.h"
#include "smt/params/theory_bv_params.h"
#include "smt/params/theory_str_params.h"
#include "smt/params/theory_seq_params.h"
#include "smt/params/theory_pb_params.h"
#include "smt/params/theory_datatype_params.h"
#include "smt/params/preprocessor_params.h"
#include "params/context_params.h"
enum phase_selection {
PS_ALWAYS_FALSE,
PS_ALWAYS_TRUE,
PS_CACHING,
PS_CACHING_CONSERVATIVE,
PS_CACHING_CONSERVATIVE2, // similar to the previous one, but alternated default config from time to time.
PS_RANDOM,
PS_OCCURRENCE,
PS_THEORY
};
enum restart_strategy {
RS_GEOMETRIC,
RS_IN_OUT_GEOMETRIC,
RS_LUBY,
RS_FIXED,
RS_ARITHMETIC
};
enum lemma_gc_strategy {
LGC_FIXED,
LGC_GEOMETRIC,
LGC_AT_RESTART,
LGC_NONE
};
enum initial_activity {
IA_ZERO, // initialized with 0
IA_RANDOM_WHEN_SEARCHING, // random when searching
IA_RANDOM // always random
};
enum case_split_strategy {
CS_ACTIVITY, // case split based on activity
CS_ACTIVITY_DELAY_NEW, // case split based on activity but delay new case splits created during the search
CS_ACTIVITY_WITH_CACHE, // case split based on activity and cache the activity
CS_RELEVANCY, // case split based on relevancy
CS_RELEVANCY_ACTIVITY, // case split based on relevancy and activity
CS_RELEVANCY_GOAL, // based on relevancy and the current goal
CS_ACTIVITY_THEORY_AWARE_BRANCHING // activity-based case split, but theory solvers can manipulate activity
};
struct smt_params : public preprocessor_params,
public dyn_ack_params,
public qi_params,
public theory_arith_params,
public theory_array_params,
public theory_bv_params,
public theory_str_params,
public theory_seq_params,
public theory_pb_params,
public theory_datatype_params {
bool m_display_proof = false;
bool m_display_dot_proof = false;
bool m_display_unsat_core = false;
bool m_check_proof = false;
bool m_eq_propagation = true;
bool m_binary_clause_opt = true;
unsigned m_relevancy_lvl = 2;
bool m_relevancy_lemma = false;
unsigned m_random_seed = 0;
double m_random_var_freq = 0.01;
double m_inv_decay = 1.052;
unsigned m_clause_decay = 1;
initial_activity m_random_initial_activity = initial_activity::IA_RANDOM_WHEN_SEARCHING;
phase_selection m_phase_selection = phase_selection::PS_CACHING_CONSERVATIVE;
unsigned m_phase_caching_on = 700;
unsigned m_phase_caching_off = 100;
bool m_minimize_lemmas = true;
unsigned m_max_conflicts = UINT_MAX;
unsigned m_restart_max;
unsigned m_cube_depth = 1;
unsigned m_threads = 1;
unsigned m_threads_max_conflicts = UINT_MAX;
unsigned m_threads_cube_frequency = 2;
bool m_simplify_clauses = true;
unsigned m_tick = 1000;
bool m_display_features = false;
bool m_new_core2th_eq = true;
bool m_ematching = true;
bool m_induction = false;
bool m_clause_proof = false;
symbol m_proof_log;
bool m_sls_enable = false;
bool m_sls_parallel = true;
// -----------------------------------
//
// Case split strategy
//
// -----------------------------------
case_split_strategy m_case_split_strategy = case_split_strategy::CS_ACTIVITY_DELAY_NEW;
unsigned m_rel_case_split_order = 0;
bool m_lookahead_diseq = false;
bool m_theory_case_split = false;
bool m_theory_aware_branching = false;
// -----------------------------------
//
// Delay units...
//
// -----------------------------------
bool m_delay_units = false;
unsigned m_delay_units_threshold = 32;
// -----------------------------------
//
// Conflict resolution
//
// -----------------------------------
bool m_theory_resolve = false;
// -----------------------------------
//
// Restart
//
// -----------------------------------
restart_strategy m_restart_strategy = restart_strategy::RS_IN_OUT_GEOMETRIC;
unsigned m_restart_initial = 100;
double m_restart_factor = 1.1;
bool m_restart_adaptive = true;
double m_agility_factor = 0.9999;
double m_restart_agility_threshold = 0.18;
// -----------------------------------
//
// Lemma garbage collection
//
// -----------------------------------
lemma_gc_strategy m_lemma_gc_strategy = lemma_gc_strategy::LGC_FIXED;
bool m_lemma_gc_half = false;
unsigned m_recent_lemmas_size = 100;
unsigned m_lemma_gc_initial = 5000;
double m_lemma_gc_factor = 1.1;
unsigned m_new_old_ratio = 16; //!< the ratio of new and old clauses.
unsigned m_new_clause_activity = 10;
unsigned m_old_clause_activity = 500;
unsigned m_new_clause_relevancy = 45; //!< Max. number of unassigned literals to be considered relevant.
unsigned m_old_clause_relevancy = 6; //!< Max. number of unassigned literals to be considered relevant.
double m_inv_clause_decay = 1; //!< clause activity decay
// -----------------------------------
//
// User propagator configuration
//
// -----------------------------------
bool m_up_persist_clauses = false;
// -----------------------------------
//
// SMT-LIB (debug) pretty printer
//
// -----------------------------------
bool m_axioms2files = false;
bool m_lemmas2console = false;
bool m_instantiations2console = false;
symbol m_logic = symbol::null;
// -----------------------------------
//
// Statistics for Profiling
//
// -----------------------------------
bool m_profile_res_sub = false;
bool m_display_bool_var2expr = false;
bool m_display_ll_bool_var2expr = false;
// -----------------------------------
//
// Model generation
//
// -----------------------------------
bool m_model = true;
bool m_model_on_timeout = false;
bool m_model_on_final_check = false;
// -----------------------------------
//
// Progress sampling
//
// -----------------------------------
unsigned m_progress_sampling_freq = 0;
// -----------------------------------
//
// Debugging goodies
//
// -----------------------------------
bool m_core_validate = false;
// -----------------------------------
//
// From front_end_params
//
// -----------------------------------
bool m_preprocess = true; // temporary hack for disabling all preprocessing..
bool m_user_theory_preprocess_axioms = false;
bool m_user_theory_persist_axioms = false;
bool m_at_labels_cex = false; // only use labels which contains the @ symbol when building multiple counterexamples.
bool m_check_at_labels = false; // check that @ labels are inserted to generate unique counter-examples.
bool m_dump_goal_as_smt = false;
bool m_auto_config = true;
// -----------------------------------
//
// Spacer hacking
//
// -----------------------------------
bool m_dump_benchmarks;
double m_dump_min_time;
bool m_dump_recheck;
// -----------------------------------
//
// Solver selection
//
// -----------------------------------
symbol m_string_solver;
smt_params(params_ref const & p = params_ref()):
m_string_solver(symbol("auto")){
updt_local_params(p);
}
void updt_local_params(params_ref const & p);
void updt_params(params_ref const & p);
void updt_params(context_params const & p);
void display(std::ostream & out) const;
void validate_string_solver(symbol const& s) const;
void setup_QF_UF();
void setup_QF_RDL();
void setup_QF_RDL(static_features & st);
void setup_QF_IDL();
void setup_QF_IDL(static_features & st);
void setup_QF_LRA();
void setup_QF_LRA(static_features const& st);
void setup_QF_LIA();
void setup_QF_LIA(static_features const& st);
void setup_QF_UFIDL();
void setup_QF_UFLIA();
void setup_QF_UFLRA();
void setup_QF_BV();
void setup_QF_AUFBV();
void setup_QF_AX();
void setup_QF_AX(static_features const& st);
void setup_QF_AUFLIA();
void setup_QF_AUFLIA(static_features const& st);
void setup_AUFLIA(bool simple_array);
void setup_AUFLIA(static_features const & st);
void setup_AUFLIRA(bool simple_array);
void setup_LRA();
};

View file

@ -1,150 +0,0 @@
def_module_params(module_name='smt',
class_name='smt_params_helper',
description='smt solver based on lazy smt',
export=True,
params=(('auto_config', BOOL, True, 'automatically configure solver'),
('logic', SYMBOL, '', 'logic used to setup the SMT solver'),
('random_seed', UINT, 0, 'random seed for the smt solver'),
('relevancy', UINT, 2, 'relevancy propagation heuristic: 0 - disabled, 1 - relevancy is tracked by only affects quantifier instantiation, 2 - relevancy is tracked, and an atom is only asserted if it is relevant'),
('macro_finder', BOOL, False, 'try to find universally quantified formulas that can be viewed as macros'),
('quasi_macros', BOOL, False, 'try to find universally quantified formulas that are quasi-macros'),
('restricted_quasi_macros', BOOL, False, 'try to find universally quantified formulas that are restricted quasi-macros'),
('ematching', BOOL, True, 'E-Matching based quantifier instantiation'),
('phase_selection', UINT, 3, 'phase selection heuristic: 0 - always false, 1 - always true, 2 - phase caching, 3 - phase caching conservative, 4 - phase caching conservative 2, 5 - random, 6 - number of occurrences, 7 - theory'),
('phase_caching_on', UINT, 400, 'number of conflicts while phase caching is on'),
('phase_caching_off', UINT, 100, 'number of conflicts while phase caching is off'),
('restart_strategy', UINT, 1, '0 - geometric, 1 - inner-outer-geometric, 2 - luby, 3 - fixed, 4 - arithmetic'),
('restart_factor', DOUBLE, 1.1, 'when using geometric (or inner-outer-geometric) progression of restarts, it specifies the constant used to multiply the current restart threshold'),
('case_split', UINT, 1, '0 - case split based on variable activity, 1 - similar to 0, but delay case splits created during the search, 2 - similar to 0, but cache the relevancy, 3 - case split based on relevancy (structural splitting), 4 - case split on relevancy and activity, 5 - case split on relevancy and current goal, 6 - activity-based case split with theory-aware branching activity'),
('delay_units', BOOL, False, 'if true then z3 will not restart when a unit clause is learned'),
('delay_units_threshold', UINT, 32, 'maximum number of learned unit clauses before restarting, ignored if delay_units is false'),
('elim_unconstrained', BOOL, True, 'pre-processing: eliminate unconstrained subterms'),
('solve_eqs', BOOL, True, 'pre-processing: solve equalities'),
('propagate_values', BOOL, True, 'pre-processing: propagate values'),
('bound_simplifier', BOOL, True, 'apply bounds simplification during pre-processing'),
('pull_nested_quantifiers', BOOL, False, 'pre-processing: pull nested quantifiers'),
('refine_inj_axioms', BOOL, True, 'pre-processing: refine injectivity axioms'),
('candidate_models', BOOL, False, 'create candidate models even when quantifier or theory reasoning is incomplete'),
('max_conflicts', UINT, UINT_MAX, 'maximum number of conflicts before giving up.'),
('restart.max', UINT, UINT_MAX, 'maximal number of restarts.'),
('cube_depth', UINT, 1, 'cube depth.'),
('threads', UINT, 1, 'maximal number of parallel threads.'),
('threads.max_conflicts', UINT, 400, 'maximal number of conflicts between rounds of cubing for parallel SMT'),
('threads.cube_frequency', UINT, 2, 'frequency for using cubing'),
('mbqi', BOOL, True, 'model based quantifier instantiation (MBQI)'),
('mbqi.max_cexs', UINT, 1, 'initial maximal number of counterexamples used in MBQI, each counterexample generates a quantifier instantiation'),
('mbqi.max_cexs_incr', UINT, 0, 'increment for MBQI_MAX_CEXS, the increment is performed after each round of MBQI'),
('mbqi.max_iterations', UINT, 1000, 'maximum number of rounds of MBQI'),
('mbqi.trace', BOOL, False, 'generate tracing messages for Model Based Quantifier Instantiation (MBQI). It will display a message before every round of MBQI, and the quantifiers that were not satisfied'),
('mbqi.force_template', UINT, 10, 'some quantifiers can be used as templates for building interpretations for functions. Z3 uses heuristics to decide whether a quantifier will be used as a template or not. Quantifiers with weight >= mbqi.force_template are forced to be used as a template'),
('mbqi.id', STRING, '', 'Only use model-based instantiation for quantifiers with id\'s beginning with string'),
('q.lift_ite', UINT, 0, '0 - don not lift non-ground if-then-else, 1 - use conservative ite lifting, 2 - use full lifting of if-then-else under quantifiers'),
('q.lite', BOOL, False, 'Use cheap quantifier elimination during pre-processing'),
('qi.profile', BOOL, False, 'profile quantifier instantiation'),
('qi.profile_freq', UINT, UINT_MAX, 'how frequent results are reported by qi.profile'),
('qi.max_instances', UINT, UINT_MAX, 'maximum number of quantifier instantiations'),
('qi.eager_threshold', DOUBLE, 10.0, 'threshold for eager quantifier instantiation'),
('qi.lazy_threshold', DOUBLE, 20.0, 'threshold for lazy quantifier instantiation'),
('qi.cost', STRING, '(+ weight generation)', 'expression specifying what is the cost of a given quantifier instantiation'),
('qi.max_multi_patterns', UINT, 0, 'specify the number of extra multi patterns'),
('qi.quick_checker', UINT, 0, 'specify quick checker mode, 0 - no quick checker, 1 - using unsat instances, 2 - using both unsat and no-sat instances'),
('induction', BOOL, False, 'enable generation of induction lemmas'),
('bv.reflect', BOOL, True, 'create enode for every bit-vector term'),
('bv.enable_int2bv', BOOL, True, 'enable support for int2bv and bv2int operators'),
('bv.watch_diseq', BOOL, False, 'use watch lists instead of eager axioms for bit-vectors'),
('bv.delay', BOOL, False, 'delay internalize expensive bit-vector operations'),
('bv.size_reduce', BOOL, False, 'pre-processing; turn assertions that set the upper bits of a bit-vector to constants into a substitution that replaces the bit-vector with constant bits. Useful for minimizing circuits as many input bits to circuits are constant'),
('bv.solver', UINT, 0, 'bit-vector solver engine: 0 - bit-blasting, 1 - polysat, 2 - intblast, requires sat.smt=true'),
('arith.random_initial_value', BOOL, False, 'use random initial values in the simplex-based procedure for linear arithmetic'),
('arith.solver', UINT, 6, 'arithmetic solver: 0 - no solver, 1 - bellman-ford based solver (diff. logic only), 2 - simplex based solver, 3 - floyd-warshall based solver (diff. logic only) and no theory combination 4 - utvpi, 5 - infinitary lra, 6 - lra solver'),
('arith.nl', BOOL, True, '(incomplete) nonlinear arithmetic support based on Groebner basis and interval propagation, relevant only if smt.arith.solver=2'),
('arith.nl.nra', BOOL, True, 'call nra_solver when incremental linearization does not produce a lemma, this option is ignored when arith.nl=false, relevant only if smt.arith.solver=6'),
('arith.nl.branching', BOOL, True, 'branching on integer variables in non linear clusters'),
('arith.nl.expensive_patching', BOOL, False, 'use the expensive of monomials'),
('arith.nl.rounds', UINT, 1024, 'threshold for number of (nested) final checks for non linear arithmetic, relevant only if smt.arith.solver=2'),
('arith.nl.order', BOOL, True, 'run order lemmas'),
('arith.nl.expp', BOOL, False, 'expensive patching'),
('arith.nl.tangents', BOOL, True, 'run tangent lemmas'),
('arith.nl.horner', BOOL, True, 'run horner\'s heuristic'),
('arith.nl.horner_subs_fixed', UINT, 2, '0 - no subs, 1 - substitute, 2 - substitute fixed zeros only'),
('arith.nl.horner_frequency', UINT, 4, 'horner\'s call frequency'),
('arith.nl.horner_row_length_limit', UINT, 10, 'row is disregarded by the heuristic if its length is longer than the value'),
('arith.nl.grobner_row_length_limit', UINT, 10, 'row is disregarded by the heuristic if its length is longer than the value'),
('arith.nl.grobner_frequency', UINT, 4, 'grobner\'s call frequency'),
('arith.nl.grobner', BOOL, True, 'run grobner\'s basis heuristic'),
('arith.nl.grobner_eqs_growth', UINT, 10, 'grobner\'s number of equalities growth '),
('arith.nl.grobner_expr_size_growth', UINT, 2, 'grobner\'s maximum expr size growth'),
('arith.nl.grobner_expr_degree_growth', UINT, 2, 'grobner\'s maximum expr degree growth'),
('arith.nl.grobner_max_simplified', UINT, 10000, 'grobner\'s maximum number of simplifications'),
('arith.nl.grobner_cnfl_to_report', UINT, 1, 'grobner\'s maximum number of conflicts to report'),
('arith.nl.gr_q', UINT, 10, 'grobner\'s quota'),
('arith.nl.grobner_subs_fixed', UINT, 1, '0 - no subs, 1 - substitute, 2 - substitute fixed zeros only'),
('arith.nl.delay', UINT, 10, 'number of calls to final check before invoking bounded nlsat check'),
('arith.nl.propagate_linear_monomials', BOOL, True, 'propagate linear monomials'),
('arith.nl.optimize_bounds', BOOL, True, 'enable bounds optimization'),
('arith.nl.cross_nested', BOOL, True, 'enable cross-nested consistency checking'),
('arith.nl.log', BOOL, False, 'Log lemmas sent to nra solver'),
('arith.propagate_eqs', BOOL, True, 'propagate (cheap) equalities'),
('arith.propagation_mode', UINT, 1, '0 - no propagation, 1 - propagate existing literals, 2 - refine finite bounds'),
('arith.branch_cut_ratio', UINT, 2, 'branch/cut ratio for linear integer arithmetic'),
('arith.int_eq_branch', BOOL, False, 'branching using derived integer equations'),
('arith.ignore_int', BOOL, False, 'treat integer variables as real'),
('arith.dump_lemmas', BOOL, False, 'dump arithmetic theory lemmas to files'),
('arith.dump_bound_lemmas', BOOL, False, 'dump linear solver bounds to files in smt2 format'),
('arith.greatest_error_pivot', BOOL, False, 'Pivoting strategy'),
('arith.eager_eq_axioms', BOOL, True, 'eager equality axioms'),
('arith.auto_config_simplex', BOOL, False, 'force simplex solver in auto_config'),
('arith.rep_freq', UINT, 0, 'the report frequency, in how many iterations print the cost and other info'),
('arith.min', BOOL, False, 'minimize cost'),
('arith.print_stats', BOOL, False, 'print statistic'),
('arith.validate', BOOL, False, 'validate lemmas generated by arithmetic solver'),
('arith.simplex_strategy', UINT, 0, 'simplex strategy for the solver'),
('arith.enable_hnf', BOOL, True, 'enable hnf (Hermite Normal Form) cuts'),
('arith.bprop_on_pivoted_rows', BOOL, True, 'propagate bounds on rows changed by the pivot operation'),
('arith.print_ext_var_names', BOOL, False, 'print external variable names'),
('pb.conflict_frequency', UINT, 1000, 'conflict frequency for Pseudo-Boolean theory'),
('pb.learn_complements', BOOL, True, 'learn complement literals for Pseudo-Boolean theory'),
('up.persist_clauses', BOOL, False, 'replay propagated clauses below the levels they are asserted'),
('array.weak', BOOL, False, 'weak array theory'),
('array.extensional', BOOL, True, 'extensional array theory'),
('clause_proof', BOOL, False, 'record a clausal proof'),
('dack', UINT, 1, '0 - disable dynamic ackermannization, 1 - expand Leibniz\'s axiom if a congruence is the root of a conflict, 2 - expand Leibniz\'s axiom if a congruence is used during conflict resolution'),
('dack.eq', BOOL, False, 'enable dynamic ackermannization for transitivity of equalities'),
('dack.factor', DOUBLE, 0.1, 'number of instance per conflict'),
('dack.gc', UINT, 2000, 'Dynamic ackermannization garbage collection frequency (per conflict)'),
('dack.gc_inv_decay', DOUBLE, 0.8, 'Dynamic ackermannization garbage collection decay'),
('dack.threshold', UINT, 10, ' number of times the congruence rule must be used before Leibniz\'s axiom is expanded'),
('theory_case_split', BOOL, False, 'Allow the context to use heuristics involving theory case splits, which are a set of literals of which exactly one can be assigned True. If this option is false, the context will generate extra axioms to enforce this instead.'),
('string_solver', SYMBOL, 'seq', 'solver for string/sequence theories. options are: \'z3str3\' (specialized string solver), \'seq\' (sequence solver), \'auto\' (use static features to choose best solver), \'empty\' (a no-op solver that forces an answer unknown if strings were used), \'none\' (no solver)'),
('core.validate', BOOL, False, '[internal] validate unsat core produced by SMT context. This option is intended for debugging'),
('seq.split_w_len', BOOL, True, 'enable splitting guided by length constraints'),
('seq.validate', BOOL, False, 'enable self-validation of theory axioms created by seq theory'),
('seq.max_unfolding', UINT, 1000000000, 'maximal unfolding depth for checking string equations and regular expressions'),
('seq.min_unfolding', UINT, 1, 'initial bound for strings whose lengths are bounded by iterative deepening. Set this to a higher value if there are only models with larger string lengths'),
('str.strong_arrangements', BOOL, True, 'assert equivalences instead of implications when generating string arrangement axioms'),
('str.aggressive_length_testing', BOOL, False, 'prioritize testing concrete length values over generating more options'),
('str.aggressive_value_testing', BOOL, False, 'prioritize testing concrete string constant values over generating more options'),
('str.aggressive_unroll_testing', BOOL, True, 'prioritize testing concrete regex unroll counts over generating more options'),
('str.fast_length_tester_cache', BOOL, False, 'cache length tester constants instead of regenerating them'),
('str.fast_value_tester_cache', BOOL, True, 'cache value tester constants instead of regenerating them'),
('str.string_constant_cache', BOOL, True, 'cache all generated string constants generated from anywhere in theory_str'),
('theory_aware_branching', BOOL, False, 'Allow the context to use extra information from theory solvers regarding literal branching prioritization.'),
('str.overlap_priority', DOUBLE, -0.1, 'theory-aware priority for overlapping variable cases; use smt.theory_aware_branching=true'),
('str.regex_automata_difficulty_threshold', UINT, 1000, 'difficulty threshold for regex automata heuristics'),
('str.regex_automata_intersection_difficulty_threshold', UINT, 1000, 'difficulty threshold for regex intersection heuristics'),
('str.regex_automata_failed_automaton_threshold', UINT, 10, 'number of failed automaton construction attempts after which a full automaton is automatically built'),
('str.regex_automata_failed_intersection_threshold', UINT, 10, 'number of failed automaton intersection attempts after which intersection is always computed'),
('str.regex_automata_length_attempt_threshold', UINT, 10, 'number of length/path constraint attempts before checking unsatisfiability of regex terms'),
('str.fixed_length_refinement', BOOL, False, 'use abstraction refinement in fixed-length equation solver (Z3str3 only)'),
('str.fixed_length_naive_cex', BOOL, True, 'construct naive counterexamples when fixed-length model construction fails for a given length assignment (Z3str3 only)'),
('sls.enable', BOOL, False, 'enable sls co-processor with SMT engine'),
('sls.parallel', BOOL, True, 'use sls co-processor in parallel or sequential with SMT engine'),
('core.minimize', BOOL, False, 'minimize unsat core produced by SMT context'),
('core.extend_patterns', BOOL, False, 'extend unsat core with literals that trigger (potential) quantifier instances'),
('core.extend_patterns.max_distance', UINT, UINT_MAX, 'limits the distance of a pattern-extended unsat core'),
('core.extend_nonlocal_patterns', BOOL, False, 'extend unsat cores with literals that have quantifiers with patterns that contain symbols which are not in the quantifier\'s body'),
('lemma_gc_strategy', UINT, 0, 'lemma garbage collection strategy: 0 - fixed, 1 - geometric, 2 - at restart, 3 - none'),
('dt_lazy_splits', UINT, 1, 'How lazy datatype splits are performed: 0- eager, 1- lazy for infinite types, 2- lazy'),
('qsat_use_qel', BOOL, True, 'Use QEL for lite quantifier elimination and model-based projection in QSAT')
))

View file

@ -1,102 +0,0 @@
/*++
Copyright (c) 2006 Microsoft Corporation
Module Name:
theory_arith_params.cpp
Abstract:
<abstract>
Author:
Leonardo de Moura (leonardo) 2008-05-06.
Revision History:
--*/
#include "smt/params/theory_arith_params.h"
#include "smt/params/smt_params_helper.hpp"
#include "params/arith_rewriter_params.hpp"
void theory_arith_params::updt_params(params_ref const & _p) {
smt_params_helper p(_p);
m_arith_random_initial_value = p.arith_random_initial_value();
m_arith_random_seed = p.random_seed();
m_arith_mode = static_cast<arith_solver_id>(p.arith_solver());
m_nl_arith = p.arith_nl();
m_nl_arith_gb = p.arith_nl_grobner();
m_nl_arith_branching = p.arith_nl_branching();
m_nl_arith_rounds = p.arith_nl_rounds();
m_arith_propagate_eqs = p.arith_propagate_eqs();
m_arith_branch_cut_ratio = p.arith_branch_cut_ratio();
m_arith_int_eq_branching = p.arith_int_eq_branch();
m_arith_ignore_int = p.arith_ignore_int();
m_arith_bound_prop = static_cast<bound_prop_mode>(p.arith_propagation_mode());
m_arith_eager_eq_axioms = p.arith_eager_eq_axioms();
m_arith_auto_config_simplex = p.arith_auto_config_simplex();
m_arith_validate = p.arith_validate();
m_arith_dump_lemmas = p.arith_dump_lemmas();
m_nl_arith_propagate_linear_monomials = p.arith_nl_propagate_linear_monomials();
m_nl_arith_optimize_bounds = p.arith_nl_optimize_bounds();
m_nl_arith_cross_nested = p.arith_nl_cross_nested();
arith_rewriter_params ap(_p);
m_arith_eq2ineq = ap.eq2ineq();
}
#define DISPLAY_PARAM(X) out << #X"=" << X << '\n';
void theory_arith_params::display(std::ostream & out) const {
DISPLAY_PARAM(m_arith_eq2ineq);
DISPLAY_PARAM(m_arith_process_all_eqs);
DISPLAY_PARAM((unsigned)m_arith_mode);
DISPLAY_PARAM(m_arith_auto_config_simplex); //!< force simplex solver in auto_config
DISPLAY_PARAM(m_arith_blands_rule_threshold);
DISPLAY_PARAM(m_arith_propagate_eqs);
DISPLAY_PARAM((unsigned)m_arith_bound_prop);
DISPLAY_PARAM(m_arith_stronger_lemmas);
DISPLAY_PARAM(m_arith_skip_rows_with_big_coeffs);
DISPLAY_PARAM(m_arith_max_lemma_size);
DISPLAY_PARAM(m_arith_small_lemma_size);
DISPLAY_PARAM(m_arith_reflect);
DISPLAY_PARAM(m_arith_ignore_int);
DISPLAY_PARAM(m_arith_lazy_pivoting_lvl);
DISPLAY_PARAM(m_arith_random_seed);
DISPLAY_PARAM(m_arith_random_initial_value);
DISPLAY_PARAM(m_arith_random_lower);
DISPLAY_PARAM(m_arith_random_upper);
DISPLAY_PARAM(m_arith_adaptive);
DISPLAY_PARAM(m_arith_adaptive_assertion_threshold);
DISPLAY_PARAM(m_arith_adaptive_propagation_threshold);
DISPLAY_PARAM(m_arith_eager_eq_axioms);
DISPLAY_PARAM(m_arith_branch_cut_ratio);
DISPLAY_PARAM(m_arith_int_eq_branching);
DISPLAY_PARAM(m_arith_enum_const_mod);
DISPLAY_PARAM(m_arith_gcd_test);
DISPLAY_PARAM(m_arith_eager_gcd);
DISPLAY_PARAM(m_arith_adaptive_gcd);
DISPLAY_PARAM(m_arith_propagation_threshold);
DISPLAY_PARAM(m_arith_pivot_strategy);
DISPLAY_PARAM(m_arith_add_binary_bounds);
DISPLAY_PARAM((unsigned)m_arith_propagation_strategy);
DISPLAY_PARAM(m_arith_eq_bounds);
DISPLAY_PARAM(m_arith_lazy_adapter);
DISPLAY_PARAM(m_arith_fixnum);
DISPLAY_PARAM(m_arith_int_only);
DISPLAY_PARAM(m_nl_arith);
DISPLAY_PARAM(m_nl_arith_gb);
DISPLAY_PARAM(m_nl_arith_gb_threshold);
DISPLAY_PARAM(m_nl_arith_gb_eqs);
DISPLAY_PARAM(m_nl_arith_gb_perturbate);
DISPLAY_PARAM(m_nl_arith_max_degree);
DISPLAY_PARAM(m_nl_arith_branching);
DISPLAY_PARAM(m_nl_arith_rounds);
DISPLAY_PARAM(m_nl_arith_propagate_linear_monomials);
DISPLAY_PARAM(m_nl_arith_optimize_bounds);
DISPLAY_PARAM(m_nl_arith_cross_nested);
DISPLAY_PARAM(m_arith_validate);
DISPLAY_PARAM(m_arith_dump_lemmas);
}

View file

@ -1,123 +0,0 @@
/*++
Copyright (c) 2006 Microsoft Corporation
Module Name:
theory_arith_params.h
Abstract:
<abstract>
Author:
Leonardo de Moura (leonardo) 2008-05-06.
Revision History:
--*/
#pragma once
#include<climits>
#include "util/params.h"
enum class arith_solver_id {
AS_NO_ARITH, // 0
AS_DIFF_LOGIC, // 1
AS_OLD_ARITH, // 2
AS_DENSE_DIFF_LOGIC, // 3
AS_UTVPI, // 4
AS_OPTINF, // 5
AS_NEW_ARITH // 6
};
enum class bound_prop_mode {
BP_NONE,
BP_SIMPLE, // only used for implying literals
BP_REFINE // adds new literals, but only refines finite bounds
};
enum class arith_prop_strategy {
ARITH_PROP_AGILITY,
ARITH_PROP_PROPORTIONAL
};
enum class arith_pivot_strategy {
ARITH_PIVOT_SMALLEST,
ARITH_PIVOT_GREATEST_ERROR,
ARITH_PIVOT_LEAST_ERROR
};
inline std::ostream& operator<<(std::ostream& out, arith_pivot_strategy st) { return out << (int)st; }
struct theory_arith_params {
bool m_arith_eq2ineq = false;
bool m_arith_process_all_eqs = false;
arith_solver_id m_arith_mode = arith_solver_id::AS_NEW_ARITH;
bool m_arith_auto_config_simplex = false; //!< force simplex solver in auto_config
unsigned m_arith_blands_rule_threshold = 1000;
bool m_arith_propagate_eqs = true;
bound_prop_mode m_arith_bound_prop = bound_prop_mode::BP_REFINE;
bool m_arith_stronger_lemmas = true;
bool m_arith_skip_rows_with_big_coeffs = true;
unsigned m_arith_max_lemma_size = 128;
unsigned m_arith_small_lemma_size = 16;
bool m_arith_reflect = true;
bool m_arith_ignore_int = false;
unsigned m_arith_lazy_pivoting_lvl = 0;
unsigned m_arith_random_seed = 0;
bool m_arith_random_initial_value = false;
int m_arith_random_lower = -1000;
int m_arith_random_upper = 1000;
bool m_arith_adaptive = false;
double m_arith_adaptive_assertion_threshold = 0.2;
double m_arith_adaptive_propagation_threshold = 0.4;
bool m_arith_eager_eq_axioms = true;
unsigned m_arith_branch_cut_ratio = 2;
bool m_arith_int_eq_branching = false;
bool m_arith_enum_const_mod = false;
bool m_arith_gcd_test = true;
bool m_arith_eager_gcd = false;
bool m_arith_adaptive_gcd = false;
unsigned m_arith_propagation_threshold = UINT_MAX;
bool m_arith_validate = false;
bool m_arith_dump_lemmas = false;
arith_pivot_strategy m_arith_pivot_strategy = arith_pivot_strategy::ARITH_PIVOT_SMALLEST;
// used in diff-logic
bool m_arith_add_binary_bounds = false;
arith_prop_strategy m_arith_propagation_strategy = arith_prop_strategy::ARITH_PROP_PROPORTIONAL;
// used arith_eq_adapter
bool m_arith_eq_bounds = false;
bool m_arith_lazy_adapter = false;
// performance debugging flags
bool m_arith_fixnum = false;
bool m_arith_int_only = false;
// non linear support
bool m_nl_arith = true;
bool m_nl_arith_gb = true;
unsigned m_nl_arith_gb_threshold = 512;
bool m_nl_arith_gb_eqs = false;
bool m_nl_arith_gb_perturbate = true;
unsigned m_nl_arith_max_degree = 6;
bool m_nl_arith_branching = true;
unsigned m_nl_arith_rounds = 1024;
bool m_nl_arith_propagate_linear_monomials = true;
bool m_nl_arith_optimize_bounds = true;
bool m_nl_arith_cross_nested = true;
theory_arith_params(params_ref const & p = params_ref()) {
updt_params(p);
}
void updt_params(params_ref const & p);
void display(std::ostream & out) const;
};

View file

@ -1,40 +0,0 @@
/*++
Copyright (c) 2006 Microsoft Corporation
Module Name:
theory_array_params.cpp
Abstract:
<abstract>
Author:
Leonardo de Moura (leonardo) 2008-05-06.
Revision History:
--*/
#include "smt/params/theory_array_params.h"
#include "smt/params/smt_params_helper.hpp"
void theory_array_params::updt_params(params_ref const & _p) {
smt_params_helper p(_p);
m_array_weak = p.array_weak();
m_array_extensional = p.array_extensional();
}
#define DISPLAY_PARAM(X) out << #X"=" << X << '\n';
void theory_array_params::display(std::ostream & out) const {
DISPLAY_PARAM(m_array_mode);
DISPLAY_PARAM(m_array_weak);
DISPLAY_PARAM(m_array_extensional);
DISPLAY_PARAM(m_array_laziness);
DISPLAY_PARAM(m_array_delay_exp_axiom);
DISPLAY_PARAM(m_array_cg);
DISPLAY_PARAM(m_array_always_prop_upward);
DISPLAY_PARAM(m_array_lazy_ieq);
DISPLAY_PARAM(m_array_lazy_ieq_delay);
}

View file

@ -1,50 +0,0 @@
/*++
Copyright (c) 2006 Microsoft Corporation
Module Name:
theory_array_params.h
Abstract:
<abstract>
Author:
Leonardo de Moura (leonardo) 2008-06-01.
Revision History:
--*/
#pragma once
#include "util/params.h"
enum array_solver_id {
AR_NO_ARRAY,
AR_SIMPLE,
AR_MODEL_BASED,
AR_FULL
};
struct theory_array_params {
bool m_array_canonize_simplify = false;
bool m_array_simplify = true; // temporary hack for disabling array simplifier plugin.
array_solver_id m_array_mode = array_solver_id::AR_FULL;
bool m_array_weak = false;
bool m_array_extensional = true;
unsigned m_array_laziness = 1;
bool m_array_delay_exp_axiom = true;
bool m_array_cg = false;
bool m_array_always_prop_upward = true;
bool m_array_lazy_ieq = false;
unsigned m_array_lazy_ieq_delay = 10;
bool m_array_fake_support = false; // fake support for all array operations to pretend they are satisfiable.
void updt_params(params_ref const & _p);
void display(std::ostream & out) const;
};

View file

@ -1,47 +0,0 @@
/*++
Copyright (c) 2012 Microsoft Corporation
Module Name:
theory_bv_params.cpp
Abstract:
<abstract>
Author:
Leonardo de Moura (leonardo) 2012-12-02.
Revision History:
--*/
#include "smt/params/theory_bv_params.h"
#include "smt/params/smt_params_helper.hpp"
#include "params/bv_rewriter_params.hpp"
void theory_bv_params::updt_params(params_ref const & _p) {
smt_params_helper p(_p);
bv_rewriter_params rp(_p);
m_hi_div0 = rp.hi_div0();
m_bv_reflect = p.bv_reflect();
m_bv_enable_int2bv2int = p.bv_enable_int2bv();
m_bv_delay = p.bv_delay();
m_bv_size_reduce = p.bv_size_reduce();
m_bv_solver = p.bv_solver();
}
#define DISPLAY_PARAM(X) out << #X"=" << X << '\n';
void theory_bv_params::display(std::ostream & out) const {
DISPLAY_PARAM(m_bv_mode);
DISPLAY_PARAM(m_hi_div0);
DISPLAY_PARAM(m_bv_reflect);
DISPLAY_PARAM(m_bv_lazy_le);
DISPLAY_PARAM(m_bv_cc);
DISPLAY_PARAM(m_bv_blast_max_size);
DISPLAY_PARAM(m_bv_enable_int2bv2int);
DISPLAY_PARAM(m_bv_delay);
DISPLAY_PARAM(m_bv_size_reduce);
DISPLAY_PARAM(m_bv_solver);
}

View file

@ -1,49 +0,0 @@
/*++
Copyright (c) 2006 Microsoft Corporation
Module Name:
theory_bv_params.h
Abstract:
<abstract>
Author:
Leonardo de Moura (leonardo) 2008-06-06.
Revision History:
--*/
#pragma once
#include "util/params.h"
enum bv_solver_id {
BS_NO_BV,
BS_BLASTER
};
struct theory_bv_params {
bv_solver_id m_bv_mode = bv_solver_id::BS_BLASTER;
bool m_hi_div0 = false; //!< if true, uses the hardware interpretation for div0, mod0, ... if false, div0, mod0, ... are considered uninterpreted.
bool m_bv_reflect = true;
bool m_bv_lazy_le = false;
bool m_bv_cc = false;
unsigned m_bv_blast_max_size = INT_MAX;
bool m_bv_enable_int2bv2int = true;
bool m_bv_watch_diseq = false;
bool m_bv_delay = true;
bool m_bv_size_reduce = false;
unsigned m_bv_solver = 0;
theory_bv_params(params_ref const & p = params_ref()) {
updt_params(p);
}
void updt_params(params_ref const & p);
void display(std::ostream & out) const;
};

View file

@ -1,39 +0,0 @@
/*++
Copyright (c) 2006 Microsoft Corporation
Module Name:
theory_datatype_params.h
Abstract:
<abstract>
Author:
Leonardo de Moura (leonardo) 2008-11-04.
Revision History:
--*/
#pragma once
#include "smt/params/smt_params_helper.hpp"
struct theory_datatype_params {
unsigned m_dt_lazy_splits;
theory_datatype_params():
m_dt_lazy_splits(1) {
}
void updt_params(params_ref const & _p) {
smt_params_helper p(_p);
m_dt_lazy_splits = p.dt_lazy_splits();
}
void display(std::ostream & out) const { out << "m_dt_lazy_splits=" << m_dt_lazy_splits << '\n'; }
};

View file

@ -1,33 +0,0 @@
/*++
Copyright (c) 2014 Microsoft Corporation
Module Name:
theory_pb_params.cpp
Abstract:
<abstract>
Author:
Nikolaj Bjorner (nbjorner) 2014-01-01
Revision History:
--*/
#include "smt/params/theory_pb_params.h"
#include "smt/params/smt_params_helper.hpp"
void theory_pb_params::updt_params(params_ref const & _p) {
smt_params_helper p(_p);
m_pb_conflict_frequency = p.pb_conflict_frequency();
m_pb_learn_complements = p.pb_learn_complements();
}
#define DISPLAY_PARAM(X) out << #X"=" << X << '\n';
void theory_pb_params::display(std::ostream & out) const {
DISPLAY_PARAM(m_pb_conflict_frequency);
DISPLAY_PARAM(m_pb_learn_complements);
}

View file

@ -1,36 +0,0 @@
/*++
Copyright (c) 2013 Microsoft Corporation
Module Name:
theory_pb_params.h
Abstract:
<abstract>
Author:
Nikolaj Bjorner (nbjorner) 2014-01-01
Revision History:
--*/
#pragma once
#include "util/params.h"
struct theory_pb_params {
unsigned m_pb_conflict_frequency = 1000;
bool m_pb_learn_complements = true;
theory_pb_params(params_ref const & p = params_ref()) {
updt_params(p);
}
void updt_params(params_ref const & p);
void display(std::ostream & out) const;
};

View file

@ -1,26 +0,0 @@
/*++
Copyright (c) 2018 Microsoft Corporation
Module Name:
theory_seq_params.cpp
Abstract:
Parameters for sequence theory plugin
Revision History:
--*/
#include "smt/params/theory_seq_params.h"
#include "smt/params/smt_params_helper.hpp"
void theory_seq_params::updt_params(params_ref const & _p) {
smt_params_helper p(_p);
m_split_w_len = p.seq_split_w_len();
m_seq_validate = p.seq_validate();
m_seq_max_unfolding = p.seq_max_unfolding();
m_seq_min_unfolding = p.seq_min_unfolding();
}

View file

@ -1,36 +0,0 @@
/*++
Copyright (c) 2018 Microsoft Corporation
Module Name:
theory_seq_params.h
Abstract:
Parameters for sequence theory plugin
Revision History:
--*/
#pragma once
#include "util/params.h"
struct theory_seq_params {
/*
* Enable splitting guided by length constraints
*/
bool m_split_w_len = false;
bool m_seq_validate = false;
unsigned m_seq_max_unfolding = UINT_MAX/4;
unsigned m_seq_min_unfolding = 1;
theory_seq_params(params_ref const & p = params_ref()) {
updt_params(p);
}
void updt_params(params_ref const & p);
};

View file

@ -1,57 +0,0 @@
/*++
Module Name:
theory_str_params.cpp
Abstract:
Parameters for string theory plugin
Author:
Murphy Berzish (mtrberzi) 2016-12-13
Revision History:
--*/
#include "smt/params/theory_str_params.h"
#include "smt/params/smt_params_helper.hpp"
void theory_str_params::updt_params(params_ref const & _p) {
smt_params_helper p(_p);
m_StrongArrangements = p.str_strong_arrangements();
m_AggressiveLengthTesting = p.str_aggressive_length_testing();
m_AggressiveValueTesting = p.str_aggressive_value_testing();
m_AggressiveUnrollTesting = p.str_aggressive_unroll_testing();
m_UseFastLengthTesterCache = p.str_fast_length_tester_cache();
m_UseFastValueTesterCache = p.str_fast_value_tester_cache();
m_StringConstantCache = p.str_string_constant_cache();
m_OverlapTheoryAwarePriority = p.str_overlap_priority();
m_RegexAutomata_DifficultyThreshold = p.str_regex_automata_difficulty_threshold();
m_RegexAutomata_IntersectionDifficultyThreshold = p.str_regex_automata_intersection_difficulty_threshold();
m_RegexAutomata_FailedAutomatonThreshold = p.str_regex_automata_failed_automaton_threshold();
m_RegexAutomata_FailedIntersectionThreshold = p.str_regex_automata_failed_intersection_threshold();
m_RegexAutomata_LengthAttemptThreshold = p.str_regex_automata_length_attempt_threshold();
m_FixedLengthRefinement = p.str_fixed_length_refinement();
m_FixedLengthNaiveCounterexamples = p.str_fixed_length_naive_cex();
}
#define DISPLAY_PARAM(X) out << #X"=" << X << '\n';
void theory_str_params::display(std::ostream & out) const {
DISPLAY_PARAM(m_StrongArrangements);
DISPLAY_PARAM(m_AggressiveLengthTesting);
DISPLAY_PARAM(m_AggressiveValueTesting);
DISPLAY_PARAM(m_AggressiveUnrollTesting);
DISPLAY_PARAM(m_UseFastLengthTesterCache);
DISPLAY_PARAM(m_UseFastValueTesterCache);
DISPLAY_PARAM(m_StringConstantCache);
DISPLAY_PARAM(m_OverlapTheoryAwarePriority);
DISPLAY_PARAM(m_RegexAutomata_DifficultyThreshold);
DISPLAY_PARAM(m_RegexAutomata_IntersectionDifficultyThreshold);
DISPLAY_PARAM(m_RegexAutomata_FailedAutomatonThreshold);
DISPLAY_PARAM(m_RegexAutomata_FailedIntersectionThreshold);
DISPLAY_PARAM(m_RegexAutomata_LengthAttemptThreshold);
DISPLAY_PARAM(m_FixedLengthNaiveCounterexamples);
}

View file

@ -1,122 +0,0 @@
/*++
Module Name:
theory_str_params.h
Abstract:
Parameters for string theory plugin
Author:
Murphy Berzish (mtrberzi) 2016-12-13
Revision History:
--*/
#pragma once
#include "util/params.h"
struct theory_str_params {
/*
* If AssertStrongerArrangements is set to true,
* the implications that would normally be asserted during arrangement generation
* will instead be asserted as equivalences.
* This is a stronger version of the standard axiom.
* The Z3str2 axioms can be simulated by setting this to false.
*/
bool m_StrongArrangements = true;
/*
* If AggressiveLengthTesting is true, we manipulate the phase of length tester equalities
* to prioritize trying concrete length options over choosing the "more" option.
*/
bool m_AggressiveLengthTesting = false;
/*
* Similarly, if AggressiveValueTesting is true, we manipulate the phase of value tester equalities
* to prioritize trying concrete value options over choosing the "more" option.
*/
bool m_AggressiveValueTesting = false;
/*
* If AggressiveUnrollTesting is true, we manipulate the phase of regex unroll tester equalities
* to prioritize trying concrete unroll counts over choosing the "more" option.
*/
bool m_AggressiveUnrollTesting = true;
/*
* If UseFastLengthTesterCache is set to true,
* length tester terms will not be generated from scratch each time they are needed,
* but will be saved in a map and looked up.
*/
bool m_UseFastLengthTesterCache = false;
/*
* If UseFastValueTesterCache is set to true,
* value tester terms will not be generated from scratch each time they are needed,
* but will be saved in a map and looked up.
*/
bool m_UseFastValueTesterCache = true;
/*
* If StringConstantCache is set to true,
* all string constants in theory_str generated from anywhere will be cached and saved.
*/
bool m_StringConstantCache = true;
double m_OverlapTheoryAwarePriority = -0.1;
/*
* RegexAutomata_DifficultyThreshold is the lowest difficulty above which Z3str3
* will not eagerly construct an automaton for a regular expression term.
*/
unsigned m_RegexAutomata_DifficultyThreshold = 1000;
/*
* RegexAutomata_IntersectionDifficultyThreshold is the lowest difficulty above which Z3str3
* will not eagerly intersect automata to check unsatisfiability.
*/
unsigned m_RegexAutomata_IntersectionDifficultyThreshold = 1000;
/*
* RegexAutomata_FailedAutomatonThreshold is the number of failed attempts to build an automaton
* after which a full automaton (i.e. with no length information) will be built regardless of difficulty.
*/
unsigned m_RegexAutomata_FailedAutomatonThreshold = 10;
/*
* RegexAutomaton_FailedIntersectionThreshold is the number of failed attempts to perform automaton
* intersection after which intersection will always be performed regardless of difficulty.
*/
unsigned m_RegexAutomata_FailedIntersectionThreshold = 10;
/*
* RegexAutomaton_LengthAttemptThreshold is the number of attempts to satisfy length/path constraints
* before which we begin checking unsatisfiability of a regex term.
*/
unsigned m_RegexAutomata_LengthAttemptThreshold = 10;
/*
* If FixedLengthRefinement is true and the fixed-length equation solver is enabled,
* Z3str3 will use abstraction refinement to handle formulas that would result in disjunctions or expensive
* reductions to fixed-length formulas.
*/
bool m_FixedLengthRefinement = false;
/*
* If FixedLengthNaiveCounterexamples is true and the fixed-length equation solver is enabled,
* Z3str3 will only construct simple counterexamples to block unsatisfiable length assignments
* instead of attempting to learn more complex lessons.
*/
bool m_FixedLengthNaiveCounterexamples = true;
theory_str_params(params_ref const & p = params_ref()) {
updt_params(p);
}
void updt_params(params_ref const & p);
void display(std::ostream & out) const;
};

View file

@ -4,5 +4,5 @@ z3_add_component(proto_model
COMPONENT_DEPENDENCIES
model
rewriter
smt_params
params
)

View file

@ -25,7 +25,7 @@ Revision History:
#include "smt/smt_checker.h"
#include "smt/smt_quantifier.h"
#include "smt/fingerprints.h"
#include "smt/params/qi_params.h"
#include "params/qi_params.h"
#include "ast/cost_evaluator.h"
#include "util/statistics.h"

View file

@ -20,7 +20,7 @@ Revision History:
#include "smt/smt_types.h"
#include "util/heap.h"
#include "smt/params/smt_params.h"
#include "params/smt_params.h"
namespace smt {
class context;

View file

@ -24,7 +24,7 @@ Revision History:
#include "smt/smt_enode.h"
#include "smt/dyn_ack.h"
#include "util/obj_pair_hashtable.h"
#include "smt/params/smt_params.h"
#include "params/smt_params.h"
#include "util/obj_pair_hashtable.h"
#include "util/map.h"
#include "smt/watch_list.h"

View file

@ -21,7 +21,7 @@ Revision History:
#include "smt/smt_lookahead.h"
#include "ast/ast_smt2_pp.h"
#include "ast/ast_util.h"
#include "smt/params/smt_params_helper.hpp"
#include "params/smt_params_helper.hpp"
namespace smt {

View file

@ -24,8 +24,8 @@ Revision History:
#include "ast/ast.h"
#include "ast/array_decl_plugin.h"
#include "ast/normal_forms/defined_names.h"
#include "smt/params/qi_params.h"
#include "smt/params/smt_params.h"
#include "params/qi_params.h"
#include "params/smt_params.h"
class proto_model;
class model;

View file

@ -19,7 +19,7 @@ Revision History:
#pragma once
#include "ast/ast.h"
#include "smt/params/smt_params.h"
#include "params/smt_params.h"
struct static_features;
namespace smt {

View file

@ -23,8 +23,8 @@ Notes:
#include "ast/ast_pp.h"
#include "ast/func_decl_dependencies.h"
#include "smt/smt_kernel.h"
#include "smt/params/smt_params.h"
#include "smt/params/smt_params_helper.hpp"
#include "params/smt_params.h"
#include "params/smt_params_helper.hpp"
#include "solver/solver_na2as.h"
#include "solver/mus.h"

View file

@ -29,7 +29,7 @@ and V is a value (true or false) and x is a subterm
#include "smt/tactic/ctx_solver_simplify_tactic.h"
#include "ast/arith_decl_plugin.h"
#include "smt/params/smt_params.h"
#include "params/smt_params.h"
#include "smt/smt_kernel.h"
#include "ast/ast_pp.h"
#include "ast/rewriter/mk_simplified_app.h"

View file

@ -21,8 +21,8 @@ Notes:
#include "ast/ast_util.h"
#include "ast/ast_ll_pp.h"
#include "smt/smt_kernel.h"
#include "smt/params/smt_params.h"
#include "smt/params/smt_params_helper.hpp"
#include "params/smt_params.h"
#include "params/smt_params_helper.hpp"
#include "smt/smt_solver.h"
#include "tactic/tactic.h"
#include "tactic/tactical.h"

View file

@ -30,7 +30,7 @@ Revision History:
#include "ast/arith_decl_plugin.h"
#include "model/numeral_factory.h"
#include "smt/smt_theory.h"
#include "smt/params/theory_arith_params.h"
#include "params/theory_arith_params.h"
#include "smt/arith_eq_adapter.h"
#include "smt/smt_context.h"
#include "smt/old_interval.h"

View file

@ -19,7 +19,7 @@ Revision History:
#pragma once
#include "smt/theory_array_base.h"
#include "smt/params/theory_array_params.h"
#include "params/theory_array_params.h"
#include "util/union_find.h"
namespace smt {

View file

@ -24,7 +24,7 @@ Revision History:
#include "ast/arith_decl_plugin.h"
#include "model/numeral_factory.h"
#include "smt/smt_theory.h"
#include "smt/params/theory_bv_params.h"
#include "params/theory_bv_params.h"
namespace smt {

View file

@ -24,7 +24,7 @@ Revision History:
#include "ast/datatype_decl_plugin.h"
#include "model/datatype_factory.h"
#include "smt/smt_theory.h"
#include "smt/params/theory_datatype_params.h"
#include "params/theory_datatype_params.h"
namespace smt {
class theory_datatype : public theory {

View file

@ -21,7 +21,7 @@ TODO: eager equality propagation
#pragma once
#include "smt/theory_arith.h"
#include "smt/params/theory_arith_params.h"
#include "params/theory_arith_params.h"
#include "ast/arith_decl_plugin.h"
#include "smt/arith_eq_adapter.h"
#include "smt/theory_opt.h"

View file

@ -32,7 +32,7 @@ Revision History:
#include "smt/smt_theory.h"
#include "smt/diff_logic.h"
#include "smt/smt_justification.h"
#include "smt/params/smt_params.h"
#include "params/smt_params.h"
#include "smt/arith_eq_adapter.h"
#include "smt/smt_model_generator.h"
#include "smt/smt_clause.h"

View file

@ -25,7 +25,7 @@ Notes:
#include "ast/pb_decl_plugin.h"
#include "smt/smt_clause.h"
#include "smt/smt_b_justification.h"
#include "smt/params/theory_pb_params.h"
#include "params/theory_pb_params.h"
#include "math/simplex/simplex.h"
namespace smt {

View file

@ -27,7 +27,7 @@
#include "ast/seq_decl_plugin.h"
#include "model/value_factory.h"
#include "smt/smt_theory.h"
#include "smt/params/theory_str_params.h"
#include "params/theory_str_params.h"
#include "smt/smt_model_generator.h"
#include "smt/smt_arith_value.h"
#include "smt/smt_kernel.h"