* src/tgbaalgos/emptinesscheck.cc (emptiness_check::h_filt,

emptiness_check::~emptiness_check) New methods.
(emptiness_check::check): Release all iterators in todo on exit.
(emptiness_check::counter_example): Rewrite the BFS logic.
* src/tgbaalgos/emptinesscheck.hh (emptiness_check::h_filt,
emptiness_check::~emptiness_check): New methods.
This commit is contained in:
Alexandre Duret-Lutz 2003-10-27 10:51:53 +00:00
parent 0ae540ac2a
commit dd720e9785
3 changed files with 110 additions and 78 deletions

View file

@ -60,6 +60,7 @@ namespace spot
typedef std::list<state_proposition> cycle_path;
public:
emptiness_check(const tgba* a);
~emptiness_check();
/// This function returns true if the automata's language is empty,
/// and builds a stack of SCC.
@ -81,6 +82,13 @@ namespace spot
state_ptr_hash, state_ptr_equal> hash_type;
hash_type h; ///< Map of visited states.
/// \brief Return a state which is equal to \a s, but is in \c h,
/// and free \a s if it is different. Doing so simplify memory
/// management, because we don't have to track which state need
/// to be kept or deallocated: all key in \c h should last for
/// the whole life of the emptiness_check.
const state* h_filt(const state* s) const;
/// \brief Remove a strongly component from the hash.
///
/// This function remove all accessible state from a given