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

make sure that the term external index has not been used

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
This commit is contained in:
Lev Nachmanson 2020-03-09 11:01:10 -07:00
parent f00c026272
commit 285ff9540d

View file

@ -2371,6 +2371,8 @@ std::pair<constraint_index, constraint_index> lar_solver::add_equality(lpvar j,
coeffs.push_back(std::make_pair(mpq(1),j));
coeffs.push_back(std::make_pair(mpq(-1),k));
unsigned ext_term_index = m_terms.size();
while (m_term_register.external_is_used(ext_term_index))
ext_term_index *= 2;
unsigned term_index = add_term(coeffs, ext_term_index);
return std::pair<constraint_index, constraint_index>(
add_var_bound(term_index, lconstraint_kind::LE, mpq(0)),