3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-05-12 02:04:43 +00:00

move user propagte declare to context level

declaration of user propagate functions are declared at context level instead of at solver scope.
This commit is contained in:
Nikolaj Bjorner 2021-12-18 10:56:42 -08:00
parent 4856581b68
commit f0740bdf60
17 changed files with 92 additions and 324 deletions

View file

@ -23,7 +23,7 @@ Author:
using namespace smt;
theory_user_propagator::theory_user_propagator(context& ctx):
theory(ctx, ctx.get_manager().mk_family_id("user_propagator"))
theory(ctx, ctx.get_manager().mk_family_id(user_propagator::plugin::name()))
{}
theory_user_propagator::~theory_user_propagator() {
@ -173,16 +173,6 @@ void theory_user_propagator::propagate() {
m_qhead = qhead;
}
func_decl* theory_user_propagator::declare(symbol const& name, unsigned n, sort* const* domain, sort* range) {
if (!m_created_eh)
throw default_exception("event handler for dynamic expressions has to be registered before functions can be created");
// ensure that declaration plugin is registered with m.
if (!m.has_plugin(get_id()))
m.register_plugin(get_id(), alloc(user_propagator::plugin));
func_decl_info info(get_id(), user_propagator::plugin::kind_t::OP_USER_PROPAGATE);
return m.mk_func_decl(name, n, domain, range, info);
}
bool theory_user_propagator::internalize_atom(app* atom, bool gate_ctx) {
return internalize_term(atom);