mirror of
https://github.com/Z3Prover/z3
synced 2025-08-04 02:10:23 +00:00
re-introduce eq2ineq name for rewriting parameter
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
93474c0263
commit
5492d0e135
9 changed files with 28 additions and 53 deletions
|
@ -123,7 +123,7 @@ void asserted_formulas::set_eliminate_and(bool flag) {
|
|||
p.set_bool("arith_ineq_lhs", true);
|
||||
p.set_bool("sort_sums", true);
|
||||
p.set_bool("rewrite_patterns", true);
|
||||
p.set_bool("expand_eqs", m_params.m_arith_expand_eqs);
|
||||
p.set_bool("eq2ineq", m_params.m_arith_eq2ineq);
|
||||
p.set_bool("gcd_rounding", true);
|
||||
m_rewriter.updt_params(p);
|
||||
flush_cache();
|
||||
|
|
|
@ -38,14 +38,14 @@ void theory_arith_params::updt_params(params_ref const & _p) {
|
|||
m_arith_dump_lemmas = p.arith_dump_lemmas();
|
||||
m_arith_reflect = p.arith_reflect();
|
||||
arith_rewriter_params ap(_p);
|
||||
m_arith_expand_eqs = ap.expand_eqs();
|
||||
m_arith_eq2ineq = ap.eq2ineq();
|
||||
}
|
||||
|
||||
|
||||
#define DISPLAY_PARAM(X) out << #X"=" << X << std::endl;
|
||||
|
||||
void theory_arith_params::display(std::ostream & out) const {
|
||||
DISPLAY_PARAM(m_arith_expand_eqs);
|
||||
DISPLAY_PARAM(m_arith_eq2ineq);
|
||||
DISPLAY_PARAM(m_arith_process_all_eqs);
|
||||
DISPLAY_PARAM(m_arith_mode);
|
||||
DISPLAY_PARAM(m_arith_auto_config_simplex); //!< force simplex solver in auto_config
|
||||
|
|
|
@ -49,7 +49,7 @@ enum arith_pivot_strategy {
|
|||
};
|
||||
|
||||
struct theory_arith_params {
|
||||
bool m_arith_expand_eqs;
|
||||
bool m_arith_eq2ineq;
|
||||
bool m_arith_process_all_eqs;
|
||||
arith_solver_id m_arith_mode;
|
||||
bool m_arith_auto_config_simplex; //!< force simplex solver in auto_config
|
||||
|
@ -110,7 +110,7 @@ struct theory_arith_params {
|
|||
|
||||
|
||||
theory_arith_params(params_ref const & p = params_ref()):
|
||||
m_arith_expand_eqs(false),
|
||||
m_arith_eq2ineq(false),
|
||||
m_arith_process_all_eqs(false),
|
||||
m_arith_mode(AS_ARITH),
|
||||
m_arith_auto_config_simplex(false),
|
||||
|
|
|
@ -226,7 +226,7 @@ namespace smt {
|
|||
|
||||
void setup::setup_QF_RDL() {
|
||||
m_params.m_relevancy_lvl = 0;
|
||||
m_params.m_arith_expand_eqs = true;
|
||||
m_params.m_arith_eq2ineq = true;
|
||||
m_params.m_arith_reflect = false;
|
||||
m_params.m_arith_propagate_eqs = false;
|
||||
m_params.m_nnf_cnf = false;
|
||||
|
@ -266,7 +266,7 @@ namespace smt {
|
|||
TRACE("setup", tout << "setup_QF_RDL(st)\n";);
|
||||
check_no_uninterpreted_functions(st, "QF_RDL");
|
||||
m_params.m_relevancy_lvl = 0;
|
||||
m_params.m_arith_expand_eqs = true;
|
||||
m_params.m_arith_eq2ineq = true;
|
||||
m_params.m_arith_reflect = false;
|
||||
m_params.m_arith_propagate_eqs = false;
|
||||
m_params.m_nnf_cnf = false;
|
||||
|
@ -318,7 +318,7 @@ namespace smt {
|
|||
void setup::setup_QF_IDL() {
|
||||
TRACE("setup", tout << "setup_QF_IDL()\n";);
|
||||
m_params.m_relevancy_lvl = 0;
|
||||
m_params.m_arith_expand_eqs = true;
|
||||
m_params.m_arith_eq2ineq = true;
|
||||
m_params.m_arith_reflect = false;
|
||||
m_params.m_arith_propagate_eqs = false;
|
||||
m_params.m_arith_small_lemma_size = 30;
|
||||
|
@ -336,7 +336,7 @@ namespace smt {
|
|||
TRACE("setup", tout << "setup_QF_IDL(st)\n";);
|
||||
check_no_uninterpreted_functions(st, "QF_IDL");
|
||||
m_params.m_relevancy_lvl = 0;
|
||||
m_params.m_arith_expand_eqs = true;
|
||||
m_params.m_arith_eq2ineq = true;
|
||||
m_params.m_arith_reflect = false;
|
||||
m_params.m_arith_propagate_eqs = false;
|
||||
m_params.m_arith_small_lemma_size = 30;
|
||||
|
@ -390,7 +390,7 @@ namespace smt {
|
|||
m_params.m_arith_reflect = false;
|
||||
m_params.m_nnf_cnf = false;
|
||||
m_params.m_arith_eq_bounds = true;
|
||||
m_params.m_arith_expand_eqs = true;
|
||||
m_params.m_arith_eq2ineq = true;
|
||||
m_params.m_phase_selection = PS_ALWAYS_FALSE;
|
||||
m_params.m_restart_strategy = RS_GEOMETRIC;
|
||||
m_params.m_restart_factor = 1.5;
|
||||
|
@ -406,8 +406,8 @@ namespace smt {
|
|||
m_params.m_arith_reflect = false;
|
||||
m_params.m_nnf_cnf = false;
|
||||
if (st.m_num_uninterpreted_functions == 0) {
|
||||
m_params.m_arith_expand_eqs = true;
|
||||
m_params.m_arith_propagate_eqs = false;
|
||||
m_params.m_arith_eq2ineq = true;
|
||||
m_params.m_arith_propagate_eqs = false;
|
||||
if (is_dense(st)) {
|
||||
m_params.m_arith_small_lemma_size = 128;
|
||||
m_params.m_lemma_gc_half = true;
|
||||
|
@ -440,7 +440,7 @@ namespace smt {
|
|||
void setup::setup_QF_LRA() {
|
||||
TRACE("setup", tout << "setup_QF_LRA(st)\n";);
|
||||
m_params.m_relevancy_lvl = 0;
|
||||
m_params.m_arith_expand_eqs = true;
|
||||
m_params.m_arith_eq2ineq = true;
|
||||
m_params.m_arith_reflect = false;
|
||||
m_params.m_arith_propagate_eqs = false;
|
||||
m_params.m_eliminate_term_ite = true;
|
||||
|
@ -451,7 +451,7 @@ namespace smt {
|
|||
void setup::setup_QF_LRA(static_features const & st) {
|
||||
check_no_uninterpreted_functions(st, "QF_LRA");
|
||||
m_params.m_relevancy_lvl = 0;
|
||||
m_params.m_arith_expand_eqs = true;
|
||||
m_params.m_arith_eq2ineq = true;
|
||||
m_params.m_arith_reflect = false;
|
||||
m_params.m_arith_propagate_eqs = false;
|
||||
m_params.m_eliminate_term_ite = true;
|
||||
|
@ -480,7 +480,7 @@ namespace smt {
|
|||
void setup::setup_QF_LIA() {
|
||||
TRACE("setup", tout << "setup_QF_LIA(st)\n";);
|
||||
m_params.m_relevancy_lvl = 0;
|
||||
m_params.m_arith_expand_eqs = true;
|
||||
m_params.m_arith_eq2ineq = true;
|
||||
m_params.m_arith_reflect = false;
|
||||
m_params.m_arith_propagate_eqs = false;
|
||||
m_params.m_nnf_cnf = false;
|
||||
|
@ -492,12 +492,12 @@ namespace smt {
|
|||
TRACE("setup", tout << "QF_LIA setup\n";);
|
||||
|
||||
m_params.m_relevancy_lvl = 0;
|
||||
m_params.m_arith_expand_eqs = true;
|
||||
m_params.m_arith_eq2ineq = true;
|
||||
m_params.m_arith_reflect = false;
|
||||
m_params.m_arith_propagate_eqs = false;
|
||||
m_params.m_nnf_cnf = false;
|
||||
if (st.m_max_ite_tree_depth > 50) {
|
||||
m_params.m_arith_expand_eqs = false;
|
||||
m_params.m_arith_eq2ineq = false;
|
||||
m_params.m_pull_cheap_ite_trees = true;
|
||||
m_params.m_arith_propagate_eqs = true;
|
||||
m_params.m_relevancy_lvl = 2;
|
||||
|
@ -507,7 +507,7 @@ namespace smt {
|
|||
m_params.m_arith_gcd_test = false;
|
||||
m_params.m_arith_branch_cut_ratio = 4;
|
||||
m_params.m_relevancy_lvl = 2;
|
||||
m_params.m_arith_expand_eqs = true;
|
||||
m_params.m_arith_eq2ineq = true;
|
||||
m_params.m_eliminate_term_ite = true;
|
||||
// if (st.m_num_exprs < 5000 && st.m_num_ite_terms < 50) { // safeguard to avoid high memory consumption
|
||||
// TODO: implement analsysis function to decide where lift ite is too expensive.
|
||||
|
@ -755,7 +755,7 @@ namespace smt {
|
|||
m_context.register_plugin(alloc(smt::theory_dummy, m_manager.mk_family_id("arith"), "no arithmetic"));
|
||||
break;
|
||||
case AS_DIFF_LOGIC:
|
||||
m_params.m_arith_expand_eqs = true;
|
||||
m_params.m_arith_eq2ineq = true;
|
||||
if (fixnum) {
|
||||
if (int_only)
|
||||
m_context.register_plugin(alloc(smt::theory_fidl, m_manager, m_params));
|
||||
|
@ -770,7 +770,7 @@ namespace smt {
|
|||
}
|
||||
break;
|
||||
case AS_DENSE_DIFF_LOGIC:
|
||||
m_params.m_arith_expand_eqs = true;
|
||||
m_params.m_arith_eq2ineq = true;
|
||||
if (fixnum) {
|
||||
if (int_only)
|
||||
m_context.register_plugin(alloc(smt::theory_dense_si, m_manager, m_params));
|
||||
|
@ -785,7 +785,7 @@ namespace smt {
|
|||
}
|
||||
break;
|
||||
case AS_UTVPI:
|
||||
m_params.m_arith_expand_eqs = true;
|
||||
m_params.m_arith_eq2ineq = true;
|
||||
if (int_only)
|
||||
m_context.register_plugin(alloc(smt::theory_iutvpi, m_manager));
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue