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

update topological sort to use arrays instead of hash tables, expose Context over Z3Object for programmability

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2022-06-08 06:28:24 -07:00
parent 0e6c64510a
commit 51ed13f96a
17 changed files with 103 additions and 96 deletions

View file

@ -531,22 +531,22 @@ namespace smt {
}
unsigned get_num_enodes_of(func_decl const * decl) const {
unsigned id = decl->get_decl_id();
unsigned id = decl->get_small_id();
return id < m_decl2enodes.size() ? m_decl2enodes[id].size() : 0;
}
enode_vector const& enodes_of(func_decl const * d) const {
unsigned id = d->get_decl_id();
unsigned id = d->get_small_id();
return id < m_decl2enodes.size() ? m_decl2enodes[id] : m_empty_vector;
}
enode_vector::const_iterator begin_enodes_of(func_decl const * decl) const {
unsigned id = decl->get_decl_id();
unsigned id = decl->get_small_id();
return id < m_decl2enodes.size() ? m_decl2enodes[id].begin() : nullptr;
}
enode_vector::const_iterator end_enodes_of(func_decl const * decl) const {
unsigned id = decl->get_decl_id();
unsigned id = decl->get_small_id();
return id < m_decl2enodes.size() ? m_decl2enodes[id].end() : nullptr;
}