25 #include <spot/misc/hash.hh>
26 #include <spot/twa/twa.hh>
87 const state* out_s,
int out,
155 const state* out_s,
int out,
193 virtual void pop()
override;
195 std::unordered_set<int> stack_;
Abstract class for states.
Definition: twa.hh:51
An implementation of spot::twa_reachable_iterator that browses states breadth first.
Definition: reachiter.hh:101
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:109
Iterate over all states of an automaton using a DFS.
Definition: reachiter.hh:183
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:115
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:159
state_map< int > seen
States already seen.
Definition: reachiter.hh:161
std::deque< stack_item > todo
the DFS stack
Definition: reachiter.hh:168
virtual void start()
Called by run() before starting its iteration.
Iterate over all reachable states of a spot::tgba.
Definition: reachiter.hh:35
state_map< int > seen
States already seen.
Definition: reachiter.hh:93
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
virtual const state * next_state()=0
Called by run() to obtain the next state to process.
const_twa_ptr aut_
The spot::tgba to explore.
Definition: reachiter.hh:91
Iterate over the successors of a state.
Definition: twa.hh:398
Definition: automata.hh:27
std::unordered_map< const state *, val, state_ptr_hash, state_ptr_equal > state_map
Unordered map of abstract states.
Definition: twa.hh:197
Definition: reachiter.hh:163