mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 09:05:31 +00:00
moved old params files
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
ffb7e26c75
commit
6107e8d9ce
25 changed files with 47 additions and 90 deletions
9
src/smt/params/README
Normal file
9
src/smt/params/README
Normal file
|
@ -0,0 +1,9 @@
|
|||
This directory contains the "remains" of the old parameter setting
|
||||
infrastructure used by Z3. Old code (mostly `smt::context`) is still
|
||||
based on the front_end_params structure. However, we removed support
|
||||
for the old INI file infrastructure. Instead, we have functions for
|
||||
setting the fields of front_end_params using parameter sets
|
||||
(params_ref). Moreover, many of the parameters in front_end_params
|
||||
are now "hidden". That is, they can't be set from the command line or
|
||||
using the command `set-option`.
|
||||
|
32
src/smt/params/dyn_ack_params.cpp
Normal file
32
src/smt/params/dyn_ack_params.cpp
Normal file
|
@ -0,0 +1,32 @@
|
|||
/*++
|
||||
Copyright (c) 2006 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
dyn_ack_params.cpp
|
||||
|
||||
Abstract:
|
||||
|
||||
<abstract>
|
||||
|
||||
Author:
|
||||
|
||||
Leonardo de Moura (leonardo) 2007-05-18.
|
||||
|
||||
Revision History:
|
||||
|
||||
--*/
|
||||
#include"dyn_ack_params.h"
|
||||
|
||||
#if 0
|
||||
void dyn_ack_params::register_params(ini_params & p) {
|
||||
p.register_int_param("dack", 0, 2, reinterpret_cast<int&>(m_dack),
|
||||
"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.");
|
||||
p.register_bool_param("dack_eq", m_dack_eq, "enable dynamic ackermannization for transtivity of equalities");
|
||||
p.register_unsigned_param("dack_threshold", m_dack_threshold, "number of times the congruence rule must be used before Leibniz's axiom is expanded");
|
||||
p.register_double_param("dack_factor", m_dack_factor, "number of instance per conflict");
|
||||
p.register_unsigned_param("dack_gc", m_dack_gc, "Dynamic ackermannization garbage collection frequency (per conflict).");
|
||||
p.register_double_param("dack_gc_inv_decay", m_dack_gc_inv_decay);
|
||||
}
|
||||
#endif
|
||||
|
50
src/smt/params/dyn_ack_params.h
Normal file
50
src/smt/params/dyn_ack_params.h
Normal file
|
@ -0,0 +1,50 @@
|
|||
/*++
|
||||
Copyright (c) 2006 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
dyn_ack_params.h
|
||||
|
||||
Abstract:
|
||||
|
||||
<abstract>
|
||||
|
||||
Author:
|
||||
|
||||
Leonardo de Moura (leonardo) 2007-05-18.
|
||||
|
||||
Revision History:
|
||||
|
||||
--*/
|
||||
#ifndef _DYN_ACK_PARAMS_H_
|
||||
#define _DYN_ACK_PARAMS_H_
|
||||
|
||||
enum 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;
|
||||
bool m_dack_eq;
|
||||
double m_dack_factor;
|
||||
unsigned m_dack_threshold;
|
||||
unsigned m_dack_gc;
|
||||
double m_dack_gc_inv_decay;
|
||||
|
||||
public:
|
||||
dyn_ack_params():
|
||||
m_dack(DACK_ROOT),
|
||||
m_dack_eq(false),
|
||||
m_dack_factor(0.1),
|
||||
m_dack_threshold(10),
|
||||
m_dack_gc(2000),
|
||||
m_dack_gc_inv_decay(0.8) {
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif /* _DYN_ACK_PARAMS_H_ */
|
||||
|
79
src/smt/params/params2smt_params.cpp
Normal file
79
src/smt/params/params2smt_params.cpp
Normal file
|
@ -0,0 +1,79 @@
|
|||
/*++
|
||||
Copyright (c) 2011 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
params2smt_params.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Backward compatibility utilities for parameter setting
|
||||
|
||||
Author:
|
||||
|
||||
Leonardo de Moura (leonardo) 2011-05-19.
|
||||
|
||||
Revision History:
|
||||
|
||||
--*/
|
||||
#include"smt_params.h"
|
||||
#include"params.h"
|
||||
|
||||
/**
|
||||
Update smt_params using s.
|
||||
Only the most frequently used options are updated.
|
||||
|
||||
This function is mainly used to allow smt::context to be used in
|
||||
the new strategy framework.
|
||||
*/
|
||||
void params2smt_params(params_ref const & s, smt_params & t) {
|
||||
t.m_relevancy_lvl = s.get_uint("relevancy", t.m_relevancy_lvl);
|
||||
TRACE("qi_cost", s.display(tout); tout << "\n";);
|
||||
t.m_qi_cost = s.get_str("qi_cost", t.m_qi_cost.c_str());
|
||||
t.m_mbqi = s.get_bool("mbqi", t.m_mbqi);
|
||||
t.m_mbqi_max_iterations = s.get_uint("mbqi_max_iterations", t.m_mbqi_max_iterations);
|
||||
t.m_random_seed = s.get_uint("random_seed", t.m_random_seed);
|
||||
t.m_model = s.get_bool("produce_models", t.m_model);
|
||||
if (s.get_bool("produce_proofs", false))
|
||||
t.m_proof_mode = PGM_FINE;
|
||||
t.m_qi_eager_threshold = s.get_double("qi_eager_threshold", t.m_qi_eager_threshold);
|
||||
t.m_qi_lazy_threshold = s.get_double("qi_lazy_threshold", t.m_qi_lazy_threshold);
|
||||
t.m_preprocess = s.get_bool("preprocess", t.m_preprocess);
|
||||
t.m_hi_div0 = s.get_bool("hi_div0", t.m_hi_div0);
|
||||
t.m_auto_config = s.get_bool("auto_config", t.m_auto_config);
|
||||
t.m_array_simplify = s.get_bool("array_old_simplifier", t.m_array_simplify);
|
||||
t.m_arith_branch_cut_ratio = s.get_uint("arith_branch_cut_ratio", t.m_arith_branch_cut_ratio);
|
||||
t.m_arith_expand_eqs = s.get_bool("arith_expand_eqs", t.m_arith_expand_eqs);
|
||||
|
||||
if (s.get_bool("arith_greatest_error_pivot", false))
|
||||
t.m_arith_pivot_strategy = ARITH_PIVOT_GREATEST_ERROR;
|
||||
else if (s.get_bool("arith_least_error_pivot", false))
|
||||
t.m_arith_pivot_strategy = ARITH_PIVOT_LEAST_ERROR;
|
||||
}
|
||||
|
||||
/**
|
||||
\brief Copy parameters (from s) that affect the semantics of Z3 (e.g., HI_DIV0).
|
||||
It also copies the model construction parameter. Thus, model construction
|
||||
can be enabled at the command line.
|
||||
*/
|
||||
void smt_params2params(smt_params const & s, params_ref & t) {
|
||||
if (s.m_model)
|
||||
t.set_bool("produce_models", true);
|
||||
if (!s.m_hi_div0)
|
||||
t.set_bool("hi_div0", false);
|
||||
}
|
||||
|
||||
/**
|
||||
\brief Bridge for using params_ref with smt::context.
|
||||
*/
|
||||
void solver_smt_params_descrs(param_descrs & r) {
|
||||
r.insert("hi_div0", CPK_BOOL, "(default: true) if true, then Z3 uses the usual hardware interpretation for division (rem, mod) by zero. Otherwise, these operations are considered uninterpreted");
|
||||
r.insert("relevancy", CPK_UINT, "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");
|
||||
r.insert("mbqi", CPK_BOOL, "model based quantifier instantiation (MBQI)");
|
||||
r.insert("mbqi_max_iterations", CPK_UINT, "maximum number of rounds of MBQI");
|
||||
r.insert("random_seed", CPK_UINT, "random seed for smt solver");
|
||||
r.insert("qi_eager_threshold", CPK_DOUBLE, "threshold for eager quantifier instantiation");
|
||||
r.insert("qi_lazy_threshold", CPK_DOUBLE, "threshold for lazy quantifier instantiation");
|
||||
r.insert("auto_config", CPK_BOOL, "use heuristics to automatically configure smt solver");
|
||||
r.insert("arith_branch_cut_ratio", CPK_UINT, "branch&bound / gomory cut ratio");
|
||||
}
|
31
src/smt/params/params2smt_params.h
Normal file
31
src/smt/params/params2smt_params.h
Normal file
|
@ -0,0 +1,31 @@
|
|||
/*++
|
||||
Copyright (c) 2011 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
params2smt_params.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Backward compatibility utilities for parameter setting
|
||||
|
||||
Author:
|
||||
|
||||
Leonardo de Moura (leonardo) 2011-05-19.
|
||||
|
||||
Revision History:
|
||||
|
||||
--*/
|
||||
#ifndef _PARAMS2SMT_PARAMS_H_
|
||||
#define _PARAMS2SMT_PARAMS_H_
|
||||
|
||||
class params_ref;
|
||||
struct smt_params;
|
||||
|
||||
void params2smt_params(params_ref const & s, smt_params & t);
|
||||
|
||||
void smt_params2params(smt_params const & s, params_ref & t);
|
||||
|
||||
void solver_smt_params_descrs(param_descrs & r);
|
||||
|
||||
#endif
|
112
src/smt/params/preprocessor_params.h
Normal file
112
src/smt/params/preprocessor_params.h
Normal file
|
@ -0,0 +1,112 @@
|
|||
/*++
|
||||
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:
|
||||
|
||||
--*/
|
||||
#ifndef _PREPROCESSOR_PARAMS_H_
|
||||
#define _PREPROCESSOR_PARAMS_H_
|
||||
|
||||
#include"pattern_inference_params.h"
|
||||
#include"bit_blaster_params.h"
|
||||
#include"bv_simplifier_params.h"
|
||||
#include"arith_simplifier_params.h"
|
||||
|
||||
enum lift_ite_kind {
|
||||
LI_NONE,
|
||||
LI_CONSERVATIVE,
|
||||
LI_FULL
|
||||
};
|
||||
|
||||
struct preprocessor_params : public pattern_inference_params,
|
||||
public bit_blaster_params,
|
||||
public bv_simplifier_params,
|
||||
public arith_simplifier_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_trees;
|
||||
bool m_pull_nested_quantifiers;
|
||||
bool m_eliminate_term_ite;
|
||||
bool m_eliminate_and; // represent (and a b) as (not (or (not a) (not b)))
|
||||
bool m_macro_finder;
|
||||
bool m_propagate_values;
|
||||
bool m_propagate_booleans;
|
||||
bool m_refine_inj_axiom;
|
||||
bool m_eliminate_bounds;
|
||||
bool m_simplify_bit2int;
|
||||
bool m_nnf_cnf;
|
||||
bool m_distribute_forall;
|
||||
bool m_reduce_args;
|
||||
bool m_quasi_macros;
|
||||
bool m_restricted_quasi_macros;
|
||||
bool m_max_bv_sharing;
|
||||
bool m_pre_simplifier;
|
||||
bool m_nlquant_elim;
|
||||
|
||||
public:
|
||||
preprocessor_params():
|
||||
m_lift_ite(LI_NONE),
|
||||
m_ng_lift_ite(LI_NONE),
|
||||
m_pull_cheap_ite_trees(false),
|
||||
m_pull_nested_quantifiers(false),
|
||||
m_eliminate_term_ite(false),
|
||||
m_eliminate_and(true),
|
||||
m_macro_finder(false),
|
||||
m_propagate_values(true),
|
||||
m_propagate_booleans(false), // TODO << check peformance
|
||||
m_refine_inj_axiom(true),
|
||||
m_eliminate_bounds(false),
|
||||
m_simplify_bit2int(false),
|
||||
m_nnf_cnf(true),
|
||||
m_distribute_forall(false),
|
||||
m_reduce_args(false),
|
||||
m_quasi_macros(false),
|
||||
m_restricted_quasi_macros(false),
|
||||
m_max_bv_sharing(true),
|
||||
m_pre_simplifier(true),
|
||||
m_nlquant_elim(false) {
|
||||
}
|
||||
|
||||
#if 0
|
||||
void register_params(ini_params & p) {
|
||||
pattern_inference_params::register_params(p);
|
||||
bit_blaster_params::register_params(p);
|
||||
bv_simplifier_params::register_params(p);
|
||||
arith_simplifier_params::register_params(p);
|
||||
p.register_int_param("lift_ite", 0, 2, reinterpret_cast<int&>(m_lift_ite), "ite term lifting: 0 - no lifting, 1 - conservative, 2 - full");
|
||||
p.register_int_param("ng_lift_ite", 0, 2, reinterpret_cast<int&>(m_ng_lift_ite), "ite (non-ground) term lifting: 0 - no lifting, 1 - conservative, 2 - full");
|
||||
p.register_bool_param("elim_term_ite", m_eliminate_term_ite, "eliminate term if-then-else in the preprocessor");
|
||||
p.register_bool_param("elim_and", m_eliminate_and, "represent (and a b) as (not (or (not a) (not b)))");
|
||||
p.register_bool_param("macro_finder", m_macro_finder, "try to find universally quantified formulas that can be viewed as macros");
|
||||
p.register_bool_param("propagate_values", m_propagate_values, "propagate values during preprocessing step");
|
||||
p.register_bool_param("propagate_booleans", m_propagate_booleans, "propagate boolean values during preprocessing step");
|
||||
p.register_bool_param("pull_cheap_ite_trees", m_pull_cheap_ite_trees);
|
||||
p.register_bool_param("pull_nested_quantifiers", m_pull_nested_quantifiers, "eliminate nested quantifiers by moving nested quantified variables to the outermost quantifier, it is unnecessary if the formula is converted into CNF");
|
||||
p.register_bool_param("refine_inj_axiom", m_refine_inj_axiom);
|
||||
p.register_bool_param("elim_bounds", m_eliminate_bounds, "cheap Fourier-Motzkin");
|
||||
|
||||
p.register_bool_param("bit2int", m_simplify_bit2int, "hoist bit2int conversions over arithmetical expressions");
|
||||
p.register_bool_param("distribute_forall", m_distribute_forall);
|
||||
p.register_bool_param("reduce_args", m_reduce_args);
|
||||
p.register_bool_param("quasi_macros", m_quasi_macros);
|
||||
p.register_bool_param("restricted_quasi_macros", m_restricted_quasi_macros);
|
||||
p.register_bool_param("bv_max_sharing", m_max_bv_sharing);
|
||||
p.register_bool_param("pre_simplifier", m_pre_simplifier);
|
||||
}
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
#endif /* _PREPROCESSOR_PARAMS_H_ */
|
142
src/smt/params/qi_params.h
Normal file
142
src/smt/params/qi_params.h
Normal file
|
@ -0,0 +1,142 @@
|
|||
/*++
|
||||
Copyright (c) 2006 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
qi_params.h
|
||||
|
||||
Abstract:
|
||||
|
||||
<abstract>
|
||||
|
||||
Author:
|
||||
|
||||
Leonardo de Moura (leonardo) 2008-06-15.
|
||||
|
||||
Revision History:
|
||||
|
||||
--*/
|
||||
#ifndef _QI_PARAMS_H_
|
||||
#define _QI_PARAMS_H_
|
||||
|
||||
#include"util.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 {
|
||||
bool m_qi_ematching;
|
||||
std::string m_qi_cost;
|
||||
std::string m_qi_new_gen;
|
||||
double m_qi_eager_threshold;
|
||||
double m_qi_lazy_threshold;
|
||||
unsigned m_qi_max_eager_multipatterns;
|
||||
unsigned m_qi_max_lazy_multipattern_matching;
|
||||
bool m_qi_profile;
|
||||
unsigned m_qi_profile_freq;
|
||||
quick_checker_mode m_qi_quick_checker;
|
||||
bool m_qi_lazy_quick_checker;
|
||||
bool m_qi_promote_unsat;
|
||||
unsigned m_qi_max_instances;
|
||||
bool m_qi_lazy_instantiation;
|
||||
bool m_qi_conservative_final_check;
|
||||
|
||||
bool m_mbqi;
|
||||
unsigned m_mbqi_max_cexs;
|
||||
unsigned m_mbqi_max_cexs_incr;
|
||||
unsigned m_mbqi_max_iterations;
|
||||
bool m_mbqi_trace;
|
||||
unsigned m_mbqi_force_template;
|
||||
|
||||
bool m_instgen;
|
||||
|
||||
qi_params():
|
||||
/*
|
||||
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" peformace 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 constructred,
|
||||
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"),
|
||||
m_qi_eager_threshold(10.0),
|
||||
m_qi_lazy_threshold(20.0), // reduced to give a chance to MBQI
|
||||
m_qi_max_eager_multipatterns(0),
|
||||
m_qi_max_lazy_multipattern_matching(2),
|
||||
m_qi_profile(false),
|
||||
m_qi_profile_freq(UINT_MAX),
|
||||
m_qi_quick_checker(MC_NO),
|
||||
m_qi_lazy_quick_checker(true),
|
||||
m_qi_promote_unsat(true),
|
||||
m_qi_max_instances(UINT_MAX),
|
||||
m_qi_lazy_instantiation(false),
|
||||
m_qi_conservative_final_check(false),
|
||||
#ifdef _EXTERNAL_RELEASE
|
||||
m_mbqi(true), // enabled by default
|
||||
#else
|
||||
m_mbqi(false), // to avoid Rustan whining that the models are not partial anymore.
|
||||
#endif
|
||||
m_mbqi_max_cexs(1),
|
||||
m_mbqi_max_cexs_incr(1),
|
||||
m_mbqi_max_iterations(1000),
|
||||
m_mbqi_trace(false),
|
||||
m_mbqi_force_template(10),
|
||||
m_instgen(false) {
|
||||
}
|
||||
|
||||
#if 0
|
||||
void register_params(ini_params & p) {
|
||||
p.register_unsigned_param("qi_max_eager_multi_patterns", m_qi_max_eager_multipatterns,
|
||||
"Specify the number of extra multi patterns that are processed eagerly. By default, the prover use at most one multi-pattern eagerly when there is no unary pattern. This value should be smaller than or equal to PI_MAX_MULTI_PATTERNS");
|
||||
p.register_unsigned_param("qi_max_lazy_multi_pattern_matching", m_qi_max_lazy_multipattern_matching, "Maximum number of rounds of matching in a branch for delayed multipatterns. A multipattern is delayed based on the value of QI_MAX_EAGER_MULTI_PATTERNS");
|
||||
p.register_string_param("qi_cost", m_qi_cost, "The cost function for quantifier instantiation");
|
||||
p.register_string_param("qi_new_gen", m_qi_new_gen, "The function for calculating the generation of newly constructed terms");
|
||||
p.register_double_param("qi_eager_threshold", m_qi_eager_threshold, "Threshold for eager quantifier instantiation");
|
||||
p.register_double_param("qi_lazy_threshold", m_qi_lazy_threshold, "Threshold for lazy quantifier instantiation");
|
||||
p.register_bool_param("qi_profile", m_qi_profile);
|
||||
p.register_unsigned_param("qi_profile_freq", m_qi_profile_freq);
|
||||
p.register_int_param("qi_quick_checker", 0, 2, reinterpret_cast<int&>(m_qi_quick_checker), "0 - do not use (cheap) model checker, 1 - instantiate instances unsatisfied by current model, 2 - 1 + instantiate instances not satisfied by current model");
|
||||
p.register_bool_param("qi_lazy_quick_checker", m_qi_lazy_quick_checker);
|
||||
p.register_bool_param("qi_promote_unsat", m_qi_promote_unsat);
|
||||
p.register_unsigned_param("qi_max_instances", m_qi_max_instances);
|
||||
p.register_bool_param("qi_lazy_instantiation", m_qi_lazy_instantiation);
|
||||
p.register_bool_param("qi_conservative_final_check", m_qi_conservative_final_check);
|
||||
|
||||
|
||||
p.register_bool_param("mbqi", m_mbqi, "Model Based Quantifier Instantiation (MBQI)");
|
||||
p.register_unsigned_param("mbqi_max_cexs", m_mbqi_max_cexs, "Initial maximal number of counterexamples used in MBQI, each counterexample generates a quantifier instantiation", true);
|
||||
p.register_unsigned_param("mbqi_max_cexs_incr", m_mbqi_max_cexs_incr, "Increment for MBQI_MAX_CEXS, the increment is performed after each round of MBQI", true);
|
||||
p.register_unsigned_param("mbqi_max_iterations", m_mbqi_max_iterations, "Maximum number of rounds of MBQI", true);
|
||||
p.register_bool_param("mbqi_trace", m_mbqi_trace, "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.", true);
|
||||
p.register_unsigned_param("mbqi_force_template", m_mbqi_force_template, "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", true);
|
||||
|
||||
p.register_bool_param("inst_gen", m_instgen, "Enable Instantiation Generation solver (disables other quantifier reasoning)", false);
|
||||
}
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
#endif /* _QI_PARAMS_H_ */
|
||||
|
121
src/smt/params/smt_params.cpp
Normal file
121
src/smt/params/smt_params.cpp
Normal file
|
@ -0,0 +1,121 @@
|
|||
/*++
|
||||
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.h"
|
||||
#include"trace.h"
|
||||
|
||||
#if 0
|
||||
void smt_params::register_params(ini_params & p) {
|
||||
dyn_ack_params::register_params(p);
|
||||
qi_params::register_params(p);
|
||||
theory_arith_params::register_params(p);
|
||||
theory_array_params::register_params(p);
|
||||
theory_bv_params::register_params(p);
|
||||
theory_datatype_params::register_params(p);
|
||||
|
||||
p.register_bool_param("check_proof", m_check_proof);
|
||||
p.register_bool_param("display_proof", m_display_proof);
|
||||
p.register_bool_param("display_dot_proof", m_display_dot_proof);
|
||||
p.register_bool_param("display_unsat_core", m_display_unsat_core);
|
||||
p.register_bool_param("eq_propagation", m_eq_propagation);
|
||||
p.register_bool_param("bin_clauses", m_binary_clause_opt);
|
||||
p.register_unsigned_param("relevancy", m_relevancy_lvl, "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", true);
|
||||
p.register_bool_param("relevancy_lemma", m_relevancy_lemma, "true if lemmas are used to propagate relevancy");
|
||||
p.register_unsigned_param("random_seed", m_random_seed, "random seed for Z3");
|
||||
p.register_percentage_param("random_case_split_freq", m_random_var_freq, "frequency of random case splits");
|
||||
p.register_int_param("phase_selection", 0, 6, reinterpret_cast<int&>(m_phase_selection), "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");
|
||||
p.register_bool_param("minimize_lemmas", m_minimize_lemmas, "enable/disable lemma minimization algorithm");
|
||||
p.register_unsigned_param("max_conflicts", m_max_conflicts, "maximum number of conflicts");
|
||||
|
||||
p.register_unsigned_param("recent_lemma_threshold", m_recent_lemmas_size);
|
||||
p.register_unsigned_param("tick", m_tick);
|
||||
|
||||
PRIVATE_PARAMS({
|
||||
p.register_bool_param("theory_resolve", m_theory_resolve, "Apply theory resolution to produce auxiliary conflict clauses", true);
|
||||
});
|
||||
|
||||
p.register_int_param("restart_strategy", 0, 4, reinterpret_cast<int&>(m_restart_strategy), "0 - geometric, 1 - inner-outer-geometric, 2 - luby, 3 - fixed, 4 - arithmetic");
|
||||
p.register_unsigned_param("restart_initial", m_restart_initial,
|
||||
"inital restart frequency in number of conflicts, it is also the unit for the luby sequence");
|
||||
p.register_double_param("restart_factor", m_restart_factor, "when using geometric (or inner-outer-geometric) progression of restarts, it specifies the constant used to multiply the currect restart threshold");
|
||||
p.register_bool_param("restart_adaptive", m_restart_adaptive, "disable restarts based on the search 'agility'");
|
||||
p.register_percentage_param("restart_agility_threshold", m_restart_agility_threshold);
|
||||
|
||||
p.register_int_param("lemma_gc_strategy", 0, 2, reinterpret_cast<int&>(m_lemma_gc_strategy), "0 - fixed, 1 - geometric, 2 - at every restart");
|
||||
p.register_bool_param("lemma_gc_half", m_lemma_gc_half, "true for simple gc algorithm (delete approx. half of the clauses)");
|
||||
p.register_unsigned_param("lemma_gc_initial", m_lemma_gc_initial, "lemma initial gc frequency (in number of conflicts), used by fixed or geometric strategies");
|
||||
p.register_double_param("lemma_gc_factor", m_lemma_gc_factor, "used by geometric strategy");
|
||||
p.register_unsigned_param("lemma_gc_new_old_ratio", m_new_old_ratio);
|
||||
p.register_unsigned_param("lemma_gc_new_clause_activity", m_new_clause_activity);
|
||||
p.register_unsigned_param("lemma_gc_old_clause_activity", m_old_clause_activity);
|
||||
p.register_unsigned_param("lemma_gc_new_clause_relevancy", m_new_clause_relevancy);
|
||||
p.register_unsigned_param("lemma_gc_old_clause_relevancy", m_old_clause_activity);
|
||||
|
||||
p.register_bool_param("simplify_clauses", m_simplify_clauses);
|
||||
|
||||
p.register_int_param("random_initial_activity", 0, 2, reinterpret_cast<int&>(m_random_initial_activity));
|
||||
|
||||
PRIVATE_PARAMS({
|
||||
|
||||
p.register_double_param("inv_decay", m_inv_decay);
|
||||
p.register_unsigned_param("phase_caching_on_duration", m_phase_caching_on);
|
||||
p.register_unsigned_param("phase_caching_off_duration", m_phase_caching_off);
|
||||
});
|
||||
|
||||
p.register_bool_param("smtlib_dump_lemmas", m_smtlib_dump_lemmas);
|
||||
p.register_string_param("smtlib_logic", m_smtlib_logic, "Name used for the :logic field when generating SMT-LIB benchmarks");
|
||||
p.register_bool_param("display_features", m_display_features);
|
||||
|
||||
p.register_bool_param("new_core2th_eq", m_new_core2th_eq);
|
||||
p.register_bool_param("ematching", m_ematching, "E-Matching based quantifier instantiation");
|
||||
|
||||
p.register_bool_param("profile_res_sub", m_profile_res_sub);
|
||||
#ifndef _EXTERNAL_RELEASE
|
||||
p.register_bool_param("display_bool_var2expr", m_display_bool_var2expr);
|
||||
p.register_bool_param("display_ll_bool_var2expr", m_display_ll_bool_var2expr);
|
||||
p.register_bool_param("abort_after_preproc", m_abort_after_preproc, "abort after preprocessing step, this flag is only useful for debugging purposes");
|
||||
p.register_bool_param("display_installed_theories", m_display_installed_theories, "display theories installed at smt::context", true);
|
||||
#endif
|
||||
p.register_int_param("case_split", 0, 5, reinterpret_cast<int&>(m_case_split_strategy), "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");
|
||||
p.register_unsigned_param("rel_case_split_order", 0, 2, m_rel_case_split_order, "structural (relevancy) splitting order: 0 - left-to-right (default), 1 - random, 2 - right-to-left");
|
||||
p.register_bool_param("lookahead_diseq", m_lookahead_diseq);
|
||||
|
||||
p.register_bool_param("delay_units", m_delay_units);
|
||||
p.register_unsigned_param("delay_units_threshold", m_delay_units_threshold);
|
||||
|
||||
p.register_bool_param("model", m_model, "enable/disable model construction", true);
|
||||
p.register_bool_param("model_validate", m_model_validate, "validate the model", true);
|
||||
p.register_bool_param("model_on_timeout", m_model_on_timeout, "after hitting soft-timeout or memory high watermark, generate a candidate model", true);
|
||||
p.register_bool_param("model_on_final_check", m_model_on_final_check, "display candidate model (in the standard output) whenever Z3 hits a final check", true);
|
||||
|
||||
p.register_unsigned_param("progress_sampling_freq", m_progress_sampling_freq, "frequency for progress output in miliseconds");
|
||||
|
||||
|
||||
p.register_bool_param("user_theory_preprocess_axioms",
|
||||
m_user_theory_preprocess_axioms,
|
||||
"Apply full pre-processing to user theory axioms",
|
||||
true);
|
||||
|
||||
p.register_bool_param("user_theory_persist_axioms",
|
||||
m_user_theory_persist_axioms,
|
||||
"Persist user axioms to the base level",
|
||||
true);
|
||||
|
||||
}
|
||||
|
||||
#endif
|
301
src/smt/params/smt_params.h
Normal file
301
src/smt/params/smt_params.h
Normal file
|
@ -0,0 +1,301 @@
|
|||
/*++
|
||||
Copyright (c) 2006 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
smt_params.h
|
||||
|
||||
Abstract:
|
||||
|
||||
<abstract>
|
||||
|
||||
Author:
|
||||
|
||||
Leonardo de Moura (leonardo) 2008-02-20.
|
||||
|
||||
Revision History:
|
||||
|
||||
--*/
|
||||
#ifndef _SMT_PARAMS_H_
|
||||
#define _SMT_PARAMS_H_
|
||||
|
||||
#include"ast.h"
|
||||
#include"dyn_ack_params.h"
|
||||
#include"qi_params.h"
|
||||
#include"theory_arith_params.h"
|
||||
#include"theory_array_params.h"
|
||||
#include"theory_bv_params.h"
|
||||
#include"theory_datatype_params.h"
|
||||
#include"preprocessor_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
|
||||
};
|
||||
|
||||
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
|
||||
};
|
||||
|
||||
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
|
||||
};
|
||||
|
||||
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_datatype_params {
|
||||
bool m_display_proof;
|
||||
bool m_display_dot_proof;
|
||||
bool m_display_unsat_core;
|
||||
bool m_check_proof;
|
||||
bool m_eq_propagation;
|
||||
bool m_binary_clause_opt;
|
||||
unsigned m_relevancy_lvl;
|
||||
bool m_relevancy_lemma;
|
||||
unsigned m_random_seed;
|
||||
double m_random_var_freq;
|
||||
double m_inv_decay;
|
||||
unsigned m_clause_decay;
|
||||
initial_activity m_random_initial_activity;
|
||||
phase_selection m_phase_selection;
|
||||
unsigned m_phase_caching_on;
|
||||
unsigned m_phase_caching_off;
|
||||
bool m_minimize_lemmas;
|
||||
unsigned m_max_conflicts;
|
||||
bool m_simplify_clauses;
|
||||
unsigned m_tick;
|
||||
bool m_display_features;
|
||||
bool m_new_core2th_eq;
|
||||
bool m_ematching;
|
||||
|
||||
// -----------------------------------
|
||||
//
|
||||
// Case split strategy
|
||||
//
|
||||
// -----------------------------------
|
||||
case_split_strategy m_case_split_strategy;
|
||||
unsigned m_rel_case_split_order;
|
||||
bool m_lookahead_diseq;
|
||||
|
||||
// -----------------------------------
|
||||
//
|
||||
// Delay units...
|
||||
//
|
||||
// -----------------------------------
|
||||
bool m_delay_units;
|
||||
unsigned m_delay_units_threshold;
|
||||
|
||||
// -----------------------------------
|
||||
//
|
||||
// Conflict resolution
|
||||
//
|
||||
// -----------------------------------
|
||||
bool m_theory_resolve;
|
||||
|
||||
// -----------------------------------
|
||||
//
|
||||
// Restart
|
||||
//
|
||||
// -----------------------------------
|
||||
restart_strategy m_restart_strategy;
|
||||
unsigned m_restart_initial;
|
||||
double m_restart_factor;
|
||||
bool m_restart_adaptive;
|
||||
double m_agility_factor;
|
||||
double m_restart_agility_threshold;
|
||||
|
||||
// -----------------------------------
|
||||
//
|
||||
// Lemma garbage collection
|
||||
//
|
||||
// -----------------------------------
|
||||
lemma_gc_strategy m_lemma_gc_strategy;
|
||||
bool m_lemma_gc_half;
|
||||
unsigned m_recent_lemmas_size;
|
||||
unsigned m_lemma_gc_initial;
|
||||
double m_lemma_gc_factor;
|
||||
unsigned m_new_old_ratio; //!< the ratio of new and old clauses.
|
||||
unsigned m_new_clause_activity;
|
||||
unsigned m_old_clause_activity;
|
||||
unsigned m_new_clause_relevancy; //!< Max. number of unassigned literals to be considered relevant.
|
||||
unsigned m_old_clause_relevancy; //!< Max. number of unassigned literals to be considered relevant.
|
||||
double m_inv_clause_decay; //!< clause activity decay
|
||||
|
||||
// -----------------------------------
|
||||
//
|
||||
// SMT-LIB (debug) pretty printer
|
||||
//
|
||||
// -----------------------------------
|
||||
bool m_smtlib_dump_lemmas;
|
||||
std::string m_smtlib_logic;
|
||||
|
||||
// -----------------------------------
|
||||
//
|
||||
// Statistics for Profiling
|
||||
//
|
||||
// -----------------------------------
|
||||
bool m_profile_res_sub;
|
||||
bool m_display_bool_var2expr;
|
||||
bool m_display_ll_bool_var2expr;
|
||||
bool m_abort_after_preproc;
|
||||
|
||||
// -----------------------------------
|
||||
//
|
||||
// Model generation
|
||||
//
|
||||
// -----------------------------------
|
||||
bool m_model;
|
||||
bool m_model_compact;
|
||||
bool m_model_validate;
|
||||
bool m_model_on_timeout;
|
||||
bool m_model_on_final_check;
|
||||
|
||||
// -----------------------------------
|
||||
//
|
||||
// Progress sampling
|
||||
//
|
||||
// -----------------------------------
|
||||
unsigned m_progress_sampling_freq;
|
||||
|
||||
// -----------------------------------
|
||||
//
|
||||
// Debugging goodies
|
||||
//
|
||||
// -----------------------------------
|
||||
bool m_display_installed_theories;
|
||||
|
||||
// -----------------------------------
|
||||
//
|
||||
// From front_end_params
|
||||
//
|
||||
// -----------------------------------
|
||||
bool m_preprocess; // temporary hack for disabling all preprocessing..
|
||||
bool m_user_theory_preprocess_axioms;
|
||||
bool m_user_theory_persist_axioms;
|
||||
unsigned m_soft_timeout;
|
||||
bool m_at_labels_cex; // only use labels which contains the @ symbol when building multiple counterexamples.
|
||||
bool m_check_at_labels; // check that @ labels are inserted to generate unique counter-examples.
|
||||
bool m_dump_goal_as_smt;
|
||||
proof_gen_mode m_proof_mode;
|
||||
bool m_auto_config;
|
||||
|
||||
#if 0
|
||||
unsigned m_memory_high_watermark;
|
||||
unsigned m_memory_max_size;
|
||||
|
||||
bool m_auto_config;
|
||||
|
||||
bool m_debug_ref_count;
|
||||
|
||||
m_well_sorted_check(true),
|
||||
m_memory_high_watermark(0),
|
||||
m_memory_max_size(0),
|
||||
|
||||
m_auto_config(true),
|
||||
m_debug_ref_count(false) {
|
||||
#endif
|
||||
|
||||
smt_params():
|
||||
m_display_proof(false),
|
||||
m_display_dot_proof(false),
|
||||
m_display_unsat_core(false),
|
||||
m_check_proof(false),
|
||||
m_eq_propagation(true),
|
||||
m_binary_clause_opt(true),
|
||||
m_relevancy_lvl(2),
|
||||
m_relevancy_lemma(false),
|
||||
m_random_seed(0),
|
||||
m_random_var_freq(0.01),
|
||||
m_inv_decay(1.052),
|
||||
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_off(100),
|
||||
m_minimize_lemmas(true),
|
||||
m_max_conflicts(UINT_MAX),
|
||||
m_simplify_clauses(true),
|
||||
m_tick(1000),
|
||||
m_display_features(false),
|
||||
m_new_core2th_eq(true),
|
||||
m_ematching(true),
|
||||
m_case_split_strategy(CS_ACTIVITY_DELAY_NEW),
|
||||
m_rel_case_split_order(0),
|
||||
m_lookahead_diseq(false),
|
||||
m_delay_units(false),
|
||||
m_delay_units_threshold(32),
|
||||
m_theory_resolve(false),
|
||||
m_restart_strategy(RS_IN_OUT_GEOMETRIC),
|
||||
m_restart_initial(100),
|
||||
m_restart_factor(1.1),
|
||||
m_restart_adaptive(true),
|
||||
m_agility_factor(0.9999),
|
||||
m_restart_agility_threshold(0.18),
|
||||
m_lemma_gc_strategy(LGC_FIXED),
|
||||
m_lemma_gc_half(false),
|
||||
m_recent_lemmas_size(100),
|
||||
m_lemma_gc_initial(5000),
|
||||
m_lemma_gc_factor(1.1),
|
||||
m_new_old_ratio(16),
|
||||
m_new_clause_activity(10),
|
||||
m_old_clause_activity(500),
|
||||
m_new_clause_relevancy(45),
|
||||
m_old_clause_relevancy(6),
|
||||
m_inv_clause_decay(1),
|
||||
m_smtlib_dump_lemmas(false),
|
||||
m_smtlib_logic("AUFLIA"),
|
||||
m_profile_res_sub(false),
|
||||
m_display_bool_var2expr(false),
|
||||
m_display_ll_bool_var2expr(false),
|
||||
m_abort_after_preproc(false),
|
||||
m_model(true),
|
||||
m_model_compact(false),
|
||||
m_model_validate(false),
|
||||
m_model_on_timeout(false),
|
||||
m_model_on_final_check(false),
|
||||
m_progress_sampling_freq(0),
|
||||
m_display_installed_theories(false),
|
||||
m_preprocess(true), // temporary hack for disabling all preprocessing..
|
||||
m_user_theory_preprocess_axioms(false),
|
||||
m_user_theory_persist_axioms(false),
|
||||
m_soft_timeout(0),
|
||||
m_at_labels_cex(false),
|
||||
m_check_at_labels(false),
|
||||
m_dump_goal_as_smt(false),
|
||||
m_proof_mode(PGM_DISABLED),
|
||||
m_auto_config(true) {
|
||||
}
|
||||
};
|
||||
|
||||
#endif /* _SMT_PARAMS_H_ */
|
||||
|
78
src/smt/params/theory_arith_params.cpp
Normal file
78
src/smt/params/theory_arith_params.cpp
Normal file
|
@ -0,0 +1,78 @@
|
|||
/*++
|
||||
Copyright (c) 2006 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
theory_arith_params.cpp
|
||||
|
||||
Abstract:
|
||||
|
||||
<abstract>
|
||||
|
||||
Author:
|
||||
|
||||
Leonardo de Moura (leonardo) 2008-05-06.
|
||||
|
||||
Revision History:
|
||||
|
||||
--*/
|
||||
|
||||
#include"theory_arith_params.h"
|
||||
|
||||
#if 0
|
||||
void theory_arith_params::register_params(ini_params & p) {
|
||||
#ifdef _EXTERNAL_RELEASE
|
||||
p.register_int_param("arith_solver", 0, 3, reinterpret_cast<int&>(m_arith_mode), "select 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");
|
||||
#else
|
||||
p.register_int_param("arith_solver", 0, 4, reinterpret_cast<int&>(m_arith_mode), "select 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 - model guided arith_solver");
|
||||
#endif
|
||||
p.register_bool_param("arith_force_simplex", m_arith_auto_config_simplex, "force Z3 to use simplex solver.");
|
||||
p.register_unsigned_param("arith_blands_rule_threshold", m_arith_blands_rule_threshold);
|
||||
p.register_bool_param("arith_propagate_eqs", m_arith_propagate_eqs);
|
||||
p.register_int_param("arith_propagation_mode", 0, 2, reinterpret_cast<int&>(m_arith_bound_prop));
|
||||
p.register_bool_param("arith_stronger_lemmas", m_arith_stronger_lemmas);
|
||||
p.register_bool_param("arith_skip_big_coeffs", m_arith_skip_rows_with_big_coeffs);
|
||||
p.register_unsigned_param("arith_max_lemma_size", m_arith_max_lemma_size);
|
||||
p.register_unsigned_param("arith_small_lemma_size", m_arith_small_lemma_size);
|
||||
p.register_bool_param("arith_reflect", m_arith_reflect);
|
||||
p.register_bool_param("arith_ignore_int", m_arith_ignore_int);
|
||||
p.register_unsigned_param("arith_lazy_pivoting", m_arith_lazy_pivoting_lvl);
|
||||
p.register_unsigned_param("arith_random_seed", m_arith_random_seed);
|
||||
p.register_bool_param("arith_random_initial_value", m_arith_random_initial_value);
|
||||
p.register_int_param("arith_random_lower", m_arith_random_lower);
|
||||
p.register_int_param("arith_random_upper", m_arith_random_upper);
|
||||
p.register_bool_param("arith_adaptive", m_arith_adaptive);
|
||||
p.register_double_param("arith_adaptive_assertion_threshold", m_arith_adaptive_assertion_threshold, "Delay arithmetic atoms if the num-arith-conflicts/total-conflicts < threshold");
|
||||
p.register_double_param("arith_adaptive_propagation_threshold", m_arith_adaptive_propagation_threshold, "Disable arithmetic theory propagation if the num-arith-conflicts/total-conflicts < threshold");
|
||||
p.register_bool_param("arith_dump_lemmas", m_arith_dump_lemmas);
|
||||
p.register_bool_param("arith_eager_eq_axioms", m_arith_eager_eq_axioms);
|
||||
p.register_unsigned_param("arith_branch_cut_ratio", m_arith_branch_cut_ratio);
|
||||
|
||||
p.register_bool_param("arith_add_binary_bounds", m_arith_add_binary_bounds);
|
||||
p.register_unsigned_param("arith_prop_strategy", 0, 1, reinterpret_cast<unsigned&>(m_arith_propagation_strategy), "Propagation strategy: 0 - use agility measures based on ration of theory conflicts, 1 - propagate proportional to ratio of theory conflicts (default)");
|
||||
|
||||
p.register_bool_param("arith_eq_bounds", m_arith_eq_bounds);
|
||||
p.register_bool_param("arith_lazy_adapter", m_arith_lazy_adapter);
|
||||
p.register_bool_param("arith_gcd_test", m_arith_gcd_test);
|
||||
p.register_bool_param("arith_eager_gcd", m_arith_eager_gcd);
|
||||
p.register_bool_param("arith_adaptive_gcd", m_arith_adaptive_gcd);
|
||||
p.register_unsigned_param("arith_propagation_threshold", m_arith_propagation_threshold);
|
||||
|
||||
p.register_bool_param("nl_arith", m_nl_arith, "enable/disable non linear arithmetic support. This option is ignored when ARITH_SOLVER != 2.");
|
||||
p.register_bool_param("nl_arith_gb", m_nl_arith_gb, "enable/disable Grobner Basis computation. This option is ignored when NL_ARITH=false");
|
||||
p.register_bool_param("nl_arith_gb_eqs", m_nl_arith_gb_eqs, "enable/disable equations in the Grobner Basis to be copied to the Simplex tableau.");
|
||||
p.register_bool_param("nl_arith_gb_perturbate", m_nl_arith_gb_perturbate, "enable/disable perturbation of the variable order in GB when searching for new polynomials.");
|
||||
p.register_unsigned_param("nl_arith_gb_threshold", m_nl_arith_gb_threshold, "Grobner basis computation can be very expensive. This is a threshold on the number of new equalities that can be generated.");
|
||||
p.register_bool_param("nl_arith_branching", m_nl_arith_branching, "enable/disable branching on integer variables in non linear clusters");
|
||||
p.register_unsigned_param("nl_arith_rounds", m_nl_arith_rounds, "threshold for number of (nested) final checks for non linear arithmetic.");
|
||||
p.register_unsigned_param("nl_arith_max_degree", m_nl_arith_max_degree, "max degree for internalizing new monomials.");
|
||||
PRIVATE_PARAMS({
|
||||
p.register_bool_param("arith_fixnum", m_arith_fixnum);
|
||||
p.register_bool_param("arith_int_only", m_arith_int_only);
|
||||
p.register_bool_param("arith_enum_const_mod", m_arith_enum_const_mod, "Create axioms for the finite set of equalities for (mod x k) where k is a positive numeral constant");
|
||||
p.register_bool_param("arith_int_eq_branching", m_arith_int_eq_branching, "Determine branch predicates based on integer equation solving");
|
||||
});
|
||||
p.register_bool_param("arith_euclidean_solver", m_arith_euclidean_solver, "");
|
||||
}
|
||||
|
||||
#endif
|
156
src/smt/params/theory_arith_params.h
Normal file
156
src/smt/params/theory_arith_params.h
Normal file
|
@ -0,0 +1,156 @@
|
|||
/*++
|
||||
Copyright (c) 2006 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
theory_arith_params.h
|
||||
|
||||
Abstract:
|
||||
|
||||
<abstract>
|
||||
|
||||
Author:
|
||||
|
||||
Leonardo de Moura (leonardo) 2008-05-06.
|
||||
|
||||
Revision History:
|
||||
|
||||
--*/
|
||||
#ifndef _THEORY_ARITH_PARAMS_H_
|
||||
#define _THEORY_ARITH_PARAMS_H_
|
||||
|
||||
#include<limits.h>
|
||||
|
||||
enum arith_solver_id {
|
||||
AS_NO_ARITH,
|
||||
AS_DIFF_LOGIC,
|
||||
AS_ARITH,
|
||||
AS_DENSE_DIFF_LOGIC
|
||||
};
|
||||
|
||||
enum bound_prop_mode {
|
||||
BP_NONE,
|
||||
BP_SIMPLE, // only used for implying literals
|
||||
BP_REFINE // refine known bounds
|
||||
};
|
||||
|
||||
enum arith_prop_strategy {
|
||||
ARITH_PROP_AGILITY,
|
||||
ARITH_PROP_PROPORTIONAL
|
||||
};
|
||||
|
||||
enum arith_pivot_strategy {
|
||||
ARITH_PIVOT_SMALLEST,
|
||||
ARITH_PIVOT_GREATEST_ERROR,
|
||||
ARITH_PIVOT_LEAST_ERROR
|
||||
};
|
||||
|
||||
struct theory_arith_params {
|
||||
arith_solver_id m_arith_mode;
|
||||
bool m_arith_auto_config_simplex; //!< force simplex solver in auto_config
|
||||
unsigned m_arith_blands_rule_threshold;
|
||||
bool m_arith_propagate_eqs;
|
||||
bound_prop_mode m_arith_bound_prop;
|
||||
bool m_arith_stronger_lemmas;
|
||||
bool m_arith_skip_rows_with_big_coeffs;
|
||||
unsigned m_arith_max_lemma_size;
|
||||
unsigned m_arith_small_lemma_size;
|
||||
bool m_arith_reflect;
|
||||
bool m_arith_ignore_int;
|
||||
unsigned m_arith_lazy_pivoting_lvl;
|
||||
unsigned m_arith_random_seed;
|
||||
bool m_arith_random_initial_value;
|
||||
int m_arith_random_lower;
|
||||
int m_arith_random_upper;
|
||||
bool m_arith_adaptive;
|
||||
double m_arith_adaptive_assertion_threshold;
|
||||
double m_arith_adaptive_propagation_threshold;
|
||||
bool m_arith_dump_lemmas;
|
||||
bool m_arith_eager_eq_axioms;
|
||||
unsigned m_arith_branch_cut_ratio;
|
||||
bool m_arith_int_eq_branching;
|
||||
bool m_arith_enum_const_mod;
|
||||
|
||||
bool m_arith_gcd_test;
|
||||
bool m_arith_eager_gcd;
|
||||
bool m_arith_adaptive_gcd;
|
||||
unsigned m_arith_propagation_threshold;
|
||||
|
||||
arith_pivot_strategy m_arith_pivot_strategy;
|
||||
|
||||
// used in diff-logic
|
||||
bool m_arith_add_binary_bounds;
|
||||
arith_prop_strategy m_arith_propagation_strategy;
|
||||
|
||||
// used arith_eq_adapter
|
||||
bool m_arith_eq_bounds;
|
||||
bool m_arith_lazy_adapter;
|
||||
|
||||
// performance debugging flags
|
||||
bool m_arith_fixnum;
|
||||
bool m_arith_int_only;
|
||||
|
||||
// non linear support
|
||||
bool m_nl_arith;
|
||||
bool m_nl_arith_gb;
|
||||
unsigned m_nl_arith_gb_threshold;
|
||||
bool m_nl_arith_gb_eqs;
|
||||
bool m_nl_arith_gb_perturbate;
|
||||
unsigned m_nl_arith_max_degree;
|
||||
bool m_nl_arith_branching;
|
||||
unsigned m_nl_arith_rounds;
|
||||
|
||||
// euclidean solver for tighting bounds
|
||||
bool m_arith_euclidean_solver;
|
||||
|
||||
|
||||
theory_arith_params():
|
||||
m_arith_mode(AS_ARITH),
|
||||
m_arith_auto_config_simplex(false),
|
||||
m_arith_blands_rule_threshold(1000),
|
||||
m_arith_propagate_eqs(true),
|
||||
m_arith_bound_prop(BP_REFINE),
|
||||
m_arith_stronger_lemmas(true),
|
||||
m_arith_skip_rows_with_big_coeffs(true),
|
||||
m_arith_max_lemma_size(128),
|
||||
m_arith_small_lemma_size(16),
|
||||
m_arith_reflect(true),
|
||||
m_arith_ignore_int(false),
|
||||
m_arith_lazy_pivoting_lvl(0),
|
||||
m_arith_random_seed(0),
|
||||
m_arith_random_initial_value(false),
|
||||
m_arith_random_lower(-1000),
|
||||
m_arith_random_upper(1000),
|
||||
m_arith_adaptive(false),
|
||||
m_arith_adaptive_assertion_threshold(0.2),
|
||||
m_arith_adaptive_propagation_threshold(0.4),
|
||||
m_arith_dump_lemmas(false),
|
||||
m_arith_eager_eq_axioms(true),
|
||||
m_arith_branch_cut_ratio(2),
|
||||
m_arith_int_eq_branching(false),
|
||||
m_arith_enum_const_mod(false),
|
||||
m_arith_gcd_test(true),
|
||||
m_arith_eager_gcd(false),
|
||||
m_arith_adaptive_gcd(false),
|
||||
m_arith_propagation_threshold(UINT_MAX),
|
||||
m_arith_pivot_strategy(ARITH_PIVOT_SMALLEST),
|
||||
m_arith_add_binary_bounds(false),
|
||||
m_arith_propagation_strategy(ARITH_PROP_PROPORTIONAL),
|
||||
m_arith_eq_bounds(false),
|
||||
m_arith_lazy_adapter(false),
|
||||
m_arith_fixnum(false),
|
||||
m_arith_int_only(false),
|
||||
m_nl_arith(true),
|
||||
m_nl_arith_gb(true),
|
||||
m_nl_arith_gb_threshold(512),
|
||||
m_nl_arith_gb_eqs(false),
|
||||
m_nl_arith_gb_perturbate(true),
|
||||
m_nl_arith_max_degree(6),
|
||||
m_nl_arith_branching(true),
|
||||
m_nl_arith_rounds(1024),
|
||||
m_arith_euclidean_solver(false) {
|
||||
}
|
||||
};
|
||||
|
||||
#endif /* _THEORY_ARITH_PARAMS_H_ */
|
||||
|
75
src/smt/params/theory_array_params.h
Normal file
75
src/smt/params/theory_array_params.h
Normal file
|
@ -0,0 +1,75 @@
|
|||
/*++
|
||||
Copyright (c) 2006 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
theory_array_params.h
|
||||
|
||||
Abstract:
|
||||
|
||||
<abstract>
|
||||
|
||||
Author:
|
||||
|
||||
Leonardo de Moura (leonardo) 2008-06-01.
|
||||
|
||||
Revision History:
|
||||
|
||||
--*/
|
||||
#ifndef _THEORY_ARRAY_PARAMS_H_
|
||||
#define _THEORY_ARRAY_PARAMS_H_
|
||||
|
||||
#include"array_simplifier_params.h"
|
||||
|
||||
enum array_solver_id {
|
||||
AR_NO_ARRAY,
|
||||
AR_SIMPLE,
|
||||
AR_MODEL_BASED,
|
||||
AR_FULL
|
||||
};
|
||||
|
||||
struct theory_array_params : public array_simplifier_params {
|
||||
array_solver_id m_array_mode;
|
||||
bool m_array_weak;
|
||||
bool m_array_extensional;
|
||||
unsigned m_array_laziness;
|
||||
bool m_array_delay_exp_axiom;
|
||||
bool m_array_cg;
|
||||
bool m_array_always_prop_upward;
|
||||
bool m_array_lazy_ieq;
|
||||
unsigned m_array_lazy_ieq_delay;
|
||||
|
||||
theory_array_params():
|
||||
m_array_mode(AR_FULL),
|
||||
m_array_weak(false),
|
||||
m_array_extensional(true),
|
||||
m_array_laziness(1),
|
||||
m_array_delay_exp_axiom(true),
|
||||
m_array_cg(false),
|
||||
m_array_always_prop_upward(true), // UPWARDs filter is broken... TODO: fix it
|
||||
m_array_lazy_ieq(false),
|
||||
m_array_lazy_ieq_delay(10) {
|
||||
}
|
||||
|
||||
#if 0
|
||||
void register_params(ini_params & p) {
|
||||
p.register_int_param("array_solver", 0, 3, reinterpret_cast<int&>(m_array_mode), "0 - no array, 1 - simple, 2 - model based, 3 - full");
|
||||
p.register_bool_param("array_weak", m_array_weak);
|
||||
p.register_bool_param("array_extensional", m_array_extensional);
|
||||
p.register_unsigned_param("array_laziness", m_array_laziness);
|
||||
p.register_bool_param("array_delay_exp_axiom", m_array_delay_exp_axiom);
|
||||
p.register_bool_param("array_cg", m_array_cg);
|
||||
p.register_bool_param("array_always_prop_upward", m_array_always_prop_upward,
|
||||
"Disable the built-in filter upwards propagation");
|
||||
p.register_bool_param("array_lazy_ieq", m_array_lazy_ieq);
|
||||
p.register_unsigned_param("array_lazy_ieq_delay", m_array_lazy_ieq_delay);
|
||||
p.register_bool_param("array_canonize", m_array_canonize_simplify,
|
||||
"Normalize arrays into normal form during simplification");
|
||||
}
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif /* _THEORY_ARRAY_PARAMS_H_ */
|
||||
|
55
src/smt/params/theory_bv_params.h
Normal file
55
src/smt/params/theory_bv_params.h
Normal file
|
@ -0,0 +1,55 @@
|
|||
/*++
|
||||
Copyright (c) 2006 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
theory_bv_params.h
|
||||
|
||||
Abstract:
|
||||
|
||||
<abstract>
|
||||
|
||||
Author:
|
||||
|
||||
Leonardo de Moura (leonardo) 2008-06-06.
|
||||
|
||||
Revision History:
|
||||
|
||||
--*/
|
||||
#ifndef _THEORY_BV_PARAMS_H_
|
||||
#define _THEORY_BV_PARAMS_H_
|
||||
|
||||
enum bv_solver_id {
|
||||
BS_NO_BV,
|
||||
BS_BLASTER
|
||||
};
|
||||
|
||||
struct theory_bv_params {
|
||||
bv_solver_id m_bv_mode;
|
||||
bool m_bv_reflect;
|
||||
bool m_bv_lazy_le;
|
||||
bool m_bv_cc;
|
||||
unsigned m_bv_blast_max_size;
|
||||
bool m_bv_enable_int2bv2int;
|
||||
theory_bv_params():
|
||||
m_bv_mode(BS_BLASTER),
|
||||
m_bv_reflect(true),
|
||||
m_bv_lazy_le(false),
|
||||
m_bv_cc(false),
|
||||
m_bv_blast_max_size(INT_MAX),
|
||||
m_bv_enable_int2bv2int(false) {}
|
||||
#if 0
|
||||
void register_params(ini_params & p) {
|
||||
p.register_int_param("bv_solver", 0, 2, reinterpret_cast<int&>(m_bv_mode), "0 - no bv, 1 - simple");
|
||||
p.register_unsigned_param("bv_blast_max_size", m_bv_blast_max_size, "Maximal size for bit-vectors to blast");
|
||||
p.register_bool_param("bv_reflect", m_bv_reflect);
|
||||
p.register_bool_param("bv_lazy_le", m_bv_lazy_le);
|
||||
p.register_bool_param("bv_cc", m_bv_cc, "enable congruence closure for BV operators");
|
||||
p.register_bool_param("bv_enable_int2bv_propagation", m_bv_enable_int2bv2int,
|
||||
"enable full (potentially expensive) propagation for int2bv and bv2int");
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif /* _THEORY_BV_PARAMS_H_ */
|
||||
|
38
src/smt/params/theory_datatype_params.h
Normal file
38
src/smt/params/theory_datatype_params.h
Normal file
|
@ -0,0 +1,38 @@
|
|||
/*++
|
||||
Copyright (c) 2006 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
theory_datatype_params.h
|
||||
|
||||
Abstract:
|
||||
|
||||
<abstract>
|
||||
|
||||
Author:
|
||||
|
||||
Leonardo de Moura (leonardo) 2008-11-04.
|
||||
|
||||
Revision History:
|
||||
|
||||
--*/
|
||||
#ifndef _THEORY_DATATYPE_PARAMS_H_
|
||||
#define _THEORY_DATATYPE_PARAMS_H_
|
||||
|
||||
struct theory_datatype_params {
|
||||
unsigned m_dt_lazy_splits;
|
||||
|
||||
theory_datatype_params():
|
||||
m_dt_lazy_splits(1) {
|
||||
}
|
||||
|
||||
#if 0
|
||||
void register_params(ini_params & p) {
|
||||
p.register_unsigned_param("dt_lazy_splits", m_dt_lazy_splits, "How lazy datatype splits are performed: 0- eager, 1- lazy for infinite types, 2- lazy");
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
#endif /* _THEORY_DATATYPE_PARAMS_H_ */
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue