mirror of
https://github.com/Z3Prover/z3
synced 2025-06-29 09:28:45 +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:
parent
a156028d82
commit
79a5b133d7
1 changed files with 6 additions and 4 deletions
|
@ -2866,22 +2866,24 @@ proof * ast_manager::mk_unit_resolution(unsigned num_proofs, proof * const * pro
|
||||||
svector<bool> found;
|
svector<bool> found;
|
||||||
#endif
|
#endif
|
||||||
for (unsigned i = 0; i < num_args; i++) {
|
for (unsigned i = 0; i < num_args; i++) {
|
||||||
|
bool found_complement = false;
|
||||||
expr * lit = cls->get_arg(i);
|
expr * lit = cls->get_arg(i);
|
||||||
unsigned j = 1;
|
for (unsigned j = 1; j < num_proofs; j++) {
|
||||||
for (; j < num_proofs; j++) {
|
|
||||||
expr const * _fact = get_fact(proofs[j]);
|
expr const * _fact = get_fact(proofs[j]);
|
||||||
if (is_complement(lit, _fact)) {
|
if (is_complement(lit, _fact)) {
|
||||||
DEBUG_CODE(found.setx(j, true, false););
|
found_complement = true;
|
||||||
|
DEBUG_CODE(found.setx(j, true, false); continue;);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (j == num_proofs)
|
if (!found_complement)
|
||||||
new_lits.push_back(lit);
|
new_lits.push_back(lit);
|
||||||
}
|
}
|
||||||
DEBUG_CODE({
|
DEBUG_CODE({
|
||||||
for (unsigned i = 1; m_proof_mode == PGM_FINE && i < num_proofs; i++) {
|
for (unsigned i = 1; m_proof_mode == PGM_FINE && i < num_proofs; i++) {
|
||||||
CTRACE("mk_unit_resolution_bug", !found.get(i, false),
|
CTRACE("mk_unit_resolution_bug", !found.get(i, false),
|
||||||
for (unsigned j = 0; j < num_proofs; j++) {
|
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);
|
tout << mk_ll_pp(get_fact(proofs[j]), *this);
|
||||||
});
|
});
|
||||||
SASSERT(found.get(i, false));
|
SASSERT(found.get(i, false));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue