mirror of
https://github.com/Z3Prover/z3
synced 2025-05-04 22:35:45 +00:00
converted pp_params
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
4f9442864a
commit
3e6bddbad1
20 changed files with 114 additions and 223 deletions
|
@ -1536,8 +1536,7 @@ cmd_context::pp_env & cmd_context::get_pp_env() const {
|
|||
}
|
||||
|
||||
void cmd_context::pp(expr * n, unsigned num_vars, char const * var_prefix, format_ns::format_ref & r, sbuffer<symbol> & var_names) const {
|
||||
mk_smt2_format(n, get_pp_env(), get_pp_default_params(),
|
||||
num_vars, var_prefix, r, var_names);
|
||||
mk_smt2_format(n, get_pp_env(), params_ref(), num_vars, var_prefix, r, var_names);
|
||||
}
|
||||
|
||||
void cmd_context::pp(expr * n, format_ns::format_ref & r) const {
|
||||
|
@ -1546,7 +1545,7 @@ void cmd_context::pp(expr * n, format_ns::format_ref & r) const {
|
|||
}
|
||||
|
||||
void cmd_context::pp(func_decl * f, format_ns::format_ref & r) const {
|
||||
mk_smt2_format(f, get_pp_env(), get_pp_default_params(), r);
|
||||
mk_smt2_format(f, get_pp_env(), params_ref(), r);
|
||||
}
|
||||
|
||||
void cmd_context::display(std::ostream & out, sort * s, unsigned indent) const {
|
||||
|
@ -1554,7 +1553,7 @@ void cmd_context::display(std::ostream & out, sort * s, unsigned indent) const {
|
|||
f = pp(s);
|
||||
if (indent > 0)
|
||||
f = format_ns::mk_indent(m(), indent, f);
|
||||
::pp(out, f.get(), m(), get_pp_default_params());
|
||||
::pp(out, f.get(), m());
|
||||
}
|
||||
|
||||
void cmd_context::display(std::ostream & out, expr * n, unsigned indent, unsigned num_vars, char const * var_prefix, sbuffer<symbol> & var_names) const {
|
||||
|
@ -1562,7 +1561,7 @@ void cmd_context::display(std::ostream & out, expr * n, unsigned indent, unsigne
|
|||
pp(n, num_vars, var_prefix, f, var_names);
|
||||
if (indent > 0)
|
||||
f = format_ns::mk_indent(m(), indent, f);
|
||||
::pp(out, f.get(), m(), get_pp_default_params());
|
||||
::pp(out, f.get(), m());
|
||||
}
|
||||
|
||||
void cmd_context::display(std::ostream & out, expr * n, unsigned indent) const {
|
||||
|
@ -1575,7 +1574,7 @@ void cmd_context::display(std::ostream & out, func_decl * d, unsigned indent) co
|
|||
pp(d, f);
|
||||
if (indent > 0)
|
||||
f = format_ns::mk_indent(m(), indent, f);
|
||||
::pp(out, f.get(), m(), get_pp_default_params());
|
||||
::pp(out, f.get(), m());
|
||||
}
|
||||
|
||||
void cmd_context::dump_assertions(std::ostream & out) const {
|
||||
|
|
|
@ -26,10 +26,10 @@ Notes:
|
|||
#include"parametric_cmd.h"
|
||||
#include"mpq.h"
|
||||
#include"algebraic_numbers.h"
|
||||
#include"pp.h"
|
||||
#include"pp_params.h"
|
||||
#include"polynomial_var2value.h"
|
||||
#include"expr2var.h"
|
||||
#include"pp.h"
|
||||
#include"pp_params.hpp"
|
||||
|
||||
static void to_poly(cmd_context & ctx, expr * t) {
|
||||
polynomial::numeral_manager nm;
|
||||
|
@ -145,9 +145,11 @@ class poly_isolate_roots_cmd : public cmd {
|
|||
scoped_anum_vector rs(m_am);
|
||||
m_am.isolate_roots(m_p, m_x2v, rs);
|
||||
ctx.regular_stream() << "(roots";
|
||||
pp_params params;
|
||||
bool pp_decimal = params.decimal();
|
||||
for (unsigned i = 0; i < rs.size(); i++) {
|
||||
ctx.regular_stream() << std::endl;
|
||||
if (!get_pp_default_params().m_pp_decimal)
|
||||
if (!pp_decimal)
|
||||
m_am.display_root_smt2(ctx.regular_stream(), rs[i]);
|
||||
else
|
||||
m_am.display_decimal(ctx.regular_stream(), rs[i]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue