3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-06-22 05:43:39 +00:00

add c-cube's recursive function theory

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2018-10-17 04:56:58 -07:00
commit c7d0d4e191
23 changed files with 1590 additions and 21 deletions

View file

@ -1614,6 +1614,35 @@ namespace smt {
void insert_macro(func_decl * f, quantifier * m, proof * pr, expr_dependency * dep) { m_asserted_formulas.insert_macro(f, m, pr, dep); }
};
struct pp_lit {
smt::context & ctx;
smt::literal lit;
pp_lit(smt::context & ctx, smt::literal lit) : ctx(ctx), lit(lit) {}
};
inline std::ostream & operator<<(std::ostream & out, pp_lit const & pp) {
pp.ctx.display_detailed_literal(out, pp.lit);
return out;
}
struct pp_lits {
smt::context & ctx;
smt::literal *lits;
unsigned len;
pp_lits(smt::context & ctx, unsigned len, smt::literal *lits) : ctx(ctx), lits(lits), len(len) {}
};
inline std::ostream & operator<<(std::ostream & out, pp_lits const & pp) {
out << "clause{";
bool first = true;
for (unsigned i = 0; i < pp.len; ++i) {
if (first) { first = false; } else { out << " "; }
pp.ctx.display_detailed_literal(out, pp.lits[i]);
}
return out << "}";
}
};
#endif /* SMT_CONTEXT_H_ */