21 #include <spot/misc/common.hh>
22 #include <spot/misc/ltstr.hh>
42 get(
const char* str)
const
44 auto i =
stats.find(str);
45 SPOT_ASSERT(i !=
stats.end());
46 return (this->*i->second)();
52 typedef std::map<const char*, unsigned_fun, char_ptr_less_than>
stats_map;
65 : states_(0), transitions_(0), depth_(0), max_depth_(0)
69 stats[
"transitions"] =
103 if (depth_ > max_depth_)
111 SPOT_ASSERT(depth_ >= n);
145 unsigned transitions_;
159 : prefix_states_(0), cycle_states_(0)
161 stats[
"(non unique) states for prefix"] =
164 stats[
"(non unique) states for cycle"] =
180 return prefix_states_;
194 return cycle_states_;
198 unsigned prefix_states_;
199 unsigned cycle_states_;
212 stats[
"search space states"] =
Accepting Cycle Search Space statistics.
Definition: emptiness_stats.hh:208
virtual unsigned acss_states() const =0
Number of states in the search space for the accepting cycle.
Accepting Run Search statistics.
Definition: emptiness_stats.hh:156
unsigned ars_prefix_states() const
Return the number of prefix states visited.
Definition: emptiness_stats.hh:178
void inc_ars_prefix_states()
Increment the count of prefix states visited.
Definition: emptiness_stats.hh:171
unsigned ars_cycle_states() const
Return the number of cycle states visited.
Definition: emptiness_stats.hh:192
void inc_ars_cycle_states()
Increment the count of cycle states visited.
Definition: emptiness_stats.hh:185
Emptiness-check statistics.
Definition: emptiness_stats.hh:62
unsigned transitions() const
Return the number of visited transitions.
Definition: emptiness_stats.hh:124
void inc_transitions()
Increment the number of visited transitions.
Definition: emptiness_stats.hh:93
unsigned depth() const
Return the current DFS depth.
Definition: emptiness_stats.hh:138
void inc_states()
Increment the number of visited states.
Definition: emptiness_stats.hh:86
void set_states(unsigned n)
Set the number of visited states.
Definition: emptiness_stats.hh:79
unsigned max_depth() const
Return the maximum DFS depth reached.
Definition: emptiness_stats.hh:131
unsigned states() const
Return the number of visited states.
Definition: emptiness_stats.hh:117
void dec_depth(unsigned n=1)
Decrease the current DFS depth by n.
Definition: emptiness_stats.hh:109
void inc_depth(unsigned n=1)
Increase the current DFS depth by n.
Definition: emptiness_stats.hh:100
Definition: automata.hh:26
Interface for retrieving unsigned integer statistics from an emptiness check.
Definition: emptiness_stats.hh:34
unsigned get(const char *str) const
Retrieve a named statistic by its key.
Definition: emptiness_stats.hh:42
std::map< const char *, unsigned_fun, char_ptr_less_than > stats_map
Map from statistic names to getter function pointers.
Definition: emptiness_stats.hh:52
stats_map stats
Map of available statistics.
Definition: emptiness_stats.hh:53
unsigned(unsigned_statistics::* unsigned_fun)() const
Function pointer type for unsigned statistics getters.
Definition: emptiness_stats.hh:50