diff --git a/src/ast/ast_smt_pp.cpp b/src/ast/ast_smt_pp.cpp index 3dc94d3b3..c6c9c7c0c 100644 --- a/src/ast/ast_smt_pp.cpp +++ b/src/ast/ast_smt_pp.cpp @@ -537,7 +537,7 @@ class smt_printer { } void print_bound(symbol const& name) { - if (name.is_numerical() || '?' != name.bare_str()[0]) { + if (!m_is_smt2 && (name.is_numerical() || '?' != name.bare_str()[0])) { m_out << "?"; } m_out << name; @@ -561,7 +561,7 @@ class smt_printer { m_out << "("; print_bound(m_renaming.get_symbol(q->get_decl_name(i))); m_out << " "; - visit_sort(s, true); + visit_sort(s, !m_is-smt2); m_out << ") "; } if (m_is_smt2) { @@ -642,7 +642,9 @@ class smt_printer { m_out << m_var_names[m_num_var_names - idx - 1]; } else { - m_out << "?" << idx; + if (!m_is_smt2) { + m_out << "?" << idx; + } } } diff --git a/src/muz_qe/pdr_generalizers.cpp b/src/muz_qe/pdr_generalizers.cpp index a02a1cb6e..c9141f23e 100644 --- a/src/muz_qe/pdr_generalizers.cpp +++ b/src/muz_qe/pdr_generalizers.cpp @@ -188,8 +188,8 @@ namespace pdr { } } if (abs(r) >= rational(2) && a.is_int(x)) { - new_core[k] = m.mk_eq(a.mk_mod(x, a.mk_numeral(abs(r), true)), a.mk_numeral(rational(0), true)); - new_core[l] = a.mk_ge(x, a.mk_numeral(r, true)); + new_core[k] = m.mk_eq(a.mk_mod(x, a.mk_numeral(rational(2), true)), a.mk_numeral(rational(0), true)); + new_core[l] = a.mk_le(x, a.mk_numeral(r, true)); } bool inductive = n.pt().check_inductive(n.level(), new_core, uses_level); @@ -258,8 +258,8 @@ namespace pdr { vector & terms1 = it->m_value; vector terms2; if (r >= rational(2) && m_ub.find(r, terms2)) { - bool done = false; - for (unsigned i = 0; !done && i < terms1.size(); ++i) { + for (unsigned i = 0; i < terms1.size(); ++i) { + bool done = false; for (unsigned j = 0; !done && j < terms2.size(); ++j) { expr* t1 = terms1[i].first; expr* t2 = terms2[j].first;