mirror of
https://github.com/Z3Prover/z3
synced 2025-04-29 03:45:51 +00:00
handle better cancellation for parallel, switch between cube mode and base level mode in smt.threads, expose parameters to control theory_bv and phase caching
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
fae206b738
commit
ca3ec22b7a
18 changed files with 261 additions and 149 deletions
|
@ -30,6 +30,8 @@ void smt_params::updt_local_params(params_ref const & _p) {
|
|||
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();
|
||||
|
@ -41,8 +43,10 @@ void smt_params::updt_local_params(params_ref const & _p) {
|
|||
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_logic = _p.get_sym("logic", m_logic);
|
||||
m_string_solver = p.string_solver();
|
||||
|
@ -105,8 +109,10 @@ void smt_params::display(std::ostream & out) const {
|
|||
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);
|
||||
|
|
|
@ -102,8 +102,10 @@ struct smt_params : public preprocessor_params,
|
|||
bool m_minimize_lemmas;
|
||||
unsigned m_max_conflicts;
|
||||
unsigned m_restart_max;
|
||||
unsigned m_cube_depth;
|
||||
unsigned m_threads;
|
||||
unsigned m_threads_max_conflicts;
|
||||
unsigned m_threads_cube_frequency;
|
||||
bool m_simplify_clauses;
|
||||
unsigned m_tick;
|
||||
bool m_display_features;
|
||||
|
@ -251,12 +253,14 @@ struct smt_params : public preprocessor_params,
|
|||
m_clause_decay(1),
|
||||
m_random_initial_activity(IA_RANDOM_WHEN_SEARCHING),
|
||||
m_phase_selection(PS_CACHING_CONSERVATIVE),
|
||||
m_phase_caching_on(400),
|
||||
m_phase_caching_on(700),
|
||||
m_phase_caching_off(100),
|
||||
m_minimize_lemmas(true),
|
||||
m_max_conflicts(UINT_MAX),
|
||||
m_cube_depth(1),
|
||||
m_threads(1),
|
||||
m_threads_max_conflicts(UINT_MAX),
|
||||
m_threads_cube_frequency(2),
|
||||
m_simplify_clauses(true),
|
||||
m_tick(1000),
|
||||
m_display_features(false),
|
||||
|
|
|
@ -11,6 +11,8 @@ def_module_params(module_name='smt',
|
|||
('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'),
|
||||
|
@ -20,8 +22,10 @@ def_module_params(module_name='smt',
|
|||
('refine_inj_axioms', BOOL, True, 'refine injectivity axioms'),
|
||||
('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'),
|
||||
|
@ -40,6 +44,8 @@ def_module_params(module_name='smt',
|
|||
('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.eq_axioms', BOOL, True, 'add dynamic equality axioms'),
|
||||
('bv.watch_diseq', BOOL, False, 'use watch lists instead of eager axioms for bit-vectors'),
|
||||
('arith.random_initial_value', BOOL, False, 'use random initial values in the simplex-based procedure for linear arithmetic'),
|
||||
('arith.cheap_eqs', BOOL, True, 'false - do not run, true - run cheap equality heuristic'),
|
||||
('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'),
|
||||
|
|
|
@ -26,6 +26,7 @@ void theory_bv_params::updt_params(params_ref const & _p) {
|
|||
m_hi_div0 = rp.hi_div0();
|
||||
m_bv_reflect = p.bv_reflect();
|
||||
m_bv_enable_int2bv2int = p.bv_enable_int2bv();
|
||||
m_bv_eq_axioms = p.bv_eq_axioms();
|
||||
}
|
||||
|
||||
#define DISPLAY_PARAM(X) out << #X"=" << X << std::endl;
|
||||
|
@ -36,6 +37,7 @@ void theory_bv_params::display(std::ostream & out) const {
|
|||
DISPLAY_PARAM(m_bv_reflect);
|
||||
DISPLAY_PARAM(m_bv_lazy_le);
|
||||
DISPLAY_PARAM(m_bv_cc);
|
||||
DISPLAY_PARAM(m_bv_eq_axioms);
|
||||
DISPLAY_PARAM(m_bv_blast_max_size);
|
||||
DISPLAY_PARAM(m_bv_enable_int2bv2int);
|
||||
}
|
||||
|
|
|
@ -31,16 +31,20 @@ struct theory_bv_params {
|
|||
bool m_bv_reflect;
|
||||
bool m_bv_lazy_le;
|
||||
bool m_bv_cc;
|
||||
bool m_bv_eq_axioms;
|
||||
unsigned m_bv_blast_max_size;
|
||||
bool m_bv_enable_int2bv2int;
|
||||
bool m_bv_watch_diseq;
|
||||
theory_bv_params(params_ref const & p = params_ref()):
|
||||
m_bv_mode(BS_BLASTER),
|
||||
m_hi_div0(false),
|
||||
m_bv_reflect(true),
|
||||
m_bv_lazy_le(false),
|
||||
m_bv_cc(false),
|
||||
m_bv_eq_axioms(true),
|
||||
m_bv_blast_max_size(INT_MAX),
|
||||
m_bv_enable_int2bv2int(true) {
|
||||
m_bv_enable_int2bv2int(true),
|
||||
m_bv_watch_diseq(false) {
|
||||
updt_params(p);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue