3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-16 13:58:45 +00:00

avoid the state change in an assert statement

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
This commit is contained in:
Lev Nachmanson 2019-12-31 14:03:48 -08:00
parent ef39c4b533
commit c3ed06915c
2 changed files with 8 additions and 1 deletions

View file

@ -857,7 +857,7 @@ void lar_solver::solve_with_core_solver() {
update_x_and_inf_costs_for_columns_with_changed_bounds();
m_mpq_lar_core_solver.solve();
set_status(m_mpq_lar_core_solver.m_r_solver.get_status());
lp_assert((m_settings.random_next() % 100) != 0 || m_status != lp_status::OPTIMAL || all_constraints_hold());
lp_assert((((m_settings.m_counter_for_debug++) % 100) != 0) || m_status != lp_status::OPTIMAL || all_constraints_hold());
}

View file

@ -198,6 +198,9 @@ public:
unsigned limit_on_rows_for_hnf_cutter;
unsigned limit_on_columns_for_hnf_cutter;
bool m_enable_hnf;
#ifdef Z3DEBUG
unsigned m_counter_for_debug;
#endif
unsigned hnf_cut_period() const { return m_hnf_cut_period; }
@ -266,6 +269,10 @@ public:
limit_on_rows_for_hnf_cutter(75),
limit_on_columns_for_hnf_cutter(150),
m_enable_hnf(true)
#ifdef Z3DEBUG
, m_counter_for_debug(0)
#endif
{}
void set_resource_limit(lp_resource_limit& lim) { m_resource_limit = &lim; }