mirror of
https://github.com/Z3Prover/z3
synced 2025-06-29 17:38:45 +00:00
fix bugs exposed in #677. to_int(x) has the semantics that to_int(x) <= x, and to_int(x) is the largest integer satisfying this inequality. The encoding in purify_arith had it the other way x <= to_int(x) contrary to how to_int(x) is handled elsewhere. Another bug in theory_arith for mixed-integer linear case was also exposed. Fractional bounds on expressions of the form to_int(x), and more generally on integer rows were not rounded prior to internalization
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
63f89f8c45
commit
3989d238c0
8 changed files with 78 additions and 40 deletions
|
@ -1267,11 +1267,11 @@ namespace smt {
|
|||
final_check_status theory_arith<Ext>::check_int_feasibility() {
|
||||
TRACE("arith_int_detail", get_context().display(tout););
|
||||
if (!has_infeasible_int_var()) {
|
||||
TRACE("arith_int_incomp", tout << "FC_DONE 1...\n"; display(tout););
|
||||
TRACE("arith", tout << "FC_DONE 1...\n"; display(tout););
|
||||
return FC_DONE;
|
||||
}
|
||||
|
||||
TRACE("arith_int_fracs",
|
||||
TRACE("arith",
|
||||
int num = get_num_vars();
|
||||
for (theory_var v = 0; v < num; v++) {
|
||||
if (is_int(v) && !get_value(v).is_int()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue