diff --git a/scripts/mk_project.py b/scripts/mk_project.py index ac6f44a83..707d067e2 100644 --- a/scripts/mk_project.py +++ b/scripts/mk_project.py @@ -35,17 +35,15 @@ def init_project_def(): add_lib('cmd_context', ['solver', 'rewriter']) add_lib('extra_cmds', ['cmd_context', 'subpaving_tactic', 'arith_tactics'], 'cmd_context/extra_cmds') add_lib('smt2parser', ['cmd_context', 'parser_util'], 'parsers/smt2') - # Front-end-params module still contain a lot of parameters for smt solver component. - # This should be fixed - add_lib('front_end_params', ['ast']) + add_lib('proof_checker', ['rewriter'], 'ast/proof_checker') # Simplifier module will be deleted in the future. # It has been replaced with rewriter module. - add_lib('simplifier', ['rewriter', 'front_end_params'], 'ast/simplifier') + add_lib('simplifier', ['rewriter'], 'ast/simplifier') + add_lib('macros', ['simplifier'], 'ast/macros') add_lib('pattern', ['normal_forms', 'smt2parser', 'simplifier'], 'ast/pattern') - add_lib('macros', ['simplifier', 'front_end_params'], 'ast/macros') - add_lib('proof_checker', ['rewriter', 'front_end_params'], 'ast/proof_checker') - add_lib('bit_blaster', ['rewriter', 'simplifier', 'front_end_params'], 'ast/rewriter/bit_blaster') - add_lib('proto_model', ['model', 'simplifier', 'front_end_params'], 'smt/proto_model') + add_lib('bit_blaster', ['rewriter', 'simplifier'], 'ast/rewriter/bit_blaster') + add_lib('smt_params', ['ast', 'simplifier', 'pattern', 'bit_blaster'], 'smt/params') + add_lib('proto_model', ['model', 'simplifier', 'smt_params'], 'smt/proto_model') add_lib('smt', ['bit_blaster', 'macros', 'normal_forms', 'cmd_context', 'proto_model', 'substitution', 'grobner', 'euclid', 'proof_checker', 'pattern', 'parser_util']) add_lib('user_plugin', ['smt'], 'smt/user_plugin') diff --git a/src/front_end_params/pattern_inference_params.h b/src/ast/pattern/pattern_inference_params.h similarity index 100% rename from src/front_end_params/pattern_inference_params.h rename to src/ast/pattern/pattern_inference_params.h diff --git a/src/ast/proof_checker/proof_checker.cpp b/src/ast/proof_checker/proof_checker.cpp index bef0fea9c..240504048 100644 --- a/src/ast/proof_checker/proof_checker.cpp +++ b/src/ast/proof_checker/proof_checker.cpp @@ -4,7 +4,6 @@ // include "spc_decl_plugin.h" #include "ast_smt_pp.h" #include "arith_decl_plugin.h" -#include "smt_params.h" #include "th_rewriter.h" #include "var_subst.h" diff --git a/src/front_end_params/bit_blaster_params.h b/src/ast/rewriter/bit_blaster/bit_blaster_params.h similarity index 100% rename from src/front_end_params/bit_blaster_params.h rename to src/ast/rewriter/bit_blaster/bit_blaster_params.h diff --git a/src/front_end_params/arith_simplifier_params.h b/src/ast/simplifier/arith_simplifier_params.h similarity index 100% rename from src/front_end_params/arith_simplifier_params.h rename to src/ast/simplifier/arith_simplifier_params.h diff --git a/src/ast/simplifier/array_simplifier_params.h b/src/ast/simplifier/array_simplifier_params.h new file mode 100644 index 000000000..8b9f3e37e --- /dev/null +++ b/src/ast/simplifier/array_simplifier_params.h @@ -0,0 +1,33 @@ +/*++ +Copyright (c) 2006 Microsoft Corporation + +Module Name: + + array_simplifier_params.h + +Abstract: + + This file was created during code reorg. + +Author: + + Leonardo de Moura (leonardo) 2012-12-02. + +Revision History: + +--*/ +#ifndef _ARRAY_SIMPLIFIER_PARAMS_H_ +#define _ARRAY_SIMPLIFIER_PARAMS_H_ + +struct array_simplifier_params { + bool m_array_canonize_simplify; + bool m_array_simplify; // temporary hack for disabling array simplifier plugin. + + array_simplifier_params(): + m_array_canonize_simplify(false), + m_array_simplify(true) { + } +}; + +#endif /* _ARITH_SIMPLIFIER_PARAMS_H_ */ + diff --git a/src/ast/simplifier/array_simplifier_plugin.cpp b/src/ast/simplifier/array_simplifier_plugin.cpp index 8654db275..75c3cdbce 100644 --- a/src/ast/simplifier/array_simplifier_plugin.cpp +++ b/src/ast/simplifier/array_simplifier_plugin.cpp @@ -33,7 +33,7 @@ array_simplifier_plugin::array_simplifier_plugin( ast_manager & m, basic_simplifier_plugin& s, simplifier& simp, - theory_array_params const& p) : + array_simplifier_params const& p) : simplifier_plugin(symbol("array"),m), m_util(m), m_simp(s), diff --git a/src/ast/simplifier/array_simplifier_plugin.h b/src/ast/simplifier/array_simplifier_plugin.h index fffa18c3f..572da9a17 100644 --- a/src/ast/simplifier/array_simplifier_plugin.h +++ b/src/ast/simplifier/array_simplifier_plugin.h @@ -24,7 +24,7 @@ Revision History: #include"array_decl_plugin.h" #include"simplifier_plugin.h" #include"basic_simplifier_plugin.h" -#include"theory_array_params.h" +#include"array_simplifier_params.h" #include"simplifier.h" #include"obj_hashtable.h" #include"lbool.h" @@ -71,7 +71,7 @@ class array_simplifier_plugin : public simplifier_plugin { array_util m_util; basic_simplifier_plugin& m_simp; simplifier& m_simplifier; - theory_array_params const& m_params; + array_simplifier_params const& m_params; select_cache m_select_cache; ptr_vector m_tmp; ptr_vector m_tmp2; @@ -100,7 +100,7 @@ class array_simplifier_plugin : public simplifier_plugin { public: - array_simplifier_plugin(ast_manager & m, basic_simplifier_plugin& s, simplifier& simp, theory_array_params const& p); + array_simplifier_plugin(ast_manager & m, basic_simplifier_plugin& s, simplifier& simp, array_simplifier_params const& p); virtual ~array_simplifier_plugin(); virtual bool reduce(func_decl * f, unsigned num_args, expr * const * args, expr_ref & result); diff --git a/src/front_end_params/bv_simplifier_params.h b/src/ast/simplifier/bv_simplifier_params.h similarity index 61% rename from src/front_end_params/bv_simplifier_params.h rename to src/ast/simplifier/bv_simplifier_params.h index 887940e36..4bec70285 100644 --- a/src/front_end_params/bv_simplifier_params.h +++ b/src/ast/simplifier/bv_simplifier_params.h @@ -27,12 +27,6 @@ struct bv_simplifier_params { m_hi_div0(true), m_bv2int_distribute(true) { } -#if 0 - void register_params(ini_params & p) { - p.register_bool_param("hi_div0", m_hi_div0, "if true, then Z3 uses the usual hardware interpretation for division (rem, mod) by zero. Otherwise, these operations are considered uninterpreted."); - p.register_bool_param("bv2int_distribute", m_bv2int_distribute, "if true, then int2bv is distributed over arithmetical operators."); - } -#endif }; #endif /* _BV_SIMPLIFIER_PARAMS_H_ */ diff --git a/src/front_end_params/arith_simplifier_params.cpp b/src/front_end_params/arith_simplifier_params.cpp deleted file mode 100644 index 8cf07b915..000000000 --- a/src/front_end_params/arith_simplifier_params.cpp +++ /dev/null @@ -1,27 +0,0 @@ -/*++ -Copyright (c) 2006 Microsoft Corporation - -Module Name: - - arith_simplifier_params.cpp - -Abstract: - - - -Author: - - Leonardo de Moura (leonardo) 2008-05-09. - -Revision History: - ---*/ - -#include"arith_simplifier_params.h" - -#if 0 -void arith_simplifier_params::register_params(ini_params & p) { - p.register_bool_param("arith_expand_eqs", m_arith_expand_eqs); - p.register_bool_param("arith_process_all_eqs", m_arith_process_all_eqs); -} -#endif diff --git a/src/front_end_params/pattern_inference_params.cpp b/src/front_end_params/pattern_inference_params.cpp deleted file mode 100644 index cfc0df4f1..000000000 --- a/src/front_end_params/pattern_inference_params.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/*++ -Copyright (c) 2006 Microsoft Corporation - -Module Name: - - pattern_inference_params.cpp - -Abstract: - - - -Author: - - Leonardo de Moura (leonardo) 2008-03-24. - -Revision History: - ---*/ -#include"pattern_inference_params.h" - -#if 0 -void pattern_inference_params::register_params(ini_params & p) { - p.register_unsigned_param("pi_max_multi_patterns", m_pi_max_multi_patterns, - "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"); - p.register_bool_param("pi_block_loop_patterns", m_pi_block_loop_patterns, - "block looping patterns during pattern inference"); - p.register_int_param("pi_arith", 0, 2, reinterpret_cast(m_pi_arith), - "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."); - p.register_bool_param("pi_use_database", m_pi_use_database); - p.register_unsigned_param("pi_arith_weight", m_pi_arith_weight, "default weight for quantifiers where the only available pattern has nested arithmetic terms."); - p.register_unsigned_param("pi_non_nested_arith_weight", m_pi_non_nested_arith_weight, "default weight for quantifiers where the only available pattern has non nested arithmetic terms."); - p.register_bool_param("pi_pull_quantifiers", m_pi_pull_quantifiers, "pull nested quantifiers, if no pattern was found."); - p.register_int_param("pi_nopat_weight", m_pi_nopat_weight, "set weight of quantifiers without patterns, if negative the weight is not changed."); - p.register_bool_param("pi_avoid_skolems", m_pi_avoid_skolems); - p.register_bool_param("pi_warnings", m_pi_warnings, "enable/disable warning messages in the pattern inference module."); -} -#endif - diff --git a/src/front_end_params/README b/src/smt/params/README similarity index 100% rename from src/front_end_params/README rename to src/smt/params/README diff --git a/src/front_end_params/dyn_ack_params.cpp b/src/smt/params/dyn_ack_params.cpp similarity index 100% rename from src/front_end_params/dyn_ack_params.cpp rename to src/smt/params/dyn_ack_params.cpp diff --git a/src/front_end_params/dyn_ack_params.h b/src/smt/params/dyn_ack_params.h similarity index 100% rename from src/front_end_params/dyn_ack_params.h rename to src/smt/params/dyn_ack_params.h diff --git a/src/front_end_params/params2smt_params.cpp b/src/smt/params/params2smt_params.cpp similarity index 100% rename from src/front_end_params/params2smt_params.cpp rename to src/smt/params/params2smt_params.cpp diff --git a/src/front_end_params/params2smt_params.h b/src/smt/params/params2smt_params.h similarity index 100% rename from src/front_end_params/params2smt_params.h rename to src/smt/params/params2smt_params.h diff --git a/src/front_end_params/preprocessor_params.h b/src/smt/params/preprocessor_params.h similarity index 100% rename from src/front_end_params/preprocessor_params.h rename to src/smt/params/preprocessor_params.h diff --git a/src/front_end_params/qi_params.h b/src/smt/params/qi_params.h similarity index 100% rename from src/front_end_params/qi_params.h rename to src/smt/params/qi_params.h diff --git a/src/front_end_params/smt_params.cpp b/src/smt/params/smt_params.cpp similarity index 100% rename from src/front_end_params/smt_params.cpp rename to src/smt/params/smt_params.cpp diff --git a/src/front_end_params/smt_params.h b/src/smt/params/smt_params.h similarity index 100% rename from src/front_end_params/smt_params.h rename to src/smt/params/smt_params.h diff --git a/src/front_end_params/theory_arith_params.cpp b/src/smt/params/theory_arith_params.cpp similarity index 100% rename from src/front_end_params/theory_arith_params.cpp rename to src/smt/params/theory_arith_params.cpp diff --git a/src/front_end_params/theory_arith_params.h b/src/smt/params/theory_arith_params.h similarity index 100% rename from src/front_end_params/theory_arith_params.h rename to src/smt/params/theory_arith_params.h diff --git a/src/front_end_params/theory_array_params.h b/src/smt/params/theory_array_params.h similarity index 88% rename from src/front_end_params/theory_array_params.h rename to src/smt/params/theory_array_params.h index e33bc2566..c1ae8ce32 100644 --- a/src/front_end_params/theory_array_params.h +++ b/src/smt/params/theory_array_params.h @@ -19,6 +19,8 @@ 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, @@ -26,7 +28,7 @@ enum array_solver_id { AR_FULL }; -struct theory_array_params { +struct theory_array_params : public array_simplifier_params { array_solver_id m_array_mode; bool m_array_weak; bool m_array_extensional; @@ -36,8 +38,6 @@ struct theory_array_params { bool m_array_always_prop_upward; bool m_array_lazy_ieq; unsigned m_array_lazy_ieq_delay; - bool m_array_canonize_simplify; - bool m_array_simplify; // temporary hack for disabling array simplifier plugin. theory_array_params(): m_array_mode(AR_FULL), @@ -48,9 +48,7 @@ struct theory_array_params { 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), - m_array_canonize_simplify(false), - m_array_simplify(true) { + m_array_lazy_ieq_delay(10) { } #if 0 diff --git a/src/front_end_params/theory_bv_params.h b/src/smt/params/theory_bv_params.h similarity index 100% rename from src/front_end_params/theory_bv_params.h rename to src/smt/params/theory_bv_params.h diff --git a/src/front_end_params/theory_datatype_params.h b/src/smt/params/theory_datatype_params.h similarity index 100% rename from src/front_end_params/theory_datatype_params.h rename to src/smt/params/theory_datatype_params.h