|
| | user_propagator_base (Z3_context c) |
| |
| | user_propagator_base (solver *s) |
| |
| virtual void | push ()=0 |
| |
| virtual void | pop (unsigned num_scopes)=0 |
| |
| virtual | ~user_propagator_base ()=default |
| |
| virtual user_propagator_base * | fresh (Z3_context ctx)=0 |
| | user_propagators created using fresh() are created during search and their lifetimes are restricted to search time. They should be garbage collected by the propagator used to invoke fresh(). The life-time of the Z3_context object can only be assumed valid during callbacks, such as fixed(), which contains expressions based on the context. More...
|
| |
| void | register_fixed (fixed_eh_t &f) |
| | register callbacks. Callbacks can only be registered with user_propagators that were created using a solver. More...
|
| |
| void | register_fixed () |
| |
| void | register_eq (eq_eh_t &f) |
| |
| void | register_eq () |
| |
| void | register_final (final_eh_t &f) |
| | register a callback on final-check. During the final check stage, all propagations have been processed. This is an opportunity for the user-propagator to delay some analysis that could be expensive to perform incrementally. It is also an opportunity for the propagator to implement branch and bound optimization. More...
|
| |
| void | register_final () |
| |
| virtual void | fixed (unsigned, expr const &) |
| |
| virtual void | eq (unsigned, unsigned) |
| |
| virtual void | final () |
| |
| unsigned | add (expr const &e) |
| | tracks e by a unique identifier that is returned by the call. More...
|
| |
| void | conflict (unsigned num_fixed, unsigned const *fixed) |
| |
| void | propagate (unsigned num_fixed, unsigned const *fixed, expr const &conseq) |
| |
| void | propagate (unsigned num_fixed, unsigned const *fixed, unsigned num_eqs, unsigned const *lhs, unsigned const *rhs, expr const &conseq) |
| |
Definition at line 3875 of file z3++.h.
Definition at line 3934 of file z3++.h.
3934 : s(
nullptr), c(c) {}
Definition at line 3936 of file z3++.h.
3936 : s(s), c(
nullptr) {
void Z3_API Z3_solver_propagate_init(Z3_context c, Z3_solver s, void *user_context, Z3_push_eh push_eh, Z3_pop_eh pop_eh, Z3_fresh_eh fresh_eh)
register a user-properator with the solver.
| unsigned add |
( |
expr const & |
e | ) |
|
|
inline |
tracks e by a unique identifier that is returned by the call.
If the fixed() callback is registered and if e is a Boolean or Bit-vector, the fixed() callback gets invoked when e is bound to a value. If the eq() callback is registered, then equalities between registered expressions are reported. A consumer can use the propagate or conflict functions to invoke propagations or conflicts as a consequence of these callbacks. These functions take a list of identifiers for registered expressions that have been fixed. The list of identifiers must correspond to already fixed values. Similarly, a list of propagated equalities can be supplied. These must correspond to equalities that have been registered during a callback.
Definition at line 4032 of file z3++.h.
unsigned Z3_API Z3_solver_propagate_register(Z3_context c, Z3_solver s, Z3_ast e)
register an expression to propagate on with the solver. Only expressions of type Bool and type Bit-Ve...
| void conflict |
( |
unsigned |
num_fixed, |
|
|
unsigned const * |
fixed |
|
) |
| |
|
inline |
Definition at line 4037 of file z3++.h.
4039 scoped_context _ctx(ctx());
4040 expr conseq = _ctx().bool_val(
false);
void Z3_API Z3_solver_propagate_consequence(Z3_context c, Z3_solver_callback, unsigned num_fixed, unsigned const *fixed_ids, unsigned num_eqs, unsigned const *eq_lhs, unsigned const *eq_rhs, Z3_ast conseq)
propagate a consequence based on fixed values. This is a callback a client may invoke during the fixe...
virtual void fixed(unsigned, expr const &)
| virtual void eq |
( |
unsigned |
, |
|
|
unsigned |
|
|
) |
| |
|
inlinevirtual |
| virtual void fixed |
( |
unsigned |
, |
|
|
expr const & |
|
|
) |
| |
|
inlinevirtual |
user_propagators created using fresh() are created during search and their lifetimes are restricted to search time. They should be garbage collected by the propagator used to invoke fresh(). The life-time of the Z3_context object can only be assumed valid during callbacks, such as fixed(), which contains expressions based on the context.
| virtual void pop |
( |
unsigned |
num_scopes | ) |
|
|
pure virtual |
| void propagate |
( |
unsigned |
num_fixed, |
|
|
unsigned const * |
fixed, |
|
|
expr const & |
conseq |
|
) |
| |
|
inline |
Definition at line 4044 of file z3++.h.
4046 assert(conseq.ctx() == ctx());
void Z3_API Z3_solver_propagate_consequence(Z3_context c, Z3_solver_callback, unsigned num_fixed, unsigned const *fixed_ids, unsigned num_eqs, unsigned const *eq_lhs, unsigned const *eq_rhs, Z3_ast conseq)
propagate a consequence based on fixed values. This is a callback a client may invoke during the fixe...
virtual void fixed(unsigned, expr const &)
| void propagate |
( |
unsigned |
num_fixed, |
|
|
unsigned const * |
fixed, |
|
|
unsigned |
num_eqs, |
|
|
unsigned const * |
lhs, |
|
|
unsigned const * |
rhs, |
|
|
expr const & |
conseq |
|
) |
| |
|
inline |
Definition at line 4050 of file z3++.h.
4054 assert(conseq.ctx() == ctx());
void Z3_API Z3_solver_propagate_consequence(Z3_context c, Z3_solver_callback, unsigned num_fixed, unsigned const *fixed_ids, unsigned num_eqs, unsigned const *eq_lhs, unsigned const *eq_rhs, Z3_ast conseq)
propagate a consequence based on fixed values. This is a callback a client may invoke during the fixe...
virtual void fixed(unsigned, expr const &)
| void register_eq |
( |
eq_eh_t & |
f | ) |
|
|
inline |
Definition at line 3975 of file z3++.h.
void Z3_API Z3_solver_propagate_eq(Z3_context c, Z3_solver s, Z3_eq_eh eq_eh)
register a callback on expression equalities.
Definition at line 3981 of file z3++.h.
3983 m_eq_eh = [
this](
unsigned x,
unsigned y) {
virtual void eq(unsigned, unsigned)
void Z3_API Z3_solver_propagate_eq(Z3_context c, Z3_solver s, Z3_eq_eh eq_eh)
register a callback on expression equalities.
| void register_final |
( |
final_eh_t & |
f | ) |
|
|
inline |
register a callback on final-check. During the final check stage, all propagations have been processed. This is an opportunity for the user-propagator to delay some analysis that could be expensive to perform incrementally. It is also an opportunity for the propagator to implement branch and bound optimization.
Definition at line 3997 of file z3++.h.
void Z3_API Z3_solver_propagate_final(Z3_context c, Z3_solver s, Z3_final_eh final_eh)
register a callback on final check. This provides freedom to the propagator to delay actions or imple...
Definition at line 4003 of file z3++.h.
4005 m_final_eh = [
this]() {
void Z3_API Z3_solver_propagate_final(Z3_context c, Z3_solver s, Z3_final_eh final_eh)
register a callback on final check. This provides freedom to the propagator to delay actions or imple...
| void register_fixed |
( |
fixed_eh_t & |
f | ) |
|
|
inline |
register callbacks. Callbacks can only be registered with user_propagators that were created using a solver.
Definition at line 3961 of file z3++.h.
void Z3_API Z3_solver_propagate_fixed(Z3_context c, Z3_solver s, Z3_fixed_eh fixed_eh)
register a callback for when an expression is bound to a fixed value. The supported expression types ...
Definition at line 3967 of file z3++.h.
3969 m_fixed_eh = [
this](
unsigned id, expr
const& e) {
void Z3_API Z3_solver_propagate_fixed(Z3_context c, Z3_solver s, Z3_fixed_eh fixed_eh)
register a callback for when an expression is bound to a fixed value. The supported expression types ...
virtual void fixed(unsigned, expr const &)