mirror of
https://github.com/Z3Prover/z3
synced 2025-06-20 04:43:39 +00:00
shuffle dependencies
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
4e6476c90a
commit
b9cbb08858
24 changed files with 27 additions and 30 deletions
|
@ -23,7 +23,6 @@ z3_add_component(pattern
|
|||
SOURCES
|
||||
expr_pattern_match.cpp
|
||||
pattern_inference.cpp
|
||||
pattern_inference_params.cpp
|
||||
# Let CMake know this target depends on this generated
|
||||
# header file
|
||||
${CMAKE_CURRENT_BINARY_DIR}/database.h
|
||||
|
@ -31,6 +30,4 @@ z3_add_component(pattern
|
|||
normal_forms
|
||||
rewriter
|
||||
smt2parser
|
||||
PYG_FILES
|
||||
pattern_inference_params_helper.pyg
|
||||
)
|
||||
|
|
|
@ -20,7 +20,7 @@ Revision History:
|
|||
|
||||
#include "ast/ast.h"
|
||||
#include "ast/rewriter/rewriter.h"
|
||||
#include "ast/pattern/pattern_inference_params.h"
|
||||
#include "params/pattern_inference_params.h"
|
||||
#include "util/vector.h"
|
||||
#include "util/uint_set.h"
|
||||
#include "util/nat_set.h"
|
||||
|
|
|
@ -1,47 +0,0 @@
|
|||
/*++
|
||||
Copyright (c) 2012 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
pattern_inference_params.h
|
||||
|
||||
Abstract:
|
||||
|
||||
<abstract>
|
||||
|
||||
Author:
|
||||
|
||||
Leonardo de Moura (leonardo) 2012-12-02.
|
||||
|
||||
Revision History:
|
||||
|
||||
--*/
|
||||
#include "ast/pattern/pattern_inference_params.h"
|
||||
#include "ast/pattern/pattern_inference_params_helper.hpp"
|
||||
|
||||
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_arith = static_cast<arith_pattern_inference_kind>(p.arith());
|
||||
m_pi_use_database = p.use_database();
|
||||
m_pi_arith_weight = p.arith_weight();
|
||||
m_pi_non_nested_arith_weight = p.non_nested_arith_weight();
|
||||
m_pi_pull_quantifiers = p.pull_quantifiers();
|
||||
m_pi_warnings = p.warnings();
|
||||
}
|
||||
|
||||
#define DISPLAY_PARAM(X) out << #X"=" << X << std::endl;
|
||||
|
||||
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_arith);
|
||||
DISPLAY_PARAM(m_pi_use_database);
|
||||
DISPLAY_PARAM(m_pi_arith_weight);
|
||||
DISPLAY_PARAM(m_pi_non_nested_arith_weight);
|
||||
DISPLAY_PARAM(m_pi_pull_quantifiers);
|
||||
DISPLAY_PARAM(m_pi_nopat_weight);
|
||||
DISPLAY_PARAM(m_pi_avoid_skolems);
|
||||
DISPLAY_PARAM(m_pi_warnings);
|
||||
}
|
|
@ -1,52 +0,0 @@
|
|||
/*++
|
||||
Copyright (c) 2006 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
pattern_inference_params.h
|
||||
|
||||
Abstract:
|
||||
|
||||
<abstract>
|
||||
|
||||
Author:
|
||||
|
||||
Leonardo de Moura (leonardo) 2008-03-24.
|
||||
|
||||
Revision History:
|
||||
|
||||
--*/
|
||||
#pragma once
|
||||
|
||||
#include "util/params.h"
|
||||
|
||||
enum arith_pattern_inference_kind {
|
||||
AP_NO, // do not infer patterns with arithmetic terms
|
||||
AP_CONSERVATIVE, // only infer patterns with arithmetic terms if there is no other option
|
||||
AP_FULL // always use patterns with arithmetic terms
|
||||
};
|
||||
|
||||
struct pattern_inference_params {
|
||||
unsigned m_pi_max_multi_patterns;
|
||||
bool m_pi_block_loop_patterns;
|
||||
arith_pattern_inference_kind m_pi_arith;
|
||||
bool m_pi_use_database;
|
||||
unsigned m_pi_arith_weight;
|
||||
unsigned m_pi_non_nested_arith_weight;
|
||||
bool m_pi_pull_quantifiers;
|
||||
int m_pi_nopat_weight;
|
||||
bool m_pi_avoid_skolems;
|
||||
bool m_pi_warnings;
|
||||
|
||||
pattern_inference_params(params_ref const & p = params_ref()):
|
||||
m_pi_nopat_weight(-1),
|
||||
m_pi_avoid_skolems(true) {
|
||||
updt_params(p);
|
||||
}
|
||||
|
||||
void updt_params(params_ref const & _p);
|
||||
|
||||
void display(std::ostream & out) const;
|
||||
};
|
||||
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
def_module_params(class_name='pattern_inference_params_helper',
|
||||
module_name='pi',
|
||||
description='pattern inference (heuristics) for universal formulas (without annotation)',
|
||||
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'),
|
||||
('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'),
|
||||
('non_nested_arith_weight', UINT, 10, 'default weight for quantifiers where the only available pattern has non nested arithmetic terms'),
|
||||
('pull_quantifiers', BOOL, True, 'pull nested quantifiers, if no pattern was found'),
|
||||
('warnings', BOOL, False, 'enable/disable warning messages in the pattern inference module')))
|
Loading…
Add table
Add a link
Reference in a new issue