mirror of
https://github.com/Z3Prover/z3
synced 2025-04-12 20:18:18 +00:00
revert smt_enode
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
This commit is contained in:
parent
a00eb08ddd
commit
e9fa7db96c
|
@ -340,7 +340,8 @@ namespace smt {
|
||||||
|
|
||||||
void tmp_enode::set_capacity(unsigned new_capacity) {
|
void tmp_enode::set_capacity(unsigned new_capacity) {
|
||||||
SASSERT(new_capacity > m_capacity);
|
SASSERT(new_capacity > m_capacity);
|
||||||
dealloc_svect(m_enode_data);
|
if (m_enode_data)
|
||||||
|
dealloc_svect(m_enode_data);
|
||||||
m_capacity = new_capacity;
|
m_capacity = new_capacity;
|
||||||
unsigned sz = sizeof(enode) + m_capacity * sizeof(enode*);
|
unsigned sz = sizeof(enode) + m_capacity * sizeof(enode*);
|
||||||
m_enode_data = alloc_svect(char, sz);
|
m_enode_data = alloc_svect(char, sz);
|
||||||
|
@ -358,6 +359,9 @@ namespace smt {
|
||||||
if (num_args > m_capacity)
|
if (num_args > m_capacity)
|
||||||
set_capacity(num_args * 2);
|
set_capacity(num_args * 2);
|
||||||
enode * r = get_enode();
|
enode * r = get_enode();
|
||||||
|
if (m_app.get_app()->get_decl() != f) {
|
||||||
|
r->m_func_decl_id = UINT_MAX;
|
||||||
|
}
|
||||||
m_app.set_decl(f);
|
m_app.set_decl(f);
|
||||||
m_app.set_num_args(num_args);
|
m_app.set_num_args(num_args);
|
||||||
r->m_commutative = num_args == 2 && f->is_commutative();
|
r->m_commutative = num_args == 2 && f->is_commutative();
|
||||||
|
@ -365,5 +369,9 @@ namespace smt {
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void tmp_enode::reset() {
|
||||||
|
get_enode()->m_func_decl_id = UINT_MAX;
|
||||||
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -465,6 +465,7 @@ namespace smt {
|
||||||
tmp_enode();
|
tmp_enode();
|
||||||
~tmp_enode();
|
~tmp_enode();
|
||||||
enode * set(func_decl * f, unsigned num_args, enode * const * args);
|
enode * set(func_decl * f, unsigned num_args, enode * const * args);
|
||||||
|
void reset();
|
||||||
};
|
};
|
||||||
|
|
||||||
inline mk_pp pp(enode* n, ast_manager& m) { return mk_pp(n->get_expr(), m); }
|
inline mk_pp pp(enode* n, ast_manager& m) { return mk_pp(n->get_expr(), m); }
|
||||||
|
|
Loading…
Reference in a new issue