mirror of
https://github.com/Z3Prover/z3
synced 2025-04-12 20:18:18 +00:00
ensure bounds propagation on changed columns after nla propagation
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
7de06c4350
commit
00ba064cd3
|
@ -1067,6 +1067,8 @@ namespace lp {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool lar_solver::init_model() const {
|
bool lar_solver::init_model() const {
|
||||||
|
CTRACE("lar_solver_model",!m_columns_with_changed_bounds.empty(), tout << "non-empty changed bounds\n");
|
||||||
|
TRACE("lar_solver_model", tout << get_status() << "\n");
|
||||||
if (get_status() != lp_status::OPTIMAL && get_status() != lp_status::FEASIBLE)
|
if (get_status() != lp_status::OPTIMAL && get_status() != lp_status::FEASIBLE)
|
||||||
return false;
|
return false;
|
||||||
if (!m_columns_with_changed_bounds.empty())
|
if (!m_columns_with_changed_bounds.empty())
|
||||||
|
|
|
@ -2117,6 +2117,7 @@ public:
|
||||||
propagate_nla();
|
propagate_nla();
|
||||||
if (!can_propagate_core())
|
if (!can_propagate_core())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
m_new_def = false;
|
m_new_def = false;
|
||||||
while (m_asserted_qhead < m_asserted_atoms.size() && !ctx().inconsistent() && m.inc()) {
|
while (m_asserted_qhead < m_asserted_atoms.size() && !ctx().inconsistent() && m.inc()) {
|
||||||
auto [bv, is_true] = m_asserted_atoms[m_asserted_qhead];
|
auto [bv, is_true] = m_asserted_atoms[m_asserted_qhead];
|
||||||
|
@ -2160,6 +2161,7 @@ public:
|
||||||
m_nla->propagate();
|
m_nla->propagate();
|
||||||
add_lemmas();
|
add_lemmas();
|
||||||
add_equalities();
|
add_equalities();
|
||||||
|
propagate_bounds_with_lp_solver();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2210,9 +2212,6 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
void propagate_bounds_with_lp_solver() {
|
void propagate_bounds_with_lp_solver() {
|
||||||
if (!should_propagate())
|
|
||||||
return;
|
|
||||||
|
|
||||||
m_bp.init();
|
m_bp.init();
|
||||||
lp().propagate_bounds_for_touched_rows(m_bp);
|
lp().propagate_bounds_for_touched_rows(m_bp);
|
||||||
|
|
||||||
|
@ -2224,13 +2223,11 @@ public:
|
||||||
// verbose_stream() << "unsat\n";
|
// verbose_stream() << "unsat\n";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
unsigned count = 0, prop = 0;
|
|
||||||
for (auto& ib : m_bp.ibounds()) {
|
for (auto& ib : m_bp.ibounds()) {
|
||||||
m.inc();
|
m.inc();
|
||||||
if (ctx().inconsistent())
|
if (ctx().inconsistent())
|
||||||
break;
|
break;
|
||||||
++prop;
|
propagate_lp_solver_bound(ib);
|
||||||
count += propagate_lp_solver_bound(ib);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue