@@ -1247,6 +1247,7 @@ namespace lp {
1247
1247
[k](const auto & c) {
1248
1248
return c.var () == k;
1249
1249
});
1250
+ SASSERT (it != e_row.end ());
1250
1251
const mpq& k_coeff_in_e = it->coeff ();
1251
1252
bool is_one = k_coeff_in_e.is_one ();
1252
1253
SASSERT (is_one || k_coeff_in_e.is_minus_one ());
@@ -1281,24 +1282,20 @@ namespace lp {
1281
1282
lia_move subs_front_with_S_and_fresh (protected_queue& q, unsigned j) {
1282
1283
process_fixed_in_espace ();
1283
1284
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;
1285
1287
unsigned k = q.pop_front ();
1286
1288
if (!m_espace.has (k))
1287
1289
return lia_move::undef;
1288
1290
// we might substitute with a term from S or a fresh term
1289
1291
1290
1292
SASSERT (can_substitute (k));
1291
1293
lia_move ret;
1292
- if (is_substituted_by_fresh (k)) {
1294
+ if (is_substituted_by_fresh (k))
1293
1295
ret = subs_qfront_by_fresh (k, q, j);
1294
- }
1295
- else {
1296
+ else
1296
1297
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);
1302
1299
}
1303
1300
1304
1301
lar_term l_term_from_row (unsigned k) const {
@@ -1369,11 +1366,9 @@ namespace lp {
1369
1366
1370
1367
lia_move subs_with_S_and_fresh (protected_queue& q, unsigned j) {
1371
1368
lia_move r = lia_move::undef;
1372
- while (!q.empty ()) {
1369
+ while (!q.empty () && r != lia_move::conflict ) {
1373
1370
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);
1377
1372
}
1378
1373
return r;
1379
1374
}
@@ -1423,15 +1418,10 @@ namespace lp {
1423
1418
);
1424
1419
for (unsigned j : sorted_changed_terms) {
1425
1420
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)
1429
1424
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;
1435
1425
}
1436
1426
for (unsigned j : processed_terms)
1437
1427
m_terms_to_tighten.remove (j);
@@ -1783,14 +1773,13 @@ namespace lp {
1783
1773
lia_move r;
1784
1774
do {
1785
1775
r = rewrite_eqs (f_vector);
1786
- if (lra.settings ().get_cancel_flag ()) {
1776
+ if (lra.settings ().get_cancel_flag ())
1787
1777
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)
1790
1779
break ;
1791
- }
1792
1780
SASSERT (m_changed_columns.size () == 0 );
1793
- } while (f_vector.size ());
1781
+ }
1782
+ while (f_vector.size ());
1794
1783
1795
1784
if (r == lia_move::conflict) {
1796
1785
if (m_conflict_index != UINT_MAX) {
0 commit comments