Properly clean up assertion stack in CnfProof (#2147)
authorAndres Noetzli <andres.noetzli@gmail.com>
Fri, 13 Jul 2018 20:24:43 +0000 (13:24 -0700)
committerGitHub <noreply@github.com>
Fri, 13 Jul 2018 20:24:43 +0000 (13:24 -0700)
commitca65101e2d56a476367c8ad09b416b66403be7a7
treef0217edeee991073146d7d681cdf64c6c3476f22
parentc369afa180b7cb3d9388c39d18fcb81e8246ff21
Properly clean up assertion stack in CnfProof (#2147)

Fixes issue #2137. CnfProof has a stack of assertions that are being
converted to clauses. Previously, it could happen that while an
assertion was being added, TheoryProxy::explainPropagation() would be
called from Solver::reason() and push an assertion to the stack that was
then not removed. This lead to a clause id of the assertion being
associated with the explanation instead, which in turn could lead to a
wrong unsat core. This commit identifies two cases where
TheoryProxy::explainPropagation() is called without cleaning up the
assertion stack afterwards. It also adds an assertion that the assertion
stack must be empty when we are getting the unsat core.
src/proof/cnf_proof.cpp
src/proof/cnf_proof.h
src/proof/proof_manager.cpp
src/proof/sat_proof_implementation.h
src/prop/minisat/core/Solver.cc
test/regress/Makefile.tests
test/regress/regress0/push-pop/issue2137.min.smt2 [new file with mode: 0644]