mirror of
https://github.com/Z3Prover/z3
synced 2026-06-20 07:36:31 +00:00
Change seq_plugin m_sg to sgraph& reference, enode_concat_hash takes sgraph& directly
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
This commit is contained in:
parent
fbd3d445e2
commit
7c8f2d93bb
2 changed files with 11 additions and 18 deletions
|
|
@ -47,12 +47,9 @@ namespace euf {
|
|||
}
|
||||
|
||||
unsigned enode_concat_hash::operator()(enode* n) const {
|
||||
sgraph* sg = sg_ptr ? *sg_ptr : nullptr;
|
||||
if (sg) {
|
||||
snode* sn = sg->find(n->get_expr());
|
||||
if (sn && sn->has_cached_hash())
|
||||
return sn->assoc_hash();
|
||||
}
|
||||
snode* sn = sg.find(n->get_expr());
|
||||
if (sn && sn->has_cached_hash())
|
||||
return sn->assoc_hash();
|
||||
if (!is_any_concat(n, seq))
|
||||
return n->get_id();
|
||||
enode_vector leaves;
|
||||
|
|
@ -82,18 +79,16 @@ namespace euf {
|
|||
plugin(g),
|
||||
m_seq(g.get_manager()),
|
||||
m_rewriter(g.get_manager()),
|
||||
m_sg(sg),
|
||||
m_sg(sg ? *sg : *alloc(sgraph, g.get_manager(), g, false)),
|
||||
m_sg_owned(sg == nullptr),
|
||||
m_concat_hash(m_seq, &m_sg),
|
||||
m_concat_hash(m_seq, m_sg),
|
||||
m_concat_eq(m_seq),
|
||||
m_concat_table(DEFAULT_HASHTABLE_INITIAL_CAPACITY, m_concat_hash, m_concat_eq) {
|
||||
if (!m_sg)
|
||||
m_sg = alloc(sgraph, g.get_manager(), g, false);
|
||||
}
|
||||
|
||||
seq_plugin::~seq_plugin() {
|
||||
if (m_sg_owned && m_sg)
|
||||
dealloc(m_sg);
|
||||
if (m_sg_owned)
|
||||
dealloc(&m_sg);
|
||||
}
|
||||
|
||||
void seq_plugin::register_node(enode* n) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue