mirror of
https://github.com/Z3Prover/z3
synced 2025-04-12 20:18:18 +00:00
persist dio handler
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
This commit is contained in:
parent
2c8a6f83e4
commit
deac00ada3
|
@ -236,9 +236,8 @@ namespace lp {
|
||||||
std_vector<unsigned> m_fresh_definitions; // seems only needed in the debug
|
std_vector<unsigned> m_fresh_definitions; // seems only needed in the debug
|
||||||
// version in remove_fresh_vars
|
// version in remove_fresh_vars
|
||||||
|
|
||||||
unsigned m_conflict_index =
|
unsigned m_conflict_index = -1; // m_entries[m_conflict_index] gives the conflict
|
||||||
-1; // m_entries[m_conflict_index] gives the conflict
|
unsigned m_max_number_of_iterations = 100;
|
||||||
unsigned m_max_number_of_iterations = 1000;
|
|
||||||
unsigned m_number_of_iterations;
|
unsigned m_number_of_iterations;
|
||||||
struct branch {
|
struct branch {
|
||||||
unsigned m_j = UINT_MAX;
|
unsigned m_j = UINT_MAX;
|
||||||
|
@ -355,6 +354,8 @@ namespace lp {
|
||||||
m_entries.clear();
|
m_entries.clear();
|
||||||
m_var_register.clear();
|
m_var_register.clear();
|
||||||
m_number_of_iterations = 0;
|
m_number_of_iterations = 0;
|
||||||
|
m_branch_stack.clear();
|
||||||
|
m_lra_level = 0;
|
||||||
for (unsigned j = 0; j < lra.column_count(); j++) {
|
for (unsigned j = 0; j < lra.column_count(); j++) {
|
||||||
if (!lra.column_is_int(j) || !lra.column_has_term(j))
|
if (!lra.column_is_int(j) || !lra.column_has_term(j))
|
||||||
continue;
|
continue;
|
||||||
|
@ -1103,6 +1104,8 @@ namespace lp {
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
SASSERT(ret == lia_move::undef);
|
SASSERT(ret == lia_move::undef);
|
||||||
|
m_max_number_of_iterations = std::max((unsigned)5, (unsigned)m_max_number_of_iterations/2);
|
||||||
|
|
||||||
return lia_move::undef;
|
return lia_move::undef;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -34,6 +34,7 @@ namespace lp {
|
||||||
int_solver& lia;
|
int_solver& lia;
|
||||||
lar_solver& lra;
|
lar_solver& lra;
|
||||||
lar_core_solver& lrac;
|
lar_core_solver& lrac;
|
||||||
|
dioph_eq m_dio;
|
||||||
unsigned m_number_of_calls = 0;
|
unsigned m_number_of_calls = 0;
|
||||||
lar_term m_t; // the term to return in the cut
|
lar_term m_t; // the term to return in the cut
|
||||||
bool m_upper; // cut is an upper bound
|
bool m_upper; // cut is an upper bound
|
||||||
|
@ -48,7 +49,7 @@ namespace lp {
|
||||||
return lra.column_is_int(j) && (!lia.value_is_int(j));
|
return lra.column_is_int(j) && (!lia.value_is_int(j));
|
||||||
}
|
}
|
||||||
|
|
||||||
imp(int_solver& lia): lia(lia), lra(lia.lra), lrac(lia.lrac), m_hnf_cutter(lia), m_gcd(lia) {
|
imp(int_solver& lia): lia(lia), lra(lia.lra), lrac(lia.lrac), m_hnf_cutter(lia), m_gcd(lia), m_dio(lia) {
|
||||||
m_hnf_cut_period = settings().hnf_cut_period();
|
m_hnf_cut_period = settings().hnf_cut_period();
|
||||||
m_dioph_eq_period = settings().m_dioph_eq_period;
|
m_dioph_eq_period = settings().m_dioph_eq_period;
|
||||||
}
|
}
|
||||||
|
@ -169,11 +170,10 @@ namespace lp {
|
||||||
}
|
}
|
||||||
|
|
||||||
lia_move solve_dioph_eq() {
|
lia_move solve_dioph_eq() {
|
||||||
dioph_eq de(lia);
|
lia_move r = m_dio.check();
|
||||||
lia_move r = de.check();
|
|
||||||
|
|
||||||
if (r == lia_move::conflict) {
|
if (r == lia_move::conflict) {
|
||||||
de.explain(*this->m_ex);
|
m_dio.explain(*this->m_ex);
|
||||||
m_dioph_eq_period = settings().m_dioph_eq_period;
|
m_dioph_eq_period = settings().m_dioph_eq_period;
|
||||||
return lia_move::conflict;
|
return lia_move::conflict;
|
||||||
} else if (r == lia_move::branch) {
|
} else if (r == lia_move::branch) {
|
||||||
|
|
Loading…
Reference in a new issue