3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-10-06 16:01:55 +00:00

port improvements from ilana branch to master regarding nla

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2025-09-19 12:28:20 -07:00
parent 5d91294e90
commit 2517b5a40a
7 changed files with 73 additions and 61 deletions

View file

@ -103,6 +103,7 @@ struct statistics {
unsigned m_make_feasible = 0;
unsigned m_total_iterations = 0;
unsigned m_iters_with_no_cost_growing = 0;
unsigned m_num_factorizations = 0;
unsigned m_num_of_implied_bounds = 0;
unsigned m_need_to_solve_inf = 0;
unsigned m_max_cols = 0;
@ -136,47 +137,45 @@ struct statistics {
unsigned m_bounds_tightening_conflicts = 0;
unsigned m_bounds_tightenings = 0;
unsigned m_nla_throttled_lemmas = 0;
unsigned m_nla_bounds_lemmas = 0;
unsigned m_nla_bounds_propagations = 0;
::statistics m_st = {};
void reset() {
*this = statistics{};
}
void collect_statistics(::statistics& st) const {
st.update("arith-lp-make-feasible", m_make_feasible);
st.update("arith-lp-max-columns", m_max_cols);
st.update("arith-lp-max-rows", m_max_rows);
st.update("arith-lp-offset-eqs", m_offset_eqs);
st.update("arith-lp-fixed-eqs", m_fixed_eqs);
st.update("arith-lia-patches", m_patches);
st.update("arith-lia-patches-success", m_patches_success);
st.update("arith-lia-gcd-calls", m_gcd_calls);
st.update("arith-lia-gcd-conflict", m_gcd_conflicts);
st.update("arith-lia-cube-calls", m_cube_calls);
st.update("arith-lia-cube-success", m_cube_success);
st.update("arith-lia-hermite-calls", m_hnf_cutter_calls);
st.update("arith-lia-hermite-cuts", m_hnf_cuts);
st.update("arith-lia-gomory-cuts", m_gomory_cuts);
st.update("arith-lia-diophantine-calls", m_dio_calls);
st.update("arith-lia-diophantine-tighten-conflicts", m_dio_tighten_conflicts);
st.update("arith-lia-diophantine-rewrite-conflicts", m_dio_rewrite_conflicts);
st.update("arith-lia-bounds-tightening-conflicts", m_bounds_tightening_conflicts);
st.update("arith-lia-bounds-tightenings", m_bounds_tightenings);
st.update("arith-nla-horner-calls", m_horner_calls);
st.update("arith-nla-horner-conflicts", m_horner_conflicts);
st.update("arith-nla-horner-cross-nested-forms", m_cross_nested_forms);
st.update("arith-nla-grobner-calls", m_grobner_calls);
st.update("arith-nla-grobner-conflicts", m_grobner_conflicts);
st.update("arith-factorizations", m_num_factorizations);
st.update("arith-make-feasible", m_make_feasible);
st.update("arith-max-columns", m_max_cols);
st.update("arith-max-rows", m_max_rows);
st.update("arith-gcd-calls", m_gcd_calls);
st.update("arith-gcd-conflict", m_gcd_conflicts);
st.update("arith-cube-calls", m_cube_calls);
st.update("arith-cube-success", m_cube_success);
st.update("arith-patches", m_patches);
st.update("arith-patches-success", m_patches_success);
st.update("arith-hnf-calls", m_hnf_cutter_calls);
st.update("arith-hnf-cuts", m_hnf_cuts);
st.update("arith-gomory-cuts", m_gomory_cuts);
st.update("arith-horner-calls", m_horner_calls);
st.update("arith-horner-conflicts", m_horner_conflicts);
st.update("arith-horner-cross-nested-forms", m_cross_nested_forms);
st.update("arith-grobner-calls", m_grobner_calls);
st.update("arith-grobner-conflicts", m_grobner_conflicts);
st.update("arith-offset-eqs", m_offset_eqs);
st.update("arith-fixed-eqs", m_fixed_eqs);
st.update("arith-nla-add-bounds", m_nla_add_bounds);
st.update("arith-nla-propagate-bounds", m_nla_propagate_bounds);
st.update("arith-nla-propagate-eq", m_nla_propagate_eq);
st.update("arith-nla-lemmas", m_nla_lemmas);
st.update("arith-nla-nra-calls", m_nra_calls);
st.update("arith-nla-bounds-improvements", m_nla_bounds_improvements);
st.update("arith-nra-calls", m_nra_calls);
st.update("arith-bounds-improvements", m_nla_bounds_improvements);
st.update("arith-dio-calls", m_dio_calls);
st.update("arith-dio-tighten-conflicts", m_dio_tighten_conflicts);
st.update("arith-dio-rewrite-conflicts", m_dio_rewrite_conflicts);
st.update("arith-bounds-tightening-conflicts", m_bounds_tightening_conflicts);
st.update("arith-bounds-tightenings", m_bounds_tightenings);
st.update("arith-nla-throttled-lemmas", m_nla_throttled_lemmas);
st.update("arith-nla-bounds-lemmas", m_nla_bounds_lemmas);
st.update("artih-nla-bounds-propagations", m_nla_bounds_propagations);
st.copy(m_st);
}
};
@ -223,11 +222,13 @@ public:
unsigned percent_of_entering_to_check = 5; // we try to find a profitable column in a percentage of the columns
bool use_scaling = true;
unsigned max_number_of_iterations_with_no_improvements = 2000000;
double time_limit; // the maximum time limit of the total run time in seconds
double time_limit; // the maximum time limit of the total run time in seconds
// end of dual section
bool m_bound_propagation = true;
bool presolve_with_double_solver_for_lar = true;
simplex_strategy_enum m_simplex_strategy;
unsigned m_max_conflicts = 0;
int report_frequency = 1000;
bool print_statistics = false;