3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-24 01:25:31 +00:00

release nodes

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2020-08-30 20:09:27 -07:00
parent bbe027f6a1
commit a003af494b
15 changed files with 319 additions and 135 deletions

View file

@ -130,6 +130,11 @@ namespace euf {
return n;
}
void egraph::~egraph() {
for (enode* n : m_nodes)
n->~enode();
}
void egraph::pop(unsigned num_scopes) {
if (num_scopes <= m_num_scopes) {
m_num_scopes -= num_scopes;

View file

@ -106,6 +106,7 @@ namespace euf {
public:
egraph(ast_manager& m): m(m), m_table(m), m_exprs(m) {}
~egraph();
enode* find(expr* f) { return m_expr2enode.get(f->get_id(), nullptr); }
enode* mk(expr* f, unsigned n, enode *const* args);
void push() { ++m_num_scopes; }

View file

@ -169,7 +169,7 @@ namespace euf {
binary_table* tb = UNTAG(binary_table*, t);
out << "b ";
for (enode* n : *tb) {
out << n->get_owner_id() << " " << cg_binary_hash()(n) << " ";
out << n->get_owner_id() << " ";
}
out << "\n";
}