3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-04-02 18:08:57 +00:00

simplify max_result in theory_lra.cpp and remove extra blank lines in lar_solver.cpp

Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2026-03-12 16:30:18 +00:00
parent 854031da26
commit a904f2bb22
2 changed files with 9 additions and 16 deletions

View file

@ -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;

View file

@ -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) {