diff --git a/src/sat/sat_types.h b/src/sat/sat_types.h index d15aba793..002e49006 100644 --- a/src/sat/sat_types.h +++ b/src/sat/sat_types.h @@ -25,6 +25,7 @@ Revision History: #include "util/z3_exception.h" #include "util/common_msgs.h" #include "util/vector.h" +#include "util/uint_set.h" #include namespace sat { diff --git a/src/smt/theory_lra.cpp b/src/smt/theory_lra.cpp index 03431c8b7..d9f95313a 100644 --- a/src/smt/theory_lra.cpp +++ b/src/smt/theory_lra.cpp @@ -36,7 +36,7 @@ #include "smt/arith_eq_adapter.h" #include "util/nat_set.h" #include "util/lp/nra_solver.h" -#include "tactic/filter_model_converter.h" +#include "tactic/generic_model_converter.h" #include "math/polynomial/algebraic_numbers.h" #include "math/polynomial/polynomial.h" #include "ast/ast_pp.h" @@ -2770,7 +2770,7 @@ public: } } - expr_ref mk_ge(filter_model_converter& fm, theory_var v, inf_rational const& val) { + expr_ref mk_ge(generic_model_converter& fm, theory_var v, inf_rational const& val) { rational r = val.get_rational(); bool is_strict = val.get_infinitesimal().is_pos(); app_ref b(m); @@ -2782,7 +2782,7 @@ public: b = a.mk_ge(mk_obj(v), a.mk_numeral(r, is_int)); } if (!ctx().b_internalized(b)) { - fm.insert(b->get_decl()); + fm.hide(b->get_decl()); bool_var bv = ctx().mk_bool_var(b); ctx().set_var_theory(bv, get_id()); // ctx().set_enode_flag(bv, true); @@ -2983,7 +2983,7 @@ theory_lra::inf_eps theory_lra::maximize(theory_var v, expr_ref& blocker, bool& theory_var theory_lra::add_objective(app* term) { return m_imp->add_objective(term); } -expr_ref theory_lra::mk_ge(filter_model_converter& fm, theory_var v, inf_rational const& val) { +expr_ref theory_lra::mk_ge(generic_model_converter& fm, theory_var v, inf_rational const& val) { return m_imp->mk_ge(fm, v, val); } diff --git a/src/util/lp/int_solver.cpp b/src/util/lp/int_solver.cpp index 3f69e616b..0691b5887 100644 --- a/src/util/lp/int_solver.cpp +++ b/src/util/lp/int_solver.cpp @@ -12,12 +12,13 @@ namespace lp { void int_solver::trace_inf_rows() const { - unsigned num = m_lar_solver->A_r().column_count(); - for (unsigned v = 0; v < num; v++) { - if (is_int(v) && !get_value(v).is_int()) { - display_column(tout, v); - } - } + TRACE("arith_int_rows", + unsigned num = m_lar_solver->A_r().column_count(); + for (unsigned v = 0; v < num; v++) { + if (is_int(v) && !get_value(v).is_int()) { + display_column(tout, v); + } + } num = 0; for (unsigned i = 0; i < m_lar_solver->A_r().row_count(); i++) { diff --git a/src/util/lp/lar_solver.cpp b/src/util/lp/lar_solver.cpp index 9bcbba146..b5eb5af8b 100644 --- a/src/util/lp/lar_solver.cpp +++ b/src/util/lp/lar_solver.cpp @@ -217,7 +217,7 @@ void lar_solver::explain_implied_bound(implied_bound & ib, bound_propagator & bp } for (auto const& r : A_r().m_rows[i]) { unsigned j = r.m_j; - if (j == m_j) continue; + if (j == bound_j) continue; mpq const& a = r.get_val(); int a_sign = is_pos(a)? 1: -1; int sign = j_sign * a_sign; diff --git a/src/util/mpz.cpp b/src/util/mpz.cpp index d306fd849..35a84d9a1 100644 --- a/src/util/mpz.cpp +++ b/src/util/mpz.cpp @@ -144,7 +144,7 @@ mpz_manager::mpz_manager(): else { m_init_cell_capacity = 6; } - set(m_int_min, -static_cast(INT_MIN)); + set(m_int_min, -static_cast(INT_MIN)); #else // GMP mpz_init(m_tmp); @@ -231,7 +231,7 @@ void mpz_manager::sub(mpz const & a, mpz const & b, mpz & c) { } template -void mpz_manager::set_big_i64(mpz & c, int64 v) { +void mpz_manager::set_big_i64(mpz & c, int64_t v) { #ifndef _MP_GMP if (c.m_ptr == nullptr) { c.m_ptr = allocate(m_init_cell_capacity); @@ -505,8 +505,8 @@ template void mpz_manager::machine_div_rem(mpz const & a, mpz const & b, mpz & q, mpz & r) { STRACE("mpz", tout << "[mpz-ext] divrem(" << to_string(a) << ", " << to_string(b) << ") == ";); if (is_small(a) && is_small(b)) { - int64 _a = i64(a); - int64 _b = i64(b); + int64_t _a = i64(a); + int64_t _b = i64(b); set_i64(q, _a / _b); set_i64(r, _a % _b); }