mirror of
https://github.com/Z3Prover/z3
synced 2025-07-29 07:27:57 +00:00
no calling cut_solver when there are bounded columns
Signed-off-by: Lev Nachmanson <levnach@hotmail.com> use special bounds inf find_cube for x+y, x-y Signed-off-by: Lev Nachmanson <levnach@hotmail.com> bug fixes in column patching, add stats to patching, restructure int_solver Signed-off-by: Lev Nachmanson <levnach@hotmail.com> comment out m_old_values from int_solver Signed-off-by: Lev Nachmanson <levnach@hotmail.com> avoid calling pivot_fixed_vars_from_basis() in int_solver Signed-off-by: Lev Nachmanson <levnach@hotmail.com> fix the return value from path_nbasic_columns Signed-off-by: Lev Nachmanson <levnach@hotmail.com> fix the return value from path_nbasic_columns Signed-off-by: Lev Nachmanson <levnach@hotmail.com> work in patch_columns Signed-off-by: Lev Nachmanson <levnach@hotmail.com> work on int_solver check() Signed-off-by: Lev Nachmanson <levnach@hotmail.com> exit from find_free_interval() when l >= u Signed-off-by: Lev Nachmanson <levnach@hotmail.com> experiment with branching on nbasic columns Signed-off-by: Lev Nachmanson <levnach@hotmail.com> remove m_old_values Signed-off-by: Lev Nachmanson <levnach@hotmail.com> add rounding to patch_columns Signed-off-by: Lev Nachmanson <levnach@hotmail.com> qflia Signed-off-by: Lev Nachmanson <levnach@hotmail.com> patch all columns, round non-patched, branch or basic columns Signed-off-by: Lev Nachmanson <levnach@hotmail.com> refactor int_solver::check() Signed-off-by: Lev Nachmanson <levnach@hotmail.com> restore move_non_basic_columns_to_bounds() after a failure in find_cube() Signed-off-by: Lev Nachmanson <levnach@hotmail.com> optimize gomory cuts search Signed-off-by: Lev Nachmanson <levnach@hotmail.com> produce gomory cuts without moving columns to bounds Signed-off-by: Lev Nachmanson <levnach@hotmail.com> call find_feasible_solution() after moving columns Signed-off-by: Lev Nachmanson <levnach@hotmail.com> alway move colums to bounds before gomory cut Signed-off-by: Lev Nachmanson <levnach@hotmail.com> merge from best branch Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
This commit is contained in:
parent
7e82ab595e
commit
c04bcb411d
13 changed files with 341 additions and 276 deletions
|
@ -42,7 +42,7 @@ Revision History:
|
|||
namespace smt {
|
||||
|
||||
struct theory_arith_stats {
|
||||
unsigned m_conflicts, m_add_rows, m_pivots, m_diseq_cs, m_gomory_cuts, m_branches, m_gcd_tests;
|
||||
unsigned m_conflicts, m_add_rows, m_pivots, m_diseq_cs, m_gomory_cuts, m_branches, m_gcd_tests, m_patches, m_patches_succ;
|
||||
unsigned m_assert_lower, m_assert_upper, m_assert_diseq, m_core2th_eqs, m_core2th_diseqs;
|
||||
unsigned m_th2core_eqs, m_th2core_diseqs, m_bound_props, m_offset_eqs, m_fixed_eqs, m_offline_eqs;
|
||||
unsigned m_max_min;
|
||||
|
|
|
@ -1335,7 +1335,7 @@ namespace smt {
|
|||
}
|
||||
}
|
||||
});
|
||||
|
||||
m_stats.m_patches++;
|
||||
patch_int_infeasible_vars();
|
||||
fix_non_base_vars();
|
||||
|
||||
|
@ -1368,6 +1368,7 @@ namespace smt {
|
|||
|
||||
theory_var int_var = find_infeasible_int_base_var();
|
||||
if (int_var == null_theory_var) {
|
||||
m_stats.m_patches_succ++;
|
||||
TRACE("arith_int_incomp", tout << "FC_DONE 2...\n"; display(tout););
|
||||
return m_liberal_final_check || !m_changed_assignment ? FC_DONE : FC_CONTINUE;
|
||||
}
|
||||
|
|
|
@ -38,6 +38,8 @@ namespace smt {
|
|||
st.update("arith gcd tests", m_stats.m_gcd_tests);
|
||||
st.update("arith ineq splits", m_stats.m_branches);
|
||||
st.update("arith gomory cuts", m_stats.m_gomory_cuts);
|
||||
st.update("arith patches", m_stats.m_patches);
|
||||
st.update("arith patches_succ", m_stats.m_patches_succ);
|
||||
st.update("arith max-min", m_stats.m_max_min);
|
||||
st.update("arith grobner", m_stats.m_gb_compute_basis);
|
||||
st.update("arith pseudo nonlinear", m_stats.m_nl_linear);
|
||||
|
|
|
@ -306,9 +306,11 @@ class theory_lra::imp {
|
|||
reset_variable_values();
|
||||
m_solver->settings().bound_propagation() = BP_NONE != propagation_mode();
|
||||
m_solver->set_track_pivoted_rows(lp.bprop_on_pivoted_rows());
|
||||
m_solver->settings().m_int_branch_cut_gomory_threshold = ctx().get_fparams().m_arith_branch_cut_ratio;
|
||||
m_solver->settings().m_int_branch_cut_solver = std::max(8u, ctx().get_fparams().m_arith_branch_cut_ratio);
|
||||
m_solver->settings().m_run_gcd_test = ctx().get_fparams().m_arith_gcd_test;
|
||||
m_solver->settings().m_int_gomory_cut_period = ctx().get_fparams().m_arith_branch_cut_ratio;
|
||||
m_solver->settings().m_int_cuts_etc_period = ctx().get_fparams().m_arith_branch_cut_ratio;
|
||||
m_solver->settings().m_int_cut_solver_period = std::max(8u, ctx().get_fparams().m_arith_branch_cut_ratio);
|
||||
m_solver->settings().m_int_run_gcd_test = ctx().get_fparams().m_arith_gcd_test;
|
||||
|
||||
m_solver->settings().set_random_seed(ctx().get_fparams().m_random_seed);
|
||||
//m_solver->settings().set_ostream(0);
|
||||
m_lia = alloc(lp::int_solver, m_solver.get());
|
||||
|
@ -1286,7 +1288,7 @@ public:
|
|||
lp::explanation ex; // TBD, this should be streamlined accross different explanations
|
||||
bool upper;
|
||||
switch(m_lia->check(term, k, ex, upper)) {
|
||||
case lp::lia_move::ok:
|
||||
case lp::lia_move::sat:
|
||||
return l_true;
|
||||
case lp::lia_move::branch: {
|
||||
app_ref b = mk_bound(term, k, !upper);
|
||||
|
@ -1321,8 +1323,8 @@ public:
|
|||
m_explanation = ex.m_explanation;
|
||||
set_conflict1();
|
||||
return l_false;
|
||||
case lp::lia_move::give_up:
|
||||
TRACE("arith", tout << "lia giveup\n";);
|
||||
case lp::lia_move::undef:
|
||||
TRACE("arith", tout << "lia undef\n";);
|
||||
return l_undef;
|
||||
default:
|
||||
UNREACHABLE();
|
||||
|
@ -2818,6 +2820,8 @@ public:
|
|||
st.update("gcd-conflict", m_solver->settings().st().m_gcd_conflicts);
|
||||
st.update("cube-calls", m_solver->settings().st().m_cube_calls);
|
||||
st.update("cube-success", m_solver->settings().st().m_cube_success);
|
||||
st.update("arith-patches", m_solver->settings().st().m_patches);
|
||||
st.update("arith-patches-success", m_solver->settings().st().m_patches_success);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue