mirror of
https://github.com/Z3Prover/z3
synced 2026-04-26 13:53:33 +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:
parent
854031da26
commit
a904f2bb22
2 changed files with 9 additions and 16 deletions
|
|
@ -467,8 +467,6 @@ namespace lp {
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
lp_status lar_solver::solve() {
|
lp_status lar_solver::solve() {
|
||||||
if (m_imp->m_status == lp_status::INFEASIBLE || m_imp->m_status == lp_status::CANCELLED)
|
if (m_imp->m_status == lp_status::INFEASIBLE || m_imp->m_status == lp_status::CANCELLED)
|
||||||
return m_imp->m_status;
|
return m_imp->m_status;
|
||||||
|
|
|
||||||
|
|
@ -4038,24 +4038,19 @@ public:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
theory_lra::inf_eps max_result(theory_var v, lpvar vi, lp::lp_status st, expr_ref& blocker, bool& has_shared) {
|
theory_lra::inf_eps max_result(theory_var v, lpvar vi, lp::lp_status st,
|
||||||
switch (st) {
|
expr_ref& blocker, bool& has_shared) {
|
||||||
case lp::lp_status::OPTIMAL:
|
if (st == lp::lp_status::OPTIMAL)
|
||||||
init_variable_values();
|
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);
|
blocker = mk_gt(v);
|
||||||
return value(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) {
|
theory_lra::inf_eps maximize(theory_var v, expr_ref& blocker, bool& has_shared) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue