3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-23 09:05:31 +00:00

fix proof generation for unit resolution. Issue #691

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2016-07-20 11:54:39 -07:00
parent 6559fd817d
commit 5f39c4371c
3 changed files with 10 additions and 6 deletions

View file

@ -2991,7 +2991,10 @@ proof * ast_manager::mk_unit_resolution(unsigned num_proofs, proof * const * pro
for (unsigned i = 0; i < num_proofs; i++) tout << mk_pp(get_fact(proofs[i]), *this) << "\n";
tout << "===>\n";
tout << mk_pp(new_fact, *this) << "\n";);
SASSERT(num_proofs == cls_sz || (num_proofs == cls_sz + 1 && is_false(new_fact)));
//
// typically: num_proofs == cls_sz || (num_proofs == cls_sz + 1 && is_false(new_fact))
// but formula could have repeated literals that are merged in the clausal representation.
//
unsigned num_matches = 0;
for (unsigned i = 0; i < cls_sz; i++) {
expr * lit = cls->get_arg(i);