3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-28 03:15:50 +00:00

before getting explanations for monomials upper and low bounds

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
This commit is contained in:
Lev Nachmanson 2019-06-06 16:13:49 -07:00
parent 02133bbcc5
commit 6a6cb3822c
5 changed files with 26 additions and 28 deletions

View file

@ -114,4 +114,28 @@ void lp_bound_propagator::try_add_bound(mpq v, unsigned j, bool is_low, bool co
}
}
}
void lp_bound_propagator::explain_implied_bound(implied_bound & ib) {
unsigned i = ib.m_row_or_term_index;
int bound_sign = ib.m_is_lower_bound? 1: -1;
int j_sign = (ib.m_coeff_before_j_is_pos ? 1 :-1) * bound_sign;
unsigned bound_j = ib.m_j;
if (m_lar_solver.is_term(bound_j)) {
bound_j = m_lar_solver.m_var_register.external_to_local(bound_j);
}
for (auto const& r : m_lar_solver.A_r().m_rows[i]) {
unsigned j = r.var();
if (j == bound_j) continue;
mpq const& a = r.get_val();
int a_sign = is_pos(a)? 1: -1;
int sign = j_sign * a_sign;
const ul_pair & ul = m_lar_solver.m_columns_to_ul_pairs[j];
// todo : process witnesses from monomials!!!!!!!!!!!!!!!!!!!!!
auto witness = sign > 0? ul.upper_bound_witness(): ul.lower_bound_witness();
lp_assert(is_valid(witness));
consume(a, witness);
}
// lp_assert(implied_bound_is_correctly_explained(ib, explanation));
}
}