@@ -1247,6 +1247,7 @@ namespace lp {
12471247 [k](const auto & c) {
12481248 return c.var () == k;
12491249 });
1250+ SASSERT (it != e_row.end ());
12501251 const mpq& k_coeff_in_e = it->coeff ();
12511252 bool is_one = k_coeff_in_e.is_one ();
12521253 SASSERT (is_one || k_coeff_in_e.is_minus_one ());
@@ -1281,24 +1282,20 @@ namespace lp {
12811282 lia_move subs_front_with_S_and_fresh (protected_queue& q, unsigned j) {
12821283 process_fixed_in_espace ();
12831284 auto r = tighten_on_espace (j);
1284- if (r == lia_move::conflict) return lia_move::conflict;
1285+ if (r == lia_move::conflict)
1286+ return lia_move::conflict;
12851287 unsigned k = q.pop_front ();
12861288 if (!m_espace.has (k))
12871289 return lia_move::undef;
12881290 // we might substitute with a term from S or a fresh term
12891291
12901292 SASSERT (can_substitute (k));
12911293 lia_move ret;
1292- if (is_substituted_by_fresh (k)) {
1294+ if (is_substituted_by_fresh (k))
12931295 ret = subs_qfront_by_fresh (k, q, j);
1294- }
1295- else {
1296+ else
12961297 ret = subs_qfront_by_S (k, q, j);
1297- }
1298- if (ret == lia_move::conflict)
1299- return lia_move::conflict;
1300- if (r == lia_move::continue_with_check) return r;
1301- return ret;
1298+ return join (ret, r);
13021299 }
13031300
13041301 lar_term l_term_from_row (unsigned k) const {
@@ -1369,11 +1366,9 @@ namespace lp {
13691366
13701367 lia_move subs_with_S_and_fresh (protected_queue& q, unsigned j) {
13711368 lia_move r = lia_move::undef;
1372- while (!q.empty ()) {
1369+ while (!q.empty () && r != lia_move::conflict ) {
13731370 lia_move ret = subs_front_with_S_and_fresh (q, j);
1374- if (ret == lia_move::conflict) return lia_move::conflict;
1375- if (ret == lia_move::continue_with_check)
1376- r = ret;
1371+ r = join (ret, r);
13771372 }
13781373 return r;
13791374 }
@@ -1423,15 +1418,10 @@ namespace lp {
14231418 );
14241419 for (unsigned j : sorted_changed_terms) {
14251420 m_terms_to_tighten.remove (j);
1426- auto r0 = tighten_bounds_for_term_column (j);
1427- if (r0 == lia_move::conflict) {
1428- r = r0;
1421+ auto ret = tighten_bounds_for_term_column (j);
1422+ r = join (ret, r);
1423+ if ( r == lia_move::conflict)
14291424 break ;
1430- }
1431- else if (r0 == lia_move::continue_with_check)
1432- r = r0;
1433- else if (r0 == lia_move::branch && r == lia_move::undef)
1434- r = r0;
14351425 }
14361426 for (unsigned j : processed_terms)
14371427 m_terms_to_tighten.remove (j);
@@ -1783,14 +1773,13 @@ namespace lp {
17831773 lia_move r;
17841774 do {
17851775 r = rewrite_eqs (f_vector);
1786- if (lra.settings ().get_cancel_flag ()) {
1776+ if (lra.settings ().get_cancel_flag ())
17871777 return lia_move::undef;
1788- }
1789- if (r == lia_move::conflict || r == lia_move::undef) {
1778+ if (r == lia_move::conflict || r == lia_move::undef)
17901779 break ;
1791- }
17921780 SASSERT (m_changed_columns.size () == 0 );
1793- } while (f_vector.size ());
1781+ }
1782+ while (f_vector.size ());
17941783
17951784 if (r == lia_move::conflict) {
17961785 if (m_conflict_index != UINT_MAX) {
0 commit comments