diff --git a/src/math/lp/lar_solver.cpp b/src/math/lp/lar_solver.cpp index 6e689c004..d6b8b0823 100644 --- a/src/math/lp/lar_solver.cpp +++ b/src/math/lp/lar_solver.cpp @@ -467,8 +467,6 @@ namespace lp { return ret; } - - lp_status lar_solver::solve() { if (m_imp->m_status == lp_status::INFEASIBLE || m_imp->m_status == lp_status::CANCELLED) return m_imp->m_status; diff --git a/src/smt/theory_lra.cpp b/src/smt/theory_lra.cpp index 72bf7354a..92950b192 100644 --- a/src/smt/theory_lra.cpp +++ b/src/smt/theory_lra.cpp @@ -4038,24 +4038,19 @@ public: return false; } - theory_lra::inf_eps max_result(theory_var v, lpvar vi, lp::lp_status st, expr_ref& blocker, bool& has_shared) { - switch (st) { - case lp::lp_status::OPTIMAL: + theory_lra::inf_eps max_result(theory_var v, lpvar vi, lp::lp_status st, + expr_ref& blocker, bool& has_shared) { + if (st == lp::lp_status::OPTIMAL) init_variable_values(); - TRACE(arith, display(tout << st << " v" << v << " vi: " << vi << "\n");); + TRACE(arith, display(tout << st << " v" << v << " vi: " << vi << "\n");); + if (st != lp::lp_status::UNBOUNDED) { blocker = mk_gt(v); return value(v); - case lp::lp_status::FEASIBLE: - TRACE(arith, display(tout << st << " v" << v << " vi: " << vi << "\n");); - blocker = mk_gt(v); - return value(v); - default: - SASSERT(st == lp::lp_status::UNBOUNDED); - TRACE(arith, display(tout << st << " v" << v << " vi: " << vi << "\n");); - has_shared = false; - blocker = m.mk_false(); - return inf_eps(rational::one(), inf_rational()); } + SASSERT(st == lp::lp_status::UNBOUNDED); + has_shared = false; + blocker = m.mk_false(); + return inf_eps(rational::one(), inf_rational()); } theory_lra::inf_eps maximize(theory_var v, expr_ref& blocker, bool& has_shared) {