mirror of
https://github.com/Z3Prover/z3
synced 2025-07-31 08:23:17 +00:00
parent
211a6c8752
commit
b8a437bd8a
8 changed files with 60 additions and 36 deletions
|
@ -248,8 +248,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
void operator()(quantifier * n) {
|
||||
display_def_header(n);
|
||||
void display_quantifier_header(quantifier* n) {
|
||||
m_out << "(" << (n->get_kind() == forall_k ? "forall" : (n->get_kind() == exists_k ? "exists" : "lambda")) << " ";
|
||||
unsigned num_decls = n->get_num_decls();
|
||||
m_out << "(vars ";
|
||||
|
@ -272,6 +271,12 @@ public:
|
|||
display_children(n->get_num_no_patterns(), n->get_no_patterns());
|
||||
m_out << ") ";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void operator()(quantifier * n) {
|
||||
display_def_header(n);
|
||||
display_quantifier_header(n);
|
||||
display_child(n->get_expr());
|
||||
m_out << ")\n";
|
||||
}
|
||||
|
@ -281,6 +286,12 @@ public:
|
|||
m_out << "(:var " << to_var(n)->get_idx() << ")";
|
||||
return;
|
||||
}
|
||||
if (is_quantifier(n)) {
|
||||
display_quantifier_header(to_quantifier(n));
|
||||
display(to_quantifier(n)->get_expr(), depth - 1);
|
||||
m_out << ")";
|
||||
return;
|
||||
}
|
||||
|
||||
if (!is_app(n) || depth == 0 || to_app(n)->get_num_args() == 0) {
|
||||
display_child(n);
|
||||
|
@ -304,16 +315,11 @@ public:
|
|||
|
||||
void display_bounded(ast * n, unsigned depth) {
|
||||
if (!n)
|
||||
m_out << "null";
|
||||
else if (is_app(n)) {
|
||||
display(to_expr(n), depth);
|
||||
}
|
||||
else if (is_var(n)) {
|
||||
m_out << "(:var " << to_var(n)->get_idx() << ")";
|
||||
}
|
||||
else {
|
||||
m_out << "#" << n->get_id();
|
||||
}
|
||||
m_out << "null";
|
||||
else if (is_expr(n))
|
||||
display(to_expr(n), depth);
|
||||
else
|
||||
m_out << "#" << n->get_id();
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -281,9 +281,9 @@ struct pull_quant::imp {
|
|||
m.mk_rewrite(old_q, result);
|
||||
return true;
|
||||
}
|
||||
if (is_lambda(old_q)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (is_lambda(old_q))
|
||||
return false;
|
||||
|
||||
if (!is_forall(new_body))
|
||||
return false;
|
||||
|
|
|
@ -336,7 +336,6 @@ namespace recfun {
|
|||
return alloc(def, m(), m_fid, name, n, domain, range, is_generated);
|
||||
}
|
||||
|
||||
|
||||
void util::set_definition(replace& subst, promise_def & d, bool is_macro, unsigned n_vars, var * const * vars, expr * rhs) {
|
||||
expr_ref rhs1(rhs, m());
|
||||
if (!is_macro)
|
||||
|
@ -531,7 +530,6 @@ namespace recfun {
|
|||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
case_expansion::case_expansion(recfun::util& u, app * n) :
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue