3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-08 18:31:49 +00:00

fix debugging code in ast.cpp to take into account that literals may be repeated

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2016-01-11 11:04:44 -08:00
parent a156028d82
commit 79a5b133d7

View file

@ -2866,22 +2866,24 @@ proof * ast_manager::mk_unit_resolution(unsigned num_proofs, proof * const * pro
svector<bool> found;
#endif
for (unsigned i = 0; i < num_args; i++) {
bool found_complement = false;
expr * lit = cls->get_arg(i);
unsigned j = 1;
for (; j < num_proofs; j++) {
for (unsigned j = 1; j < num_proofs; j++) {
expr const * _fact = get_fact(proofs[j]);
if (is_complement(lit, _fact)) {
DEBUG_CODE(found.setx(j, true, false););
found_complement = true;
DEBUG_CODE(found.setx(j, true, false); continue;);
break;
}
}
if (j == num_proofs)
if (!found_complement)
new_lits.push_back(lit);
}
DEBUG_CODE({
for (unsigned i = 1; m_proof_mode == PGM_FINE && i < num_proofs; i++) {
CTRACE("mk_unit_resolution_bug", !found.get(i, false),
for (unsigned j = 0; j < num_proofs; j++) {
if (j == i) tout << "Index " << i << " was not found:\n";
tout << mk_ll_pp(get_fact(proofs[j]), *this);
});
SASSERT(found.get(i, false));