mirror of
https://github.com/Z3Prover/z3
synced 2025-04-13 12:28:44 +00:00
fix pretty printer bug found by ken
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
2e2fa84d40
commit
9e868cdef3
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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<term_loc_t> & terms1 = it->m_value;
|
||||
vector<term_loc_t> 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;
|
||||
|
|
Loading…
Reference in a new issue