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

fix proof generation for euf-solver

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2023-07-23 14:31:44 -07:00
parent e64bab4bb8
commit 48deb4d3e0
6 changed files with 108 additions and 49 deletions

View file

@ -228,6 +228,8 @@ namespace euf {
th_explain::th_explain(unsigned n_lits, sat::literal const* lits, unsigned n_eqs, enode_pair const* eqs, sat::literal c, enode_pair const& p, th_proof_hint const* pma) {
m_consequent = c;
m_eq = p;
if (m_eq.first && m_eq.first->get_id() > m_eq.second->get_id())
std::swap(m_eq.first, m_eq.second);
m_proof_hint = pma;
m_num_literals = n_lits;
m_num_eqs = n_eqs;
@ -238,8 +240,11 @@ namespace euf {
m_literals[i] = lits[i];
base_ptr += sizeof(literal) * n_lits;
m_eqs = reinterpret_cast<enode_pair*>(base_ptr);
for (i = 0; i < n_eqs; ++i)
for (i = 0; i < n_eqs; ++i) {
m_eqs[i] = eqs[i];
if (m_eqs[i].first->get_id() > m_eqs[i].second->get_id())
std::swap(m_eqs[i].first, m_eqs[i].second);
}
}
th_explain* th_explain::mk(th_euf_solver& th, unsigned n_lits, sat::literal const* lits, unsigned n_eqs, enode_pair const* eqs, sat::literal c, enode* x, enode* y, th_proof_hint const* pma) {