mirror of
https://github.com/Z3Prover/z3
synced 2025-06-28 08:58:44 +00:00
have solver pretty print declarations, include also datatype declarations
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
7f517c625f
commit
052ac51ed7
1 changed files with 6 additions and 10 deletions
|
@ -48,24 +48,20 @@ void ast_pp_util::display_decls(std::ostream& out) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void ast_pp_util::display_asserts(std::ostream& out, expr_ref_vector const& fmls, bool neat) {
|
void ast_pp_util::display_asserts(std::ostream& out, expr_ref_vector const& fmls, bool neat) {
|
||||||
func_decl_ref asrt(m);
|
|
||||||
expr_ref e(m);
|
|
||||||
sort* b = m.mk_bool_sort();
|
|
||||||
asrt = m.mk_func_decl(symbol("assert"), 1, &b, b);
|
|
||||||
if (neat) {
|
if (neat) {
|
||||||
smt2_pp_environment_dbg env(m);
|
smt2_pp_environment_dbg env(m);
|
||||||
for (unsigned i = 0; i < fmls.size(); ++i) {
|
for (unsigned i = 0; i < fmls.size(); ++i) {
|
||||||
e = m.mk_app(asrt, fmls[i]);
|
out << "(assert ";
|
||||||
ast_smt2_pp(out, e, env);
|
ast_smt2_pp(out, fmls[i], env);
|
||||||
out << "\n";
|
out << ")\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
ast_smt_pp ll_smt2_pp(m);
|
ast_smt_pp ll_smt2_pp(m);
|
||||||
for (unsigned i = 0; i < fmls.size(); ++i) {
|
for (unsigned i = 0; i < fmls.size(); ++i) {
|
||||||
e = m.mk_app(asrt, fmls[i]);
|
out << "(assert ";
|
||||||
ll_smt2_pp.display_expr_smt2(out, e);
|
ll_smt2_pp.display_expr_smt2(out, fmls[i]);
|
||||||
out << "\n";
|
out << ")\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue