3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-23 17:15:31 +00:00

Add support for compact string representation in the RCF API

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
Leonardo de Moura 2013-01-14 11:08:32 -08:00
parent 6c35e08e43
commit 742f2b07dd
5 changed files with 18 additions and 12 deletions

View file

@ -5658,15 +5658,18 @@ namespace realclosure {
display(out, a.m_value, true);
for (unsigned i = 0; i < c.m_found.size(); i++) {
algebraic * ext = c.m_found[i];
out << ", r!" << ext->idx() << " = ";
out << "; r!" << ext->idx() << " := ";
display_algebraic_def(out, ext, true);
}
out << "]";
}
}
void display(std::ostream & out, numeral const & a) const {
display(out, a.m_value, false);
void display(std::ostream & out, numeral const & a, bool compact=false) const {
if (compact)
display_compact(out, a);
else
display(out, a.m_value, false);
}
void display_non_rational_in_decimal(std::ostream & out, numeral const & a, unsigned precision) {
@ -5927,9 +5930,9 @@ namespace realclosure {
return gt(a, _b);
}
void manager::display(std::ostream & out, numeral const & a) const {
void manager::display(std::ostream & out, numeral const & a, bool compact) const {
save_interval_ctx ctx(this);
m_imp->display(out, a);
m_imp->display(out, a, compact);
}
void manager::display_decimal(std::ostream & out, numeral const & a, unsigned precision) const {

View file

@ -252,7 +252,7 @@ namespace realclosure {
bool ge(numeral const & a, mpq const & b) { return !lt(a, b); }
bool ge(numeral const & a, mpz const & b) { return !lt(a, b); }
void display(std::ostream & out, numeral const & a) const;
void display(std::ostream & out, numeral const & a, bool compact=false) const;
/**
\brief Display a real number in decimal notation.