blob: 88b8e20ef8ab9e060e72d54967dff0e96d3bfac8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
/******************************************************************************
* Top contributors (to current version):
* Andrew Reynolds, Haniel Barbosa, Gereon Kremer
*
* This file is part of the cvc5 project.
*
* Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
* in the top-level source directory and their institutional affiliations.
* All rights reserved. See the file COPYING in the top-level source
* directory for licensing information.
* ****************************************************************************
*
* The module for final processing proof nodes.
*/
#include "cvc5_private.h"
#ifndef CVC5__SMT__PROOF_FINAL_CALLBACK_H
#define CVC5__SMT__PROOF_FINAL_CALLBACK_H
#include <map>
#include <sstream>
#include <unordered_set>
#include "proof/proof_node_updater.h"
#include "theory/inference_id.h"
#include "util/statistics_stats.h"
namespace cvc5 {
namespace smt {
/** Final callback class, for stats and pedantic checking */
class ProofFinalCallback : public ProofNodeUpdaterCallback
{
public:
ProofFinalCallback(ProofNodeManager* pnm);
/**
* Initialize, called once for each new ProofNode to process. This initializes
* static information to be used by successive calls to update.
*/
void initializeUpdate();
/** Should proof pn be updated? Returns false, adds to stats. */
bool shouldUpdate(std::shared_ptr<ProofNode> pn,
const std::vector<Node>& fa,
bool& continueUpdate) override;
/** was pedantic failure */
bool wasPedanticFailure(std::ostream& out) const;
private:
/** Counts number of postprocessed proof nodes for each kind of proof rule */
HistogramStat<PfRule> d_ruleCount;
/**
* Counts number of postprocessed proof nodes of rule INSTANTIATE that were
* marked with the given inference id.
*/
HistogramStat<theory::InferenceId> d_instRuleIds;
/** Total number of postprocessed rule applications */
IntStat d_totalRuleCount;
/** The minimum pedantic level of any rule encountered */
IntStat d_minPedanticLevel;
/** The total number of final proofs */
IntStat d_numFinalProofs;
/** Proof node manager (used for pedantic checking) */
ProofNodeManager* d_pnm;
/** Was there a pedantic failure? */
bool d_pedanticFailure;
/** The pedantic failure string for debugging */
std::stringstream d_pedanticFailureOut;
};
} // namespace smt
} // namespace cvc5
#endif
|