spot  1.99.4a
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
spot::stats_dfs Class Reference
Inheritance diagram for spot::stats_dfs:
Inheritance graph
Collaboration diagram for spot::stats_dfs:
Collaboration graph

Public Member Functions

 stats_dfs (const const_twa_ptr &a, tgba_statistics &s, proviso &proviso, bool dotty=false)
 
void process_state (const state *s, int n, twa_succ_iterator *it)
 
bool will_pop_state (const state *, int n, twa_succ_iterator *it)
 
void process_link (const state *, int src, const state *, int dst, const twa_succ_iterator *it)
 
void start ()
 Called by run() before starting its iteration. More...
 
void end ()
 Called by run() once all states have been explored. More...
 
void dump ()
 
virtual void run ()
 Iterate over all reachable states of a spot::tgba. More...
 
virtual bool want_state (const state *s) const
 

Protected Types

typedef std::unordered_map< const state *, int, state_ptr_hash, state_ptr_equalseen_map
 

Protected Member Functions

virtual void push (const state *s, int sn)
 Push a new state in todo. More...
 
virtual void pop ()
 Pop the DFS stack. More...
 

Protected Attributes

const_twa_ptr aut_
 The spot::tgba to explore. More...
 
seen_map seen
 States already seen. More...
 
std::deque< stack_itemtodo
 the DFS stack More...
 

Member Function Documentation

void spot::stats_dfs::end ( )
inlinevirtual

Called by run() once all states have been explored.

Reimplemented from spot::tgba_reachable_iterator_depth_first.

virtual void spot::tgba_reachable_iterator_depth_first::pop ( )
protectedvirtualinherited

Pop the DFS stack.

Reimplemented in spot::tgba_reachable_iterator_depth_first_stack.

void spot::stats_dfs::process_link ( const state in_s,
int  in,
const state out_s,
int  out,
const twa_succ_iterator si 
)
inlinevirtual

Called by run() to process a transition.

Parameters
in_sThe source state
inThe source state number.
out_sThe destination state
outThe destination state number.
siThe spot::twa_succ_iterator positionned on the current transition.

The in_s and out_s states are owned by the spot::tgba_reachable_iterator instance and destroyed when the instance is destroyed.

Reimplemented from spot::tgba_reachable_iterator_depth_first.

References spot::twa_succ_iterator::fire_all().

void spot::stats_dfs::process_state ( const state s,
int  n,
twa_succ_iterator si 
)
inlinevirtual

Called by run() to process a state.

Parameters
sThe current state.
nA unique number assigned to s.
siThe spot::twa_succ_iterator for s.

Reimplemented from spot::tgba_reachable_iterator_depth_first.

References spot::twa_succ_iterator::all_enabled(), and spot::twa_succ_iterator::fire_all().

virtual void spot::tgba_reachable_iterator_depth_first::push ( const state s,
int  sn 
)
protectedvirtualinherited

Push a new state in todo.

Reimplemented in spot::tgba_reachable_iterator_depth_first_stack.

virtual void spot::tgba_reachable_iterator_depth_first::run ( )
virtualinherited

Iterate over all reachable states of a spot::tgba.

This is a template method that will call start(), end(), want_state(), process_state(), and process_link(), while it iterates over states.

void spot::stats_dfs::start ( )
inlinevirtual

Called by run() before starting its iteration.

Reimplemented from spot::tgba_reachable_iterator_depth_first.

virtual bool spot::tgba_reachable_iterator_depth_first::want_state ( const state s) const
virtualinherited

Called by add_state or next_states implementations to filter states. Default implementation always return true.

bool spot::stats_dfs::will_pop_state ( const state s,
int  n,
twa_succ_iterator si 
)
inlinevirtual

Called by run() to process a state before it is popped. It this method return true the state will be popped, otherwise the state will not be popped. In this case the iterator must be set to a valid position (other than end()). So if this method return false, the iterator must be change. Typically this happen during model checking with partial order reductions.

Parameters
sThe current state.
nA unique number assigned to s.
siThe spot::tgba_succ_iterator for s.

Reimplemented from spot::tgba_reachable_iterator_depth_first.

References spot::twa_succ_iterator::done(), spot::twa_succ_iterator::fire_all(), and spot::twa_succ_iterator::next().

Member Data Documentation

const_twa_ptr spot::tgba_reachable_iterator_depth_first::aut_
protectedinherited

The spot::tgba to explore.

seen_map spot::tgba_reachable_iterator_depth_first::seen
protectedinherited

States already seen.

std::deque<stack_item> spot::tgba_reachable_iterator_depth_first::todo
protectedinherited

the DFS stack


The documentation for this class was generated from the following file:

Please direct any question, comment, or bug report to the Spot mailing list at spot@lrde.epita.fr.
Generated on Sun Oct 11 2015 10:50:09 for spot by doxygen 1.8.9.1