spot  2.11.4
Public Member Functions | Protected Attributes | List of all members
spot::twa_reachable_iterator Class Referenceabstract

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

#include <spot/twaalgos/reachiter.hh>

Inheritance diagram for spot::twa_reachable_iterator:
Collaboration diagram for spot::twa_reachable_iterator:

Public Member Functions

 twa_reachable_iterator (const const_twa_ptr &a)
 
virtual void run ()
 Iterate over all reachable states of a spot::tgba. More...
 
virtual bool want_state (const 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 state *s, int n, twa_succ_iterator *si)
 
virtual void process_link (const state *in_s, int in, const state *out_s, int out, const twa_succ_iterator *si)
 
Todo list management.

Called by run() to register newly discovered states.

See e.g. spot::twa_reachable_iterator_breadth_first for precanned implementations for these functions.

virtual void add_state (const state *s)=0
 Called by run() to obtain the next state to process. More...
 
virtual const statenext_state ()=0
 Called by run() to obtain the next state to process. More...
 

Protected Attributes

const_twa_ptr aut_
 The spot::tgba to explore. More...
 
state_map< int > seen
 States already seen. More...
 

Detailed Description

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

Member Function Documentation

◆ add_state()

virtual void spot::twa_reachable_iterator::add_state ( const state s)
pure virtual

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

Implemented in spot::twa_reachable_iterator_breadth_first.

◆ end()

virtual void spot::twa_reachable_iterator::end ( )
virtual

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

◆ next_state()

virtual const state* spot::twa_reachable_iterator::next_state ( )
pure virtual

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

Implemented in spot::twa_reachable_iterator_breadth_first.

◆ process_link()

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

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::twa_reachable_iterator instance and destroyed when the instance is destroyed.

◆ process_state()

virtual void spot::twa_reachable_iterator::process_state ( const state s,
int  n,
twa_succ_iterator si 
)
virtual

Called by run() to process a state.

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

◆ run()

virtual void spot::twa_reachable_iterator::run ( )
virtual

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

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

◆ start()

virtual void spot::twa_reachable_iterator::start ( )
virtual

Called by run() before starting its iteration.

◆ want_state()

virtual bool spot::twa_reachable_iterator::want_state ( const state s) const
virtual

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

Member Data Documentation

◆ aut_

const_twa_ptr spot::twa_reachable_iterator::aut_
protected

The spot::tgba to explore.

◆ seen

state_map<int> spot::twa_reachable_iterator::seen
protected

States already seen.


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 Fri Feb 27 2015 10:00:07 for spot by doxygen 1.9.1