[proofs] [sat] Have SAT solver communicate whether it has optimized the assertion...
authorHaniel Barbosa <hanielbbarbosa@gmail.com>
Fri, 25 Mar 2022 21:25:04 +0000 (18:25 -0300)
committerGitHub <noreply@github.com>
Fri, 25 Mar 2022 21:25:04 +0000 (21:25 +0000)
commitca9b88f79611caed3e03c64a64b96ec65ea62dfa
treee6dad6ac11f650b4b74d6daa67a9d2a5beb8c0d8
parentbc7d8b4922e37abf128c36136cede86048b420eb
[proofs] [sat] Have SAT solver communicate whether it has optimized the assertion level of a clause (#8399)

This way both the SAT proof manager and the Proof Cnf Stream can properly track
proofs for clauses added at assertion levels below their original user level.

This commit, besides some minor tweaks, adds the hooks in the places where
a clause can be created with an optimized level and we need to track:

when the explanation of a propagation is requested
when a clause/lemma is added
when a lemma is added (from the backlog of lemmas added when Minisat was busy)
For clauses derived via resolution, this information is computed directly in the SAT proof manager.

This commit also reverts a change from #7790 where whether to optimize clauses was computed only once for the SAT solver. This cannot be the case because between different check-sat calls the state can change.

Finally, this commit enables proofs for several regressions that were previously incompatible with proofs. Since now proofs are compatible with optimizing the level of clauses during incremental solving, this commit should lead to performance improvements.

Fixes cvc5/cvc5-projects#314
src/prop/minisat/core/Solver.cc
src/prop/minisat/core/Solver.h
src/prop/proof_post_processor.cpp
src/prop/prop_engine.cpp
src/prop/sat_proof_manager.cpp
test/regress/cli/regress0/cores/issue3455.smt2
test/regress/cli/regress0/cores/issue4925.smt2
test/regress/cli/regress1/push-pop/fuzz_3_1.smt2
test/regress/cli/regress1/push-pop/fuzz_3_11.smt2
test/regress/cli/regress1/push-pop/fuzz_3_9.smt2