3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-24 01:25:31 +00:00

wip - proof checker

This commit is contained in:
Nikolaj Bjorner 2022-10-12 09:34:45 +02:00
parent ace727ee0f
commit a2e0646eed
3 changed files with 16 additions and 13 deletions

View file

@ -293,17 +293,13 @@ namespace euf {
}
bool proof_checker::check(expr* e) {
if (m_checked_clauses.contains(e))
return true;
if (!e || !is_app(e))
return false;
if (m_checked_clauses.contains(e))
return true;
app* a = to_app(e);
proof_checker_plugin* p = nullptr;
if (!m_map.find(a->get_decl()->get_name(), p))
return false;
if (!p->check(a))
return false;
return true;
return m_map.find(a->get_decl()->get_name(), p) && p->check(a);
}
expr_ref_vector proof_checker::clause(expr* e) {

View file

@ -234,9 +234,15 @@ namespace tseitin {
bool proof_checker::equiv(expr* a, expr* b) {
if (a == b)
return true;
expr* x, *y, *z, *u;
if (m.is_eq(a, x, y) && m.is_eq(b, z, u))
return x == u && y == z;
return false;
if (!is_app(a) || !is_app(b))
return false;
if (to_app(a)->get_decl() != to_app(b)->get_decl())
return false;
if (!to_app(a)->get_decl()->is_commutative())
return false;
if (to_app(a)->get_num_args() != 2)
return false;
return to_app(a)->get_arg(0) == to_app(b)->get_arg(1) &&
to_app(a)->get_arg(1) == to_app(b)->get_arg(0);
}
}