3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-23 09:05:31 +00:00

fix bug in bound simplification in Gomory for mixed integer linear cuts, enable fixed variable redution after bugfix, add notes that rewriting bounds does not work

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2023-11-10 16:38:55 +01:00
parent aa9c7912dc
commit 3de5af3cb0
5 changed files with 121 additions and 261 deletions

View file

@ -1784,14 +1784,15 @@ public:
expr_ref atom(m);
t = coeffs2app(coeffs, rational::zero(), is_int);
if (lower_bound) {
if (lower_bound)
atom = a.mk_ge(t, a.mk_numeral(offset, is_int));
}
else {
atom = a.mk_le(t, a.mk_numeral(offset, is_int));
}
else
atom = a.mk_le(t, a.mk_numeral(offset, is_int));
// ctx().get_rewriter()(atom);
// Note: it is not safe to rewrite atom because the rewriter can
// destroy structure, such as (div x 24) >= 0 becomes x >= 0 and the internal variable
// corresponding to (div x 24) is not constrained.
TRACE("arith", tout << t << ": " << atom << "\n";
lp().print_term(term, tout << "bound atom: ") << (lower_bound?" >= ":" <= ") << k << "\n";);
ctx().internalize(atom, true);