mirror of
https://github.com/Z3Prover/z3
synced 2026-06-09 02:20:57 +00:00
allow calling lp().restore_x() only in case the number of column in lp() remained the same: it might grow
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
This commit is contained in:
parent
4e5695eb53
commit
78fa6d5ee8
3 changed files with 8 additions and 5 deletions
|
|
@ -3988,6 +3988,7 @@ public:
|
|||
lp::impq term_max;
|
||||
lp::lp_status st;
|
||||
lpvar vi = 0;
|
||||
unsigned size_of_backup = lp().column_count();
|
||||
if (has_int()) {
|
||||
lp().backup_x();
|
||||
}
|
||||
|
|
@ -4008,7 +4009,8 @@ public:
|
|||
|
||||
if (has_int() && lp().has_inf_int()) {
|
||||
st = lp::lp_status::FEASIBLE;
|
||||
lp().restore_x();
|
||||
if (lp().column_count() == size_of_backup)
|
||||
lp().restore_x();
|
||||
}
|
||||
if (m_nla && (st == lp::lp_status::OPTIMAL || st == lp::lp_status::UNBOUNDED)) {
|
||||
switch (check_nla(level)) {
|
||||
|
|
@ -4020,7 +4022,8 @@ public:
|
|||
st = lp::lp_status::UNBOUNDED;
|
||||
break;
|
||||
}
|
||||
lp().restore_x();
|
||||
if (lp().column_count() == size_of_backup)
|
||||
lp().restore_x();
|
||||
}
|
||||
}
|
||||
switch (st) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue