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

update arithmetic contract for unbounded (#5696)

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2021-12-06 08:19:18 -08:00 committed by GitHub
parent 9b4f3a7075
commit fdc253afdd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View file

@ -986,7 +986,7 @@ namespace arith {
IF_VERBOSE(12, verbose_stream() << "final-check " << lp().get_status() << "\n"); IF_VERBOSE(12, verbose_stream() << "final-check " << lp().get_status() << "\n");
SASSERT(lp().ax_is_correct()); SASSERT(lp().ax_is_correct());
if (lp().get_status() != lp::lp_status::OPTIMAL || lp().has_changed_columns()) { if (!lp().is_feasible() || lp().has_changed_columns()) {
switch (make_feasible()) { switch (make_feasible()) {
case l_false: case l_false:
get_infeasibility_explanation_and_set_conflict(); get_infeasibility_explanation_and_set_conflict();
@ -1097,6 +1097,8 @@ namespace arith {
return l_false; return l_false;
case lp::lp_status::FEASIBLE: case lp::lp_status::FEASIBLE:
case lp::lp_status::OPTIMAL: case lp::lp_status::OPTIMAL:
case lp::lp_status::UNBOUNDED:
SASSERT(!lp().has_changed_columns());
return l_true; return l_true;
case lp::lp_status::TIME_EXHAUSTED: case lp::lp_status::TIME_EXHAUSTED:
default: default:

View file

@ -3460,7 +3460,7 @@ public:
st = lp::lp_status::UNBOUNDED; st = lp::lp_status::UNBOUNDED;
} }
else { else {
if (!lp().is_feasible() || lp().has_changed_columns()) if (!lp().is_feasible() || lp().has_changed_columns())
make_feasible(); make_feasible();
vi = get_lpvar(v); vi = get_lpvar(v);