mirror of
https://github.com/Z3Prover/z3
synced 2025-08-08 04:01:22 +00:00
make dio less aggressive, allow other cuts
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
This commit is contained in:
parent
fee707842d
commit
a19e10912f
5 changed files with 30 additions and 15 deletions
|
@ -1151,7 +1151,7 @@ namespace lp {
|
|||
}
|
||||
// c_g is not integral
|
||||
if (lra.stats().m_dio_calls %
|
||||
lra.settings().dio_cut_from_proof_period() ==
|
||||
lra.settings().dio_branch_from_proof_period() ==
|
||||
0 &&
|
||||
!has_fresh_var(ei))
|
||||
prepare_lia_branch_report(ei, e, g, c_g);
|
||||
|
@ -1414,7 +1414,7 @@ namespace lp {
|
|||
// term_to_lar_solver(remove_fresh_vars(create_term_from_ind_c())))
|
||||
// enable_trace("dioph_eq");
|
||||
|
||||
TRACE("dioph_eq_deb", tout << "after subs\n";
|
||||
TRACE("dioph_eq_deb_subs", tout << "after subs\n";
|
||||
print_term_o(create_term_from_ind_c(), tout) << std::endl;
|
||||
tout << "term_to_tighten:";
|
||||
print_lar_term_L(term_to_tighten, tout) << std::endl;
|
||||
|
@ -1581,7 +1581,7 @@ namespace lp {
|
|||
while (progress) {
|
||||
if (!normalize_by_gcd()) {
|
||||
if (m_report_branch) {
|
||||
lra.stats().m_dio_cut_from_proofs++;
|
||||
lra.stats().m_dio_branch_from_proofs++;
|
||||
m_report_branch = false;
|
||||
return lia_move::branch;
|
||||
} else {
|
||||
|
@ -1898,6 +1898,18 @@ namespace lp {
|
|||
return false;
|
||||
}
|
||||
if (it->second != p.second) {
|
||||
TRACE("dioph_eq_deb", tout << "m_columns_to_terms[" << j << "] has to be ";
|
||||
tout << "{";
|
||||
for(unsigned lll : p.second) {
|
||||
tout << lll << ", ";
|
||||
}
|
||||
tout << "}, \nbut it is {";
|
||||
for (unsigned lll : it->second) {
|
||||
tout << lll << ", ";
|
||||
};
|
||||
tout << "}" << std::endl;
|
||||
|
||||
);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -190,7 +190,7 @@ namespace lp {
|
|||
}
|
||||
|
||||
bool should_gomory_cut() {
|
||||
return !settings().dio_cuts()
|
||||
return (!settings().dio_eqs() || settings().dio_enable_gomory_cuts())
|
||||
&& m_number_of_calls % settings().m_int_gomory_cut_period == 0;
|
||||
}
|
||||
|
||||
|
@ -199,7 +199,8 @@ namespace lp {
|
|||
}
|
||||
|
||||
bool should_hnf_cut() {
|
||||
return !settings().dio_cuts() && settings().enable_hnf() && m_number_of_calls % settings().hnf_cut_period() == 0;
|
||||
return (!settings().dio_eqs() || settings().dio_enable_hnf_cuts())
|
||||
&& settings().enable_hnf() && m_number_of_calls % settings().hnf_cut_period() == 0;
|
||||
}
|
||||
|
||||
lia_move hnf_cut() {
|
||||
|
|
|
@ -33,6 +33,5 @@ void lp::lp_settings::updt_params(params_ref const& _p) {
|
|||
m_simplex_strategy = static_cast<lp::simplex_strategy_enum>(p.arith_simplex_strategy());
|
||||
m_nlsat_delay = p.arith_nl_delay();
|
||||
m_dio_eqs = p.arith_lp_dio_eqs();
|
||||
m_dio_cuts = m_dio_eqs && p.arith_lp_dio_cuts();
|
||||
m_dio_cut_from_proof_period = p.arith_lp_dio_cut_from_proof_period();
|
||||
m_dio_branch_from_proof_period = p.arith_lp_dio_branch_from_proof_period();
|
||||
}
|
||||
|
|
|
@ -133,7 +133,7 @@ struct statistics {
|
|||
unsigned m_dio_tighten_conflicts = 0;
|
||||
unsigned m_dio_branch_iterations= 0;
|
||||
unsigned m_dio_branching_depth = 0;
|
||||
unsigned m_dio_cut_from_proofs = 0;
|
||||
unsigned m_dio_branch_from_proofs = 0;
|
||||
unsigned m_dio_branching_infeasibles = 0;
|
||||
unsigned m_dio_rewrite_conflicts = 0;
|
||||
unsigned m_dio_branching_sats = 0;
|
||||
|
@ -174,7 +174,7 @@ struct statistics {
|
|||
st.update("arith-dio-tighten-conflicts", m_dio_tighten_conflicts);
|
||||
st.update("arith-dio-branch-iterations", m_dio_branch_iterations);
|
||||
st.update("arith-dio-branch-depths", m_dio_branching_depth);
|
||||
st.update("arith-dio-cut-from-proofs", m_dio_cut_from_proofs);
|
||||
st.update("arith-dio-branch-from-proofs", m_dio_branch_from_proofs);
|
||||
st.update("arith-dio-branching-infeasibles", m_dio_branching_infeasibles);
|
||||
st.update("arith-dio-rewrite-conflicts", m_dio_rewrite_conflicts);
|
||||
st.update("arith-dio-branching-sats", m_dio_branching_sats);
|
||||
|
@ -249,8 +249,9 @@ private:
|
|||
bool m_print_external_var_name = false;
|
||||
bool m_propagate_eqs = false;
|
||||
bool m_dio_eqs = false;
|
||||
bool m_dio_cuts = false;
|
||||
unsigned m_dio_cut_from_proof_period = 2;
|
||||
bool m_dio_enable_gomory_cuts = true;
|
||||
bool m_dio_enable_hnf_cuts = true;
|
||||
unsigned m_dio_branch_from_proof_period = 100; // report rarely
|
||||
|
||||
public:
|
||||
bool print_external_var_name() const { return m_print_external_var_name; }
|
||||
|
@ -260,8 +261,9 @@ public:
|
|||
unsigned random_next() { return m_rand(); }
|
||||
unsigned random_next(unsigned u ) { return m_rand(u); }
|
||||
bool dio_eqs() { return m_dio_eqs; }
|
||||
bool dio_cuts() { return m_dio_eqs && m_dio_cuts; }
|
||||
unsigned dio_cut_from_proof_period() { return m_dio_cut_from_proof_period; }
|
||||
bool dio_enable_gomory_cuts() { return m_dio_eqs && m_dio_enable_gomory_cuts; }
|
||||
bool dio_enable_hnf_cuts() { return m_dio_eqs && m_dio_enable_hnf_cuts; }
|
||||
unsigned dio_branch_from_proof_period() { return m_dio_branch_from_proof_period; }
|
||||
void set_random_seed(unsigned s) { m_rand.set_seed(s); }
|
||||
|
||||
bool bound_progation() const {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue