3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-08 10:25:18 +00:00

update test in qe_arith

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2013-09-12 13:32:35 -07:00
parent 196aed785e
commit 1741671a9c

View file

@ -168,7 +168,7 @@ namespace qe {
unsigned find_max(model& mdl, bool do_pos) {
unsigned result;
bool found = false;
rational found_val(0), r;
rational found_val(0), r, found_c;
expr_ref val(m);
for (unsigned i = 0; i < m_ineq_terms.size(); ++i) {
rational const& ac = m_ineq_coeffs[i];
@ -180,11 +180,15 @@ namespace qe {
if (!found || r > found_val) {
result = i;
found_val = r;
found_c = ac;
found = true;
}
}
}
SASSERT(found);
if (a.is_int(m_var->x()) && !found_c.is_one()) {
throw cant_project();
}
return result;
}