3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-08 18:31:49 +00:00

add to_string method to make it easier to use without <<

This commit is contained in:
Nikolaj Bjorner 2021-09-01 15:37:58 -07:00
parent 7ce4be8455
commit 0c53c139da
2 changed files with 2 additions and 0 deletions

View file

@ -599,6 +599,7 @@ namespace z3 {
iterator begin() const noexcept { return iterator(this, 0); }
iterator end() const { return iterator(this, size()); }
friend std::ostream & operator<<(std::ostream & out, ast_vector_tpl const & v) { out << Z3_ast_vector_to_string(v.ctx(), v); return out; }
std::string to_string() const { return std::string(Z3_ast_vector_to_string(ctx(), m_vector); }
};

View file

@ -451,6 +451,7 @@ namespace array {
expr_ref alpha(a.mk_select(args), m);
expr_ref beta(alpha);
rewrite(beta);
TRACE("array", tout << alpha << " == " << beta << "\n";);
return ctx.propagate(e_internalize(alpha), e_internalize(beta), array_axiom());
}