|
| 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 () |
|
void | register_created (created_eh_t &c) |
|
void | register_created () |
|
virtual void | fixed (unsigned, expr const &) |
|
virtual void | eq (unsigned, unsigned) |
|
virtual void | final () |
|
virtual void | created (unsigned, expr const &) |
|
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 3891 of file z3++.h.
◆ user_propagator_base() [1/2]
Definition at line 3960 of file z3++.h.
3960 : s(
nullptr), c(c) {}
◆ user_propagator_base() [2/2]
Definition at line 3962 of file z3++.h.
3962 : 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.
◆ ~user_propagator_base()
◆ add()
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 4072 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...
unsigned Z3_API Z3_solver_propagate_register_cb(Z3_context c, Z3_solver_callback cb, Z3_ast e)
register an expression to propagate on with the solver. Only expressions of type Bool and type Bit-Ve...
Referenced by Solver::__iadd__(), Fixedpoint::__iadd__(), and Optimize::__iadd__().
◆ conflict()
void conflict |
( |
unsigned |
num_fixed, |
|
|
unsigned const * |
fixed |
|
) |
| |
|
inline |
Definition at line 4081 of file z3++.h.
4083 scoped_context _ctx(ctx());
4084 expr conseq = _ctx().bool_val(
false);
virtual void fixed(unsigned, expr const &)
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...
◆ created()
virtual void created |
( |
unsigned |
, |
|
|
expr const & |
|
|
) |
| |
|
inlinevirtual |
◆ eq()
virtual void eq |
( |
unsigned |
, |
|
|
unsigned |
|
|
) |
| |
|
inlinevirtual |
◆ final()
◆ fixed()
virtual void fixed |
( |
unsigned |
, |
|
|
expr const & |
|
|
) |
| |
|
inlinevirtual |
◆ fresh()
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.
◆ pop()
virtual void pop |
( |
unsigned |
num_scopes | ) |
|
|
pure virtual |
◆ propagate() [1/2]
void propagate |
( |
unsigned |
num_fixed, |
|
|
unsigned const * |
fixed, |
|
|
expr const & |
conseq |
|
) |
| |
|
inline |
◆ propagate() [2/2]
void propagate |
( |
unsigned |
num_fixed, |
|
|
unsigned const * |
fixed, |
|
|
unsigned |
num_eqs, |
|
|
unsigned const * |
lhs, |
|
|
unsigned const * |
rhs, |
|
|
expr const & |
conseq |
|
) |
| |
|
inline |
◆ push()
◆ register_created() [1/2]
void register_created |
( |
| ) |
|
|
inline |
Definition at line 4043 of file z3++.h.
4044 m_created_eh = [
this](
unsigned id, expr
const& e) {
virtual void created(unsigned, expr const &)
void Z3_API Z3_solver_propagate_created(Z3_context c, Z3_solver s, Z3_created_eh created_eh)
register a callback when a new expression with a registered function is used by the solver The regist...
◆ register_created() [2/2]
void register_created |
( |
created_eh_t & |
c | ) |
|
|
inline |
◆ register_eq() [1/2]
Definition at line 4007 of file z3++.h.
4009 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.
◆ register_eq() [2/2]
void register_eq |
( |
eq_eh_t & |
f | ) |
|
|
inline |
◆ register_final() [1/2]
Definition at line 4029 of file z3++.h.
4031 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...
◆ register_final() [2/2]
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 4023 of file z3++.h.
◆ register_fixed() [1/2]
Definition at line 3993 of file z3++.h.
3995 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 ...
◆ register_fixed() [2/2]
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 3987 of file z3++.h.