Commit 40c4476c authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz
Browse files

Keep track of the number of inclusions detected in ssp_semi

parent 35bf9b53
2008-08-18 Alexandre Duret-Lutz <adl@lrde.epita.fr>
* iface/gspn/ssp.cc (numbered_state_heap_ssp_semi): Keep track
of the number of inclusions detected.
2008-08-07 Alexandre Duret-Lutz <adl@lrde.epita.fr> 2008-08-07 Alexandre Duret-Lutz <adl@lrde.epita.fr>
* bench/gspn-ssp/Makefile.am, bench/gspn-ssp/trans2prop.pl: New files. * bench/gspn-ssp/Makefile.am, bench/gspn-ssp/trans2prop.pl: New files.
......
...@@ -657,6 +657,11 @@ namespace spot ...@@ -657,6 +657,11 @@ namespace spot
class numbered_state_heap_ssp_semi : public numbered_state_heap class numbered_state_heap_ssp_semi : public numbered_state_heap
{ {
public: public:
numbered_state_heap_ssp_semi()
: numbered_state_heap(), inclusions(0)
{
}
virtual virtual
~numbered_state_heap_ssp_semi() ~numbered_state_heap_ssp_semi()
{ {
...@@ -700,7 +705,10 @@ namespace spot ...@@ -700,7 +705,10 @@ namespace spot
if (old_state->left() if (old_state->left()
&& new_state->left() && new_state->left()
&& spot_inclusion(new_state->left(), old_state->left())) && spot_inclusion(new_state->left(), old_state->left()))
break; {
++inclusions;
break;
}
} }
if (j != l.end()) if (j != l.end())
{ {
...@@ -772,7 +780,10 @@ namespace spot ...@@ -772,7 +780,10 @@ namespace spot
if (old_state->left() if (old_state->left()
&& new_state->left() && new_state->left()
&& spot_inclusion(new_state->left(), old_state->left())) && spot_inclusion(new_state->left(), old_state->left()))
break; {
++inclusions;
break;
}
} }
if (j != l.end()) if (j != l.end())
{ {
...@@ -897,6 +908,8 @@ namespace spot ...@@ -897,6 +908,8 @@ namespace spot
friend class numbered_state_heap_ssp_const_iterator; friend class numbered_state_heap_ssp_const_iterator;
friend class couvreur99_check_shy_ssp; friend class couvreur99_check_shy_ssp;
friend class couvreur99_check_shy_semi_ssp; friend class couvreur99_check_shy_semi_ssp;
mutable unsigned inclusions;
}; };
...@@ -1250,27 +1263,41 @@ namespace spot ...@@ -1250,27 +1263,41 @@ namespace spot
: couvreur99_check_shy(a, : couvreur99_check_shy(a,
option_map(), option_map(),
numbered_state_heap_ssp_factory_semi::instance()), numbered_state_heap_ssp_factory_semi::instance()),
inclusion_count(0) find_count(0)
{ {
onepass_ = true; onepass_ = true;
stats["find_state count"] = stats["find_state count"] =
static_cast<spot::unsigned_statistics::unsigned_fun> static_cast<spot::unsigned_statistics::unsigned_fun>
(&couvreur99_check_shy_semi_ssp::get_inclusion_count); (&couvreur99_check_shy_semi_ssp::get_find_count);
stats["contained map size"] = stats["contained map size"] =
static_cast<spot::unsigned_statistics::unsigned_fun> static_cast<spot::unsigned_statistics::unsigned_fun>
(&couvreur99_check_shy_semi_ssp::get_contained_map_size); (&couvreur99_check_shy_semi_ssp::get_contained_map_size);
stats["inclusion count"] =
static_cast<spot::unsigned_statistics::unsigned_fun>
(&couvreur99_check_shy_semi_ssp::get_inclusion_count);
//dynamic_cast<numbered_state_heap_ssp_semi*>(ecs_->h)->stats = this;
} }
private: private:
unsigned inclusion_count; unsigned find_count;
protected: protected:
unsigned
get_find_count() const
{
return find_count;
};
unsigned unsigned
get_inclusion_count() const get_inclusion_count() const
{ {
return inclusion_count; return
dynamic_cast<numbered_state_heap_ssp_semi*>(ecs_->h)->inclusions;
}; };
unsigned unsigned
get_contained_map_size() const get_contained_map_size() const
{ {
...@@ -1281,7 +1308,7 @@ namespace spot ...@@ -1281,7 +1308,7 @@ namespace spot
virtual numbered_state_heap::state_index_p virtual numbered_state_heap::state_index_p
find_state(const state* s) find_state(const state* s)
{ {
++inclusion_count; ++find_count;
return couvreur99_check_shy::find_state(s); return couvreur99_check_shy::find_state(s);
} }
}; };
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment