diff options
author | Andres Noetzli <andres.noetzli@gmail.com> | 2019-03-13 22:47:04 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-13 22:47:04 +0000 |
commit | b574ccf82270f8887d2d697c537c591ff4ab68a2 (patch) | |
tree | eaecd85977bda2808e06618b981d16b60e2f5639 /src/proof/proof_manager.cpp | |
parent | 68174dedcb4bf9d91241585ab1cc876d2fa83d62 (diff) |
Add statistics for proof gen./checking time, size (#2850)
This commit adds a statistic that records the total size of all proofs
generated by an instance of `SmtEngine`. The commit also moves
`SmtEngine::checkProof()` into `smt_engine.cpp` because it needs to know
the complete type of `d_stats` (and the separate file for that method
didn't seem that useful). Additionally, it changes
`smt::SmtEngine::checkProofTime` to `smt::SmtEngine::lfscCheckProofTime`
that only measures the time spent in LFSC and adds a statistic
`proof::ProofManager::proofProductionTime` that measures the proof
production time separately (also works with `get-proof`/`--dump-proof`).
Diffstat (limited to 'src/proof/proof_manager.cpp')
-rw-r--r-- | src/proof/proof_manager.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/proof/proof_manager.cpp b/src/proof/proof_manager.cpp index 9878972bf..5f0ade86a 100644 --- a/src/proof/proof_manager.cpp +++ b/src/proof/proof_manager.cpp @@ -30,6 +30,7 @@ #include "proof/theory_proof.h" #include "smt/smt_engine.h" #include "smt/smt_engine_scope.h" +#include "smt/smt_statistics_registry.h" #include "smt_util/node_visitor.h" #include "theory/arrays/theory_arrays.h" #include "theory/output_channel.h" @@ -559,6 +560,9 @@ void LFSCProof::toStream(std::ostream& out, const ProofLetMap& map) const void LFSCProof::toStream(std::ostream& out) const { + TimerStat::CodeTimer proofProductionTimer( + *ProofManager::currentPM()->getProofProductionTime()); + Assert(!d_satProof->proofConstructed()); d_satProof->constructProof(); @@ -1069,4 +1073,16 @@ void ProofManager::printTrustedTerm(Node term, tpe->printTheoryTerm(term.toExpr(), os, globalLetMap); if (tpe->printsAsBool(term)) os << ")"; } + +ProofManager::ProofManagerStatistics::ProofManagerStatistics() + : d_proofProductionTime("proof::ProofManager::proofProductionTime") +{ + smtStatisticsRegistry()->registerStat(&d_proofProductionTime); +} + +ProofManager::ProofManagerStatistics::~ProofManagerStatistics() +{ + smtStatisticsRegistry()->unregisterStat(&d_proofProductionTime); +} + } /* CVC4 namespace */ |