Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
Statistics.cpp
Go to the documentation of this file.
2
4
5namespace storm {
6namespace modelchecker {
7namespace exploration_detail {
8
9template<typename StateType, typename ValueType>
11 : pathsSampled(0),
12 pathsSampledSinceLastPrecomputation(0),
13 explorationSteps(0),
14 explorationStepsSinceLastPrecomputation(0),
15 maxPathLength(0),
16 numberOfTargetStates(0),
17 numberOfExploredStates(0),
18 numberOfPrecomputations(0),
19 ecDetections(0),
20 failedEcDetections(0),
21 totalNumberOfEcDetected(0) {
22 // Intentionally left empty.
23}
24
25template<typename StateType, typename ValueType>
27 ++explorationSteps;
28 ++explorationStepsSinceLastPrecomputation;
29}
30
31template<typename StateType, typename ValueType>
33 ++pathsSampled;
34 ++pathsSampledSinceLastPrecomputation;
35}
36
37template<typename StateType, typename ValueType>
38void Statistics<StateType, ValueType>::updateMaxPathLength(std::size_t const& currentPathLength) {
39 maxPathLength = std::max(maxPathLength, currentPathLength);
40}
41
42template<typename StateType, typename ValueType>
43void Statistics<StateType, ValueType>::printToStream(std::ostream& out, ExplorationInformation<StateType, ValueType> const& explorationInformation) const {
44 out << "\nExploration statistics:\n";
45 out << "Discovered states: " << explorationInformation.getNumberOfDiscoveredStates() << " (" << numberOfExploredStates << " explored, "
46 << explorationInformation.getNumberOfUnexploredStates() << " unexplored, " << numberOfTargetStates << " target)\n";
47 out << "Exploration steps: " << explorationSteps << '\n';
48 out << "Sampled paths: " << pathsSampled << '\n';
49 out << "Maximal path length: " << maxPathLength << '\n';
50 out << "Precomputations: " << numberOfPrecomputations << '\n';
51 out << "EC detections: " << ecDetections << " (" << failedEcDetections << " failed, " << totalNumberOfEcDetected << " EC(s) detected)\n";
52}
53
54template struct Statistics<uint32_t, double>;
55
56} // namespace exploration_detail
57} // namespace modelchecker
58} // namespace storm
LabParser.cpp.
Definition cli.cpp:18
void printToStream(std::ostream &out, ExplorationInformation< StateType, ValueType > const &explorationInformation) const
void updateMaxPathLength(std::size_t const &currentPathLength)