3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-06-19 12:23:38 +00:00

proof-checker: replace match_negated with ast_manager::is_complement

is_complement matches true and false, while match_negated does not

Necessary to handle uses of true-axiom
This commit is contained in:
Arie Gurfinkel 2018-05-21 10:45:07 -07:00
parent 9550fd1ec4
commit 6514741e3f

View file

@ -1,4 +1,3 @@
/*++ /*++
Copyright (c) 2015 Microsoft Corporation Copyright (c) 2015 Microsoft Corporation
@ -550,7 +549,7 @@ bool proof_checker::check1_basic(proof* p, expr_ref_vector& side_conditions) {
proofs.size() == 2 && proofs.size() == 2 &&
match_fact(proofs[0].get(), fml1) && match_fact(proofs[0].get(), fml1) &&
match_fact(proofs[1].get(), fml2) && match_fact(proofs[1].get(), fml2) &&
match_negated(fml1.get(), fml2.get()) && m.is_complement(fml1.get(), fml2.get()) &&
m.is_false(fact.get())) { m.is_false(fact.get())) {
return true; return true;
} }
@ -564,7 +563,7 @@ bool proof_checker::check1_basic(proof* p, expr_ref_vector& side_conditions) {
} }
bool found = false; bool found = false;
for (unsigned j = 0; !found && j < terms1.size(); ++j) { for (unsigned j = 0; !found && j < terms1.size(); ++j) {
if (match_negated(terms1.get(j), fml2)) { if (m.is_complement(terms1.get(j), fml2)) {
found = true; found = true;
if (j + 1 < terms1.size()) { if (j + 1 < terms1.size()) {
terms1[j] = terms1.get(terms1.size()-1); terms1[j] = terms1.get(terms1.size()-1);