3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-29 11:55:51 +00:00

force-push on new_eq, new_diseq in user propagator, other fixes to Python bindings for user propagator

This update allows the python bindings for user-propagator to handle functions that are declared to be registered with the user propagator plugin. It fixes a bug in UserPropagateBase.add to allow registering terms dynamically during search.
It also fixes a bug in theory_user_propagate as scopes were not fully pushed when the solver gets the callbacks for new equalities and new disequalities.
It also adds equality and disequality interfaces to the sat/smt solver version (which isn't being exercised in earnest yet)
This commit is contained in:
Nikolaj Bjorner 2022-07-25 03:42:29 +02:00
parent 3e38bbb009
commit 5c2c0ae900
7 changed files with 93 additions and 25 deletions

View file

@ -131,6 +131,21 @@ namespace user_solver {
m_id2justification.setx(v, lits, sat::literal_vector());
m_fixed_eh(m_user_context, this, var2expr(v), lit.sign() ? m.mk_false() : m.mk_true());
}
void solver::new_eq_eh(euf::th_eq const& eq) {
if (!m_eq_eh)
return;
force_push();
m_eq_eh(m_user_context, this, var2expr(eq.v1()), var2expr(eq.v2()));
}
void solver::new_diseq_eh(euf::th_eq const& de) {
if (!m_diseq_eh)
return;
force_push();
m_diseq_eh(m_user_context, this, var2expr(eq.v1()), var2expr(eq.v2()));
}
void solver::push_core() {
th_euf_solver::push_core();