spot  1.2.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Protected Types | Protected Attributes | List of all members
spot::saba_reachable_iterator_depth_first Class Reference

An implementation of spot::saba_reachable_iterator that browses states depth first. More...

#include <sabaalgos/sabareachiter.hh>

Inheritance diagram for spot::saba_reachable_iterator_depth_first:
Inheritance graph
Collaboration diagram for spot::saba_reachable_iterator_depth_first:
Collaboration graph

Public Member Functions

 saba_reachable_iterator_depth_first (const saba *a)
 
virtual void add_state (const saba_state *s)
 
virtual const saba_statenext_state ()
 Called by run() to obtain the next state to process. More...
 
void run ()
 Iterate over all reachable states of a spot::saba. More...
 
virtual bool want_state (const saba_state *s) const
 
virtual void start ()
 Called by run() before starting its iteration. More...
 
virtual void end ()
 Called by run() once all states have been explored. More...
 
virtual void process_state (const saba_state *s, int n)
 
virtual void process_state_conjunction (const saba_state *in_s, int in, const saba_state_conjunction *sc, int sc_id, const saba_succ_iterator *si)
 
virtual void process_link (const saba_state *in_s, int in, const saba_state *out_s, int out, const saba_state_conjunction *sc, int sc_id, const saba_succ_iterator *si)
 

Protected Types

typedef Sgi::hash_map< const
saba_state *, int,
saba_state_ptr_hash,
saba_state_ptr_equal
seen_map
 

Protected Attributes

std::stack< const saba_state * > todo
 A stack of states yet to explore. More...
 
const sabaautomata_
 The spot::saba to explore. More...
 
seen_map seen
 States already seen. More...
 

Detailed Description

An implementation of spot::saba_reachable_iterator that browses states depth first.

Member Function Documentation

virtual void spot::saba_reachable_iterator::end ( )
virtualinherited

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

virtual const saba_state* spot::saba_reachable_iterator_depth_first::next_state ( )
virtual

Called by run() to obtain the next state to process.

Implements spot::saba_reachable_iterator.

virtual void spot::saba_reachable_iterator::process_link ( const saba_state in_s,
int  in,
const saba_state out_s,
int  out,
const saba_state_conjunction sc,
int  sc_id,
const saba_succ_iterator si 
)
virtualinherited

Called by run() to process a transition.

Parameters
in_sThe source state
inThe source state number.
out_sThe destination state
outThe destination state number.
scThe spot::saba_state_conjunction positionned on the current conjunction.
sc_idAn unique number for the this transition assigned to sc.
siThe spot::saba_succ_iterator positionned on the current transition.

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

virtual void spot::saba_reachable_iterator::process_state ( const saba_state s,
int  n 
)
virtualinherited

Called by run() to process a state.

Parameters
sThe current state.
nA unique number assigned to s.
virtual void spot::saba_reachable_iterator::process_state_conjunction ( const saba_state in_s,
int  in,
const saba_state_conjunction sc,
int  sc_id,
const saba_succ_iterator si 
)
virtualinherited

Called by run() to process a conjunction of states.

Parameters
in_sThe current state.
inAn unique number assigned to in_s.
scThe spot::saba_state_conjunction positionned on the current conjunction.
sc_idAn unique number for the this transition assigned to sc.
siThe spot::saba_succ_iterator positionned on the current transition.
void spot::saba_reachable_iterator::run ( )
inherited

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

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

virtual void spot::saba_reachable_iterator::start ( )
virtualinherited

Called by run() before starting its iteration.

virtual bool spot::saba_reachable_iterator::want_state ( const saba_state s) const
virtualinherited

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

Member Data Documentation

const saba* spot::saba_reachable_iterator::automata_
protectedinherited

The spot::saba to explore.

seen_map spot::saba_reachable_iterator::seen
protectedinherited

States already seen.

std::stack<const saba_state*> spot::saba_reachable_iterator_depth_first::todo
protected

A stack of states yet to explore.


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 Thu May 15 2014 11:04:11 for spot by doxygen 1.8.4