3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-24 09:35:32 +00:00

user propagator

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2020-08-22 19:00:58 -07:00
parent 5e5ef50dbc
commit 96f10b8c1c
15 changed files with 219 additions and 127 deletions

View file

@ -239,22 +239,26 @@ public:
virtual expr_ref get_implied_upper_bound(expr* e) = 0;
virtual void user_propagate_init(
void* ctx,
std::function<void(void*)>& push_eh,
std::function<void(void*, unsigned)>& pop_eh,
std::function<void*(void*)>& fresh_eh) {
throw default_exception("user-propagators are only supported on the SMT solver");
}
class propagate_callback {
public:
virtual void propagate(unsigned sz, unsigned const* ids, expr* conseq) = 0;
virtual void propagate(unsigned num_fixed, unsigned const* fixed_ids, unsigned num_eqs, unsigned const* eq_lhs, unsigned const* eq_rhs, expr* conseq) = 0;
};
typedef std::function<void(void*, solver::propagate_callback*)> final_eh_t;
typedef std::function<void(void*, solver::propagate_callback*, unsigned, expr*)> fixed_eh_t;
typedef std::function<void(void*, solver::propagate_callback*, unsigned, unsigned)> eq_eh_t;
typedef std::function<void*(void*, ast_manager&, void*&)> fresh_eh_t;
typedef std::function<void(void*)> push_eh_t;
typedef std::function<void(void*,unsigned)> pop_eh_t;
virtual void user_propagate_init(
void* ctx,
push_eh_t& push_eh,
pop_eh_t& pop_eh,
fresh_eh_t& fresh_eh) {
throw default_exception("user-propagators are only supported on the SMT solver");
}
virtual void user_propagate_register_fixed(fixed_eh_t& fixed_eh) {
throw default_exception("user-propagators are only supported on the SMT solver");