mirror of
https://github.com/Z3Prover/z3
synced 2026-04-07 05:02:48 +00:00
Fix LP solver pop invalidation: clear changed bounds on pop, guard mk_value
Agent-Logs-Url: https://github.com/Z3Prover/z3/sessions/c9284821-5ce7-42c8-a4cc-f2a1aa582115 Co-authored-by: levnach <5377127+levnach@users.noreply.github.com>
This commit is contained in:
parent
0cd17f4194
commit
260cf5c357
2 changed files with 4 additions and 1 deletions
|
|
@ -593,6 +593,9 @@ namespace lp {
|
|||
m_imp->m_dependencies.pop_scope(k);
|
||||
// init the nbasis sorting
|
||||
m_imp->require_nbasis_sort();
|
||||
// bounds were restored by the trail; any entries in m_columns_with_changed_bounds
|
||||
// are stale and must be cleared so init_model/get_value see a clean slate
|
||||
clear_columns_with_changed_bounds();
|
||||
set_status(lp_status::UNKNOWN);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3702,7 +3702,7 @@ public:
|
|||
return alloc(expr_wrapper_proc, a.mk_numeral(m_nla->am(), nl_value(v, m_nla->tmp1()), a.is_int(o)));
|
||||
}
|
||||
else {
|
||||
rational r = get_value(v);
|
||||
rational r = can_get_value(v) ? get_value(v) : rational::zero();
|
||||
TRACE(arith, tout << mk_pp(o, m) << " v" << v << " := " << r << "\n";);
|
||||
SASSERT("integer variables should have integer values: " && (!a.is_int(o) || r.is_int() || m.limit().is_canceled()));
|
||||
if (a.is_int(o) && !r.is_int()) r = floor(r);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue