3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-13 04:28:17 +00:00
This commit is contained in:
Nikolaj Bjorner 2021-10-19 12:24:41 -04:00
commit 839a0852fe

View file

@ -3954,12 +3954,28 @@ namespace z3 {
Z3_solver_propagate_fixed(ctx(), *s, fixed_eh);
}
void register_fixed() {
assert(s);
m_fixed_eh = [this](unsigned id, expr const& e) {
fixed(id, e);
};
Z3_solver_propagate_fixed(ctx(), *s, fixed_eh);
}
void register_eq(eq_eh_t& f) {
assert(s);
m_eq_eh = f;
Z3_solver_propagate_eq(ctx(), *s, eq_eh);
}
void register_eq() {
assert(s);
m_eq_eh = [this](unsigned x, unsigned y) {
eq(x, y);
};
Z3_solver_propagate_eq(ctx(), *s, eq_eh);
}
/**
\brief register a callback on final-check.
During the final check stage, all propagations have been processed.
@ -3974,6 +3990,21 @@ namespace z3 {
Z3_solver_propagate_final(ctx(), *s, final_eh);
}
void register_final() {
assert(s);
m_final_eh = [this]() {
final();
};
Z3_solver_propagate_final(ctx(), *s, final_eh);
}
virtual void fixed(unsigned id, expr const& e) { }
virtual void eq(unsigned x, unsigned y) { }
virtual void final() { }
/**
\brief tracks \c e by a unique identifier that is returned by the call.