diff --git a/src/cmd_context/cmd_context.cpp b/src/cmd_context/cmd_context.cpp index 0bb4b091e..6dd7fbcaa 100644 --- a/src/cmd_context/cmd_context.cpp +++ b/src/cmd_context/cmd_context.cpp @@ -1826,8 +1826,9 @@ void cmd_context::validate_model() { catch (contains_underspecified_op_proc::found) { continue; } - TRACE("model_validate", model_smt2_pp(tout, *this, *(md.get()), 0);); + TRACE("model_validate", model_smt2_pp(tout, *this, *md, 0);); IF_VERBOSE(10, verbose_stream() << "model check failed on: " << mk_pp(a, m()) << "\n";); + IF_VERBOSE(11, model_smt2_pp(verbose_stream(), *this, *md, 0);); invalid_model = true; } } diff --git a/src/tactic/arith/lia2pb_tactic.cpp b/src/tactic/arith/lia2pb_tactic.cpp index 178ace7fd..db1c22866 100644 --- a/src/tactic/arith/lia2pb_tactic.cpp +++ b/src/tactic/arith/lia2pb_tactic.cpp @@ -162,10 +162,8 @@ class lia2pb_tactic : public tactic { } bool has_target() { - bound_manager::iterator it = m_bm.begin(); - bound_manager::iterator end = m_bm.end(); - for (; it != end; ++it) { - if (is_target(*it)) + for (expr * x : m_bm) { + if (is_target(x)) return true; } return false; @@ -174,10 +172,7 @@ class lia2pb_tactic : public tactic { bool check_num_bits() { unsigned num_bits = 0; rational u; - bound_manager::iterator it = m_bm.begin(); - bound_manager::iterator end = m_bm.end(); - for (; it != end; ++it) { - expr * x = *it; + for (expr * x : m_bm) { if (is_target_core(x, u) && u > rational(1)) { num_bits += u.get_num_bits(); if (num_bits > m_total_bits) @@ -234,10 +229,7 @@ class lia2pb_tactic : public tactic { expr_substitution subst(m, m_produce_unsat_cores, false); rational u; ptr_buffer def_args; - bound_manager::iterator it = m_bm.begin(); - bound_manager::iterator end = m_bm.end(); - for (; it != end; ++it) { - expr * x = *it; + for (expr * x : m_bm) { if (is_target_core(x, u) && u > rational(1)) { num_converted++; def_args.reset(); @@ -251,7 +243,7 @@ class lia2pb_tactic : public tactic { def_args.push_back(x_prime); else def_args.push_back(m_util.mk_mul(m_util.mk_numeral(a, true), x_prime)); - if (m_produce_models) + if (m_produce_models) gmc->hide(x_prime->get_decl()); a *= rational(2); } diff --git a/src/tactic/arith/normalize_bounds_tactic.cpp b/src/tactic/arith/normalize_bounds_tactic.cpp index 907c7af8c..60d583798 100644 --- a/src/tactic/arith/normalize_bounds_tactic.cpp +++ b/src/tactic/arith/normalize_bounds_tactic.cpp @@ -109,8 +109,8 @@ class normalize_bounds_tactic : public tactic { expr * def = m_util.mk_add(x_prime, m_util.mk_numeral(val, s)); subst.insert(x, def); if (produce_models) { - gmc->add(to_app(x)->get_decl(), def); gmc->hide(x_prime->get_decl()); + gmc->add(to_app(x)->get_decl(), def); } } } diff --git a/src/tactic/generic_model_converter.cpp b/src/tactic/generic_model_converter.cpp index 9e2a7b9b2..1911edf3b 100644 --- a/src/tactic/generic_model_converter.cpp +++ b/src/tactic/generic_model_converter.cpp @@ -41,7 +41,7 @@ void generic_model_converter::add(func_decl * d, expr* e) { void generic_model_converter::operator()(model_ref & md) { TRACE("model_converter", tout << "before generic_model_converter\n"; model_v2_pp(tout, *md); display(tout);); - // IF_VERBOSE(0, verbose_stream() << "Apply converter " << m_orig << "\n";); + model_evaluator ev(*(md.get())); ev.set_model_completion(true); ev.set_expand_array_equalities(false);