3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-06 17:44:08 +00:00

fix translation for equality propagation

This commit is contained in:
Nikolaj Bjorner 2021-12-04 11:55:36 -08:00
parent 1b0ac4940b
commit c845b22c15

View file

@ -333,12 +333,18 @@ public:
struct callback : public user_propagator::callback {
smt_tactic* t = nullptr;
user_propagator::callback* cb = nullptr;
unsigned_vector fixed;
unsigned_vector fixed, lhs, rhs;
void propagate_cb(unsigned num_fixed, unsigned const* fixed_ids, unsigned num_eqs, unsigned const* eq_lhs, unsigned const* eq_rhs, expr* conseq) override {
fixed.reset();
lhs.reset();
rhs.reset();
for (unsigned i = 0; i < num_fixed; ++i)
fixed.push_back(t->m_var2internal[i]);
cb->propagate_cb(num_fixed, fixed.data(), num_eqs, eq_lhs, eq_rhs, conseq);
for (unsigned i = 0; i < num_eqs; ++i) {
lhs.push_back(t->m_var2internal[eq_lhs[i]]);
rhs.push_back(t->m_var2internal[eq_rhs[i]]);
}
cb->propagate_cb(num_fixed, fixed.data(), num_eqs, lhs.data(), rhs.data(), conseq);
}
};