mirror of
https://github.com/Z3Prover/z3
synced 2025-04-24 09:35:32 +00:00
Adding some options in support of F* (#6774)
* patterns: add option for pattern decomposition (pi.decompose_patterns) True by default, retaining current behavior. * rewriter: add option for sorting of disjunctions (rewriter.sort_disjunctions) True by default, retaining current behavior.
This commit is contained in:
parent
eb1caee18a
commit
3517361a73
8 changed files with 14 additions and 2 deletions
|
@ -4,6 +4,7 @@ def_module_params(module_name='rewriter',
|
|||
params=(("ite_extra_rules", BOOL, True, "extra ite simplifications, these additional simplifications may reduce size locally but increase globally"),
|
||||
("flat", BOOL, True, "create nary applications for +,*,bvadd,bvmul,bvand,bvor,bvxor"),
|
||||
("flat_and_or", BOOL, True, "create nary applications for and,or"),
|
||||
("sort_disjunctions", BOOL, True, "sort subterms in disjunctions"),
|
||||
("elim_and", BOOL, False, "conjunctions are rewritten using negation and disjunctions"),
|
||||
('elim_ite', BOOL, True, "eliminate ite in favor of and/or"),
|
||||
("local_ctx", BOOL, False, "perform local (i.e., cheap) context simplifications"),
|
||||
|
|
|
@ -23,6 +23,7 @@ void pattern_inference_params::updt_params(params_ref const & _p) {
|
|||
pattern_inference_params_helper p(_p);
|
||||
m_pi_max_multi_patterns = p.max_multi_patterns();
|
||||
m_pi_block_loop_patterns = p.block_loop_patterns();
|
||||
m_pi_decompose_patterns = p.decompose_patterns();
|
||||
m_pi_arith = static_cast<arith_pattern_inference_kind>(p.arith());
|
||||
m_pi_use_database = p.use_database();
|
||||
m_pi_arith_weight = p.arith_weight();
|
||||
|
@ -36,6 +37,7 @@ void pattern_inference_params::updt_params(params_ref const & _p) {
|
|||
void pattern_inference_params::display(std::ostream & out) const {
|
||||
DISPLAY_PARAM(m_pi_max_multi_patterns);
|
||||
DISPLAY_PARAM(m_pi_block_loop_patterns);
|
||||
DISPLAY_PARAM(m_pi_decompose_patterns);
|
||||
DISPLAY_PARAM(m_pi_arith);
|
||||
DISPLAY_PARAM(m_pi_use_database);
|
||||
DISPLAY_PARAM(m_pi_arith_weight);
|
||||
|
|
|
@ -29,6 +29,7 @@ enum arith_pattern_inference_kind {
|
|||
struct pattern_inference_params {
|
||||
unsigned m_pi_max_multi_patterns;
|
||||
bool m_pi_block_loop_patterns;
|
||||
bool m_pi_decompose_patterns;
|
||||
arith_pattern_inference_kind m_pi_arith;
|
||||
bool m_pi_use_database;
|
||||
unsigned m_pi_arith_weight;
|
||||
|
|
|
@ -4,6 +4,7 @@ def_module_params(class_name='pattern_inference_params_helper',
|
|||
export=True,
|
||||
params=(('max_multi_patterns', UINT, 0, 'when patterns are not provided, the prover uses a heuristic to infer them, this option sets the threshold on the number of extra multi-patterns that can be created; by default, the prover creates at most one multi-pattern when there is no unary pattern'),
|
||||
('block_loop_patterns', BOOL, True, 'block looping patterns during pattern inference'),
|
||||
('decompose_patterns', BOOL, True, 'allow decomposition of patterns into multipatterns'),
|
||||
('arith', UINT, 1, '0 - do not infer patterns with arithmetic terms, 1 - use patterns with arithmetic terms if there is no other pattern, 2 - always use patterns with arithmetic terms'),
|
||||
('use_database', BOOL, False, 'use pattern database'),
|
||||
('arith_weight', UINT, 5, 'default weight for quantifiers where the only available pattern has nested arithmetic terms'),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue