3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-23 17:15:31 +00:00

replace lp_assert(false) with UNREACHABLE

This commit is contained in:
Lev Nachmanson 2023-03-08 09:27:09 -08:00
parent 3efe91c3e3
commit 8b0aa22631
23 changed files with 654 additions and 891 deletions

View file

@ -130,7 +130,7 @@ struct gomory_test {
void report_conflict_from_gomory_cut(mpq &k) {
lp_assert(false);
UNREACHABLE();
}
void adjust_term_and_k_for_some_ints_case_gomory(lar_term& t, mpq& k, mpq &lcm_den) {

View file

@ -1365,7 +1365,7 @@ void test_gomory_cut_0() {
if (j == 2)
return zero_of_type<mpq>();
if (j == 3) return mpq(3);
lp_assert(false);
UNREACHABLE();
return zero_of_type<mpq>();
},
[](unsigned j) { // at_low_p
@ -1375,7 +1375,7 @@ void test_gomory_cut_0() {
return true;
if (j == 3)
return true;
lp_assert(false);
UNREACHABLE();
return false;
},
[](unsigned j) { // at_upper
@ -1385,31 +1385,31 @@ void test_gomory_cut_0() {
return true;
if (j == 3)
return false;
lp_assert(false);
UNREACHABLE();
return false;
},
[](unsigned j) { // lower_bound
if (j == 1) {
lp_assert(false); //unlimited from below
UNREACHABLE(); //unlimited from below
return impq(0);
}
if (j == 2)
return impq(0);
if (j == 3)
return impq(3);
lp_assert(false);
UNREACHABLE();
return impq(0);
},
[](unsigned j) { // upper
if (j == 1) {
lp_assert(false); //unlimited from above
UNREACHABLE(); //unlimited from above
return impq(0);
}
if (j == 2)
return impq(0);
if (j == 3)
return impq(10);
lp_assert(false);
UNREACHABLE();
return impq(0);
},
[] (unsigned) { return 0; },
@ -1437,7 +1437,7 @@ void test_gomory_cut_1() {
return mpq(4363334, 2730001);
if (j == 3)
return mpq(1);
lp_assert(false);
UNREACHABLE();
return zero_of_type<mpq>();
},
[](unsigned j) { // at_low_p
@ -1447,7 +1447,7 @@ void test_gomory_cut_1() {
return false;
if (j == 3)
return true;
lp_assert(false);
UNREACHABLE();
return false;
},
[](unsigned j) { // at_upper
@ -1457,19 +1457,19 @@ void test_gomory_cut_1() {
return false;
if (j == 3)
return true;
lp_assert(false);
UNREACHABLE();
return false;
},
[](unsigned j) { // lower_bound
if (j == 1) {
lp_assert(false); //unlimited from below
UNREACHABLE(); //unlimited from below
return impq(0);
}
if (j == 2)
return impq(1);
if (j == 3)
return impq(1);
lp_assert(false);
UNREACHABLE();
return impq(0);
},
[](unsigned j) { // upper
@ -1480,7 +1480,7 @@ void test_gomory_cut_1() {
return impq(3333);
if (j == 3)
return impq(10000);
lp_assert(false);
UNREACHABLE();
return impq(0);
},
[] (unsigned) { return 0; },

View file

@ -272,7 +272,7 @@ namespace lp {
} else if (el.m_head == "+") {
add_sum(c, el.m_elems);
} else {
lp_assert(false); // unexpected input
UNREACHABLE(); // unexpected input
}
}