mirror of
https://github.com/Z3Prover/z3
synced 2025-05-07 15:55:46 +00:00
set low-level pretty printer by default from fixedpoint context
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
b456be1151
commit
589665f00e
3 changed files with 38 additions and 17 deletions
|
@ -949,6 +949,10 @@ public:
|
|||
mark.mark(s, true);
|
||||
}
|
||||
|
||||
void operator()(sort* s) {
|
||||
ast_mark mark;
|
||||
pp_sort_decl(mark, s);
|
||||
}
|
||||
|
||||
void operator()(func_decl* d) {
|
||||
if (m_is_smt2) {
|
||||
|
@ -962,7 +966,6 @@ public:
|
|||
m_out << ") ";
|
||||
visit_sort(d->get_range());
|
||||
m_out << ")";
|
||||
newline();
|
||||
}
|
||||
else {
|
||||
m_out << "(";
|
||||
|
@ -1021,6 +1024,22 @@ void ast_smt_pp::display_expr_smt2(std::ostream& strm, expr* n, unsigned indent,
|
|||
p(n);
|
||||
}
|
||||
|
||||
void ast_smt_pp::display_ast_smt2(std::ostream& strm, ast* a, unsigned indent, unsigned num_var_names, char const* const* var_names) {
|
||||
ptr_vector<quantifier> ql;
|
||||
smt_renaming rn;
|
||||
smt_printer p(strm, m_manager, ql, rn, m_logic, false, true, m_simplify_implies, indent, num_var_names, var_names);
|
||||
if (is_expr(a)) {
|
||||
p(to_expr(a));
|
||||
}
|
||||
else if (is_func_decl(a)) {
|
||||
p(to_func_decl(a));
|
||||
}
|
||||
else {
|
||||
SASSERT(is_sort(a));
|
||||
p(to_sort(a));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void ast_smt_pp::display_smt2(std::ostream& strm, expr* n) {
|
||||
ptr_vector<quantifier> ql;
|
||||
|
@ -1071,6 +1090,7 @@ void ast_smt_pp::display_smt2(std::ostream& strm, expr* n) {
|
|||
if (!(*m_is_declared)(d)) {
|
||||
smt_printer p(strm, m_manager, ql, rn, m_logic, true, true, m_simplify_implies, 0);
|
||||
p(d);
|
||||
strm << "\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1079,6 +1099,7 @@ void ast_smt_pp::display_smt2(std::ostream& strm, expr* n) {
|
|||
if (!(*m_is_declared)(d)) {
|
||||
smt_printer p(strm, m_manager, ql, rn, m_logic, true, true, m_simplify_implies, 0);
|
||||
p(d);
|
||||
strm << "\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue