mirror of
https://github.com/Z3Prover/z3
synced 2025-04-06 17:44:08 +00:00
The proof validator based on SMT format proof logs uses RUP to check propositional inferences and has plugins for theory axioms/lemmas.
51 lines
1.1 KiB
C++
51 lines
1.1 KiB
C++
/*++
|
|
Copyright (c) 2020 Microsoft Corporation
|
|
|
|
Module Name:
|
|
|
|
euf_proof_checker.cpp
|
|
|
|
Abstract:
|
|
|
|
Plugin manager for checking EUF proofs
|
|
|
|
Author:
|
|
|
|
Nikolaj Bjorner (nbjorner) 2020-08-25
|
|
|
|
--*/
|
|
|
|
#include "ast/ast_pp.h"
|
|
#include "sat/smt/euf_proof_checker.h"
|
|
#include "sat/smt/arith_proof_checker.h"
|
|
|
|
namespace euf {
|
|
|
|
proof_checker::proof_checker(ast_manager& m):
|
|
m(m) {
|
|
arith::proof_checker* apc = alloc(arith::proof_checker, m);
|
|
m_plugins.push_back(apc);
|
|
apc->register_plugins(*this);
|
|
(void)m;
|
|
}
|
|
|
|
proof_checker::~proof_checker() {}
|
|
|
|
void proof_checker::register_plugin(symbol const& rule, proof_checker_plugin* p) {
|
|
m_map.insert(rule, p);
|
|
}
|
|
|
|
bool proof_checker::check(expr_ref_vector const& clause, expr* e, expr_ref_vector& units) {
|
|
if (!e || !is_app(e))
|
|
return false;
|
|
units.reset();
|
|
app* a = to_app(e);
|
|
proof_checker_plugin* p = nullptr;
|
|
if (m_map.find(a->get_decl()->get_name(), p))
|
|
return p->check(clause, a, units);
|
|
return false;
|
|
}
|
|
|
|
}
|
|
|