Iterate over all states of an automaton using a DFS.
More...
#include <twaalgos/reachiter.hh>
Iterate over all states of an automaton using a DFS.
This variant also maintains a set of states that are on the DFS stack. It can be checked using the on_stack() method.
virtual void spot::tgba_reachable_iterator_depth_first::end |
( |
| ) |
|
|
virtualinherited |
bool spot::tgba_reachable_iterator_depth_first_stack::on_stack |
( |
int |
sn | ) |
const |
Whether state sn is on the DFS stack.
Note the destination state of a transition is only pushed to the stack after process_link() has been called.
virtual void spot::tgba_reachable_iterator_depth_first_stack::pop |
( |
| ) |
|
|
protectedvirtual |
virtual void spot::tgba_reachable_iterator_depth_first::process_link |
( |
const state * |
in_s, |
|
|
int |
in, |
|
|
const state * |
out_s, |
|
|
int |
out, |
|
|
const twa_succ_iterator * |
si |
|
) |
| |
|
virtualinherited |
Called by run() to process a transition.
- Parameters
-
in_s | The source state |
in | The source state number. |
out_s | The destination state |
out | The destination state number. |
si | The 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 in spot::stats_dfs.
virtual void spot::tgba_reachable_iterator_depth_first::process_state |
( |
const state * |
s, |
|
|
int |
n, |
|
|
twa_succ_iterator * |
si |
|
) |
| |
|
virtualinherited |
virtual void spot::tgba_reachable_iterator_depth_first_stack::push |
( |
const state * |
s, |
|
|
int |
sn |
|
) |
| |
|
protectedvirtual |
virtual void spot::tgba_reachable_iterator_depth_first::run |
( |
| ) |
|
|
virtualinherited |
virtual void spot::tgba_reachable_iterator_depth_first::start |
( |
| ) |
|
|
virtualinherited |
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.
virtual bool spot::tgba_reachable_iterator_depth_first::will_pop_state |
( |
const state * |
s, |
|
|
int |
n, |
|
|
twa_succ_iterator * |
si |
|
) |
| |
|
virtualinherited |
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
-
s | The current state. |
n | A unique number assigned to s. |
si | The spot::tgba_succ_iterator for s. |
Reimplemented in spot::stats_dfs.
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 |
std::deque<stack_item> spot::tgba_reachable_iterator_depth_first::todo |
|
protectedinherited |
The documentation for this class was generated from the following file: