3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-03 18:00:23 +00:00

update namespace, hoist exported functions outside of embedded namespace

This commit is contained in:
Nikolaj Bjorner 2025-05-07 15:57:47 -07:00
parent 644118660f
commit a51239c641
4 changed files with 32 additions and 36 deletions

View file

@ -60,7 +60,7 @@ Revision History:
#define IS_CGR_SUPPORT true
namespace q {
namespace euf {
// ------------------------------------
//
// Trail
@ -3885,31 +3885,32 @@ namespace q {
}
};
void mam::ground_subterms(expr* e, ptr_vector<app>& ground) {
ground.reset();
expr_fast_mark1 mark;
ptr_buffer<app> todo;
if (is_app(e))
todo.push_back(to_app(e));
while (!todo.empty()) {
app * n = todo.back();
todo.pop_back();
if (mark.is_marked(n))
continue;
mark.mark(n);
if (n->is_ground())
ground.push_back(n);
else {
for (expr* arg : *n)
if (is_app(arg))
todo.push_back(to_app(arg));
}
}
}
mam* mam::mk(euf::mam_solver& ctx, euf::on_binding_callback& em) {
return alloc(mam_impl, ctx, em, true);
}
}
void euf::mam::ground_subterms(expr* e, ptr_vector<app>& ground) {
ground.reset();
expr_fast_mark1 mark;
ptr_buffer<app> todo;
if (is_app(e))
todo.push_back(to_app(e));
while (!todo.empty()) {
app* n = todo.back();
todo.pop_back();
if (mark.is_marked(n))
continue;
mark.mark(n);
if (n->is_ground())
ground.push_back(n);
else {
for (expr* arg : *n)
if (is_app(arg))
todo.push_back(to_app(arg));
}
}
}
euf::mam* euf::mam::mk(euf::mam_solver& ctx, euf::on_binding_callback& em) {
return alloc(mam_impl, ctx, em, true);
}

View file

@ -39,16 +39,11 @@ namespace euf {
virtual ~on_binding_callback() = default;
virtual void on_binding(quantifier* q, app* pat, euf::enode* const* binding, unsigned max_generation, unsigned min_gen, unsigned max_gen) = 0;
};
};
namespace q {
typedef euf::enode enode;
typedef euf::egraph egraph;
typedef euf::enode_vector enode_vector;
class ematch;
/**
\brief Matching Abstract Machine (MAM)
*/