mirror of
https://github.com/Z3Prover/z3
synced 2025-06-22 05:43:39 +00:00
adding user propagation to API
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
578ddf3e9d
commit
0c93c7aa08
8 changed files with 133 additions and 12 deletions
|
@ -1682,12 +1682,25 @@ namespace smt {
|
|||
/*
|
||||
* user-propagator
|
||||
*/
|
||||
void register_user_propagator(
|
||||
void user_propagate_init(
|
||||
void* ctx,
|
||||
std::function<void(void*, unsigned, expr*)>& fixed_eh,
|
||||
std::function<void(void*)>& push_eh,
|
||||
std::function<void(void*, unsigned)>& pop_eh);
|
||||
|
||||
unsigned user_propagate_register(expr* e) {
|
||||
if (!m_user_propagator)
|
||||
throw default_exception("user propagator must be initialized");
|
||||
return m_user_propagator->add_expr(e);
|
||||
}
|
||||
|
||||
void user_propagate_consequence(unsigned sz, unsigned const* ids, expr* conseq) {
|
||||
if (!m_user_propagator)
|
||||
throw default_exception("user propagator must be initialized");
|
||||
m_user_propagator->add_propagation(sz, ids, conseq);
|
||||
}
|
||||
|
||||
|
||||
bool watches_fixed(enode* n) const;
|
||||
|
||||
void assign_fixed(enode* n, expr* val, unsigned sz, literal const* explain);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue