3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-11-05 13:56:03 +00:00
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2020-03-15 12:45:16 -07:00 committed by Lev Nachmanson
parent e7960e63da
commit b41b83cd63
5 changed files with 8 additions and 4 deletions

View file

@ -3120,7 +3120,7 @@ public:
void fixed_var_eh(theory_var v1, rational const& bound) {
theory_var v2;
value_sort_pair key(bound, is_int(v1));
if (m_fixed_var_table.find(key, v2)) {
if (m_fixed_var_table.find(key, v2) && is_int(v1) == is_int(v2)) {
if (static_cast<unsigned>(v2) < th.get_num_vars() && !is_equal(v1, v2)) {
auto vi1 = register_theory_var_in_lar_solver(v1);
auto vi2 = register_theory_var_in_lar_solver(v2);
@ -3377,7 +3377,7 @@ public:
}
else {
rational r = get_value(v);
TRACE("arith", tout << "v" << v << " := " << r << "\n";);
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.canceled()));
if (a.is_int(o) && !r.is_int()) r = floor(r);
return alloc(expr_wrapper_proc, m_factory->mk_value(r, m.get_sort(o)));