Skip to content

Commit

Permalink
fix #5663
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolajBjorner committed Nov 12, 2021
1 parent 3c16edc commit b6f7dea
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
9 changes: 3 additions & 6 deletions src/opt/optsmt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -305,11 +305,9 @@ namespace opt {
expr_ref fml(m), bound(m.mk_true(), m), tmp(m);
expr* vars[1];
{
for (unsigned i = 0; i < m_upper.size(); ++i) {
for (unsigned i = 0; i < m_upper.size(); ++i)
ors.push_back(m_s->mk_ge(i, m_upper[i]));
}



fml = mk_or(ors);
tmp = m.mk_fresh_const("b", m.mk_bool_sort());
fml = m.mk_implies(tmp, fml);
Expand All @@ -328,8 +326,7 @@ namespace opt {
m_s->get_model(m_model);
m_s->get_labels(m_labels);
for (unsigned i = 0; i < ors.size(); ++i) {
expr_ref tmp(m);
if (m_model->is_true(ors[i].get())) {
if (m_model->is_true(ors.get(i))) {
m_lower[i] = m_upper[i];
ors[i] = m.mk_false();
disj[i] = m.mk_false();
Expand Down
5 changes: 4 additions & 1 deletion src/smt/theory_lra.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3477,7 +3477,10 @@ class theory_lra::imp {
st = lp::lp_status::FEASIBLE;
lp().restore_x();
}

if (m_nla && st == lp::lp_status::OPTIMAL) {
st = lp::lp_status::FEASIBLE;
lp().restore_x();
}
}
switch (st) {
case lp::lp_status::OPTIMAL: {
Expand Down

0 comments on commit b6f7dea

Please sign in to comment.