21#include <spot/misc/hash.hh>
22#include <spot/twa/twa.hh>
83 const state* out_s,
int out,
151 const state* out_s,
int out,
189 virtual void pop()
override;
191 std::unordered_set<int> stack_;
Abstract class for states.
Definition: twa.hh:47
An implementation of spot::twa_reachable_iterator that browses states breadth first.
Definition: reachiter.hh:97
virtual void add_state(const state *s) override
Called by run() to obtain the next state to process.
virtual const state * next_state() override
Called by run() to obtain the next state to process.
std::deque< const state * > todo
A queue of states yet to explore.
Definition: reachiter.hh:105
Iterate over all states of an automaton using a DFS.
Definition: reachiter.hh:179
virtual void pop() override
Pop the DFS stack.
bool on_stack(int sn) const
Whether state sn is on the DFS stack.
virtual void push(const state *s, int sn) override
Push a new state in todo.
Iterate over all states of an automaton using a DFS.
Definition: reachiter.hh:111
virtual void push(const state *s, int sn)
Push a new state in todo.
virtual void pop()
Pop the DFS stack.
virtual void run()
Iterate over all reachable states of a spot::tgba.
virtual void process_state(const state *s, int n, twa_succ_iterator *si)
virtual bool want_state(const state *s) const
virtual void process_link(const state *in_s, int in, const state *out_s, int out, const twa_succ_iterator *si)
virtual void end()
Called by run() once all states have been explored.
const_twa_ptr aut_
The spot::tgba to explore.
Definition: reachiter.hh:155
state_map< int > seen
States already seen.
Definition: reachiter.hh:157
std::deque< stack_item > todo
the DFS stack
Definition: reachiter.hh:164
virtual void start()
Called by run() before starting its iteration.
Iterate over all reachable states of a spot::tgba.
Definition: reachiter.hh:31
state_map< int > seen
States already seen.
Definition: reachiter.hh:89
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)
virtual void add_state(const state *s)=0
Called by run() to obtain the next state to process.
virtual void end()
Called by run() once all states have been explored.
virtual void run()
Iterate over all reachable states of a spot::tgba.
virtual void start()
Called by run() before starting its iteration.
virtual bool want_state(const state *s) const
const_twa_ptr aut_
The spot::tgba to explore.
Definition: reachiter.hh:87
virtual const state * next_state()=0
Called by run() to obtain the next state to process.
Iterate over the successors of a state.
Definition: twa.hh:394
Definition: automata.hh:26
std::unordered_map< const state *, val, state_ptr_hash, state_ptr_equal > state_map
Unordered map of abstract states.
Definition: twa.hh:193
Definition: reachiter.hh:159