3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-06-23 06:13:40 +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

@ -29,6 +29,8 @@ namespace user_propagator {
class plugin : public decl_plugin {
public:
static symbol name() { return symbol("user_propagator"); }
enum kind_t { OP_USER_PROPAGATE };
virtual ~plugin() {}
@ -79,19 +81,7 @@ namespace user_propagator {
throw default_exception("user-propagators are only supported on the SMT solver");
}
virtual unsigned user_propagate_register(expr* e) {
throw default_exception("user-propagators are only supported on the SMT solver");
}
/**
* Create uninterpreted function for the user propagator.
* When expressions using the function are assigned values, generate a callback
* into a register_declared_eh(user_ctx, solver_ctx, declared_expr, declare_id) with arguments
* 1. context and callback context
* 2. declared_expr: expression using function that was declared at top.
* 3. declared_id: a unique identifier (unique within the current scope) to track the expression.
*/
virtual func_decl* user_propagate_declare(symbol const& name, unsigned n, sort* const* domain, sort* range) {
virtual unsigned user_propagate_register_expr(expr* e) {
throw default_exception("user-propagators are only supported on the SMT solver");
}