3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-05-02 13:27:01 +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

@ -755,7 +755,7 @@ namespace mbp {
app* a = to_app(e);
func_decl* d = a->get_decl();
if (d->get_arity() == 0) continue;
unsigned id = d->get_decl_id();
unsigned id = d->get_small_id();
m_decl2terms.reserve(id+1);
if (m_decl2terms[id].empty()) m_decls.push_back(d);
m_decl2terms[id].push_back(t);
@ -770,7 +770,7 @@ namespace mbp {
// are distinct.
//
for (func_decl* d : m_decls) {
unsigned id = d->get_decl_id();
unsigned id = d->get_small_id();
ptr_vector<term> const& terms = m_decl2terms[id];
if (terms.size() <= 1) continue;
unsigned arity = d->get_arity();