21#include <spot/misc/hash.hh>
23#include <spot/twa/twa.hh>
27#include <spot/misc/bddlt.hh>
28#include <spot/ta/ta.hh>
33 class state_ta_explicit;
52 add_to_initial_states_set(
state* s, bdd condition = bddfalse);
58 bool add_at_beginning =
false);
61 delete_stuttering_transitions();
72 bdd_dict_ptr get_dict()
const;
101 artificial_initial_state_ = s;
106 delete_stuttering_and_hole_successors(
const spot::state* s);
116 ta_explicit(
const ta_explicit& other) =
delete;
117 ta_explicit& operator=(
const ta_explicit& other) =
delete;
120 state_ta_explicit* artificial_initial_state_;
121 ta::states_set_t states_set_;
122 ta::const_states_set_t initial_states_set_;
140 typedef std::list<transition*> transitions;
143 bool is_initial_state =
false,
144 bool is_accepting_state =
false,
145 bool is_livelock_accepting_state =
false,
146 transitions* trans =
nullptr) :
147 tgba_state_(tgba_state), tgba_condition_(tgba_condition),
148 is_initial_state_(is_initial_state), is_accepting_state_(
149 is_accepting_state), is_livelock_accepting_state_(
150 is_livelock_accepting_state), transitions_(trans)
155 virtual size_t hash()
const override;
168 get_transitions()
const;
172 get_transitions(bdd condition)
const;
175 add_transition(transition* t,
bool add_at_beginning =
false);
178 get_tgba_state()
const;
180 get_tgba_condition()
const;
182 is_accepting_state()
const;
184 set_accepting_state(
bool is_accepting_state);
186 is_livelock_accepting_state()
const;
188 set_livelock_accepting_state(
bool is_livelock_accepting_state);
191 is_initial_state()
const;
193 set_initial_state(
bool is_initial_state);
209 const state* tgba_state_;
210 const bdd tgba_condition_;
211 bool is_initial_state_;
212 bool is_accepting_state_;
213 bool is_livelock_accepting_state_;
214 transitions* transitions_;
215 std::unordered_map<int, transitions*, std::hash<int>>
216 transitions_by_condition;
230 virtual bool done()
const override;
233 virtual bdd
cond()
const override;
238 state_ta_explicit::transitions* transitions_;
239 state_ta_explicit::transitions::const_iterator i_;
242 typedef std::shared_ptr<ta_explicit> ta_explicit_ptr;
243 typedef std::shared_ptr<const ta_explicit> const_ta_explicit_ptr;
245 inline ta_explicit_ptr
246 make_ta_explicit(
const const_twa_ptr& tgba,
250 return std::make_shared<ta_explicit>(tgba, n_acc, artificial_initial_state);
Definition: taexplicit.hh:128
void delete_stuttering_and_hole_successors()
Remove stuttering transitions and transitions leading to states having no successors.
virtual state_ta_explicit * clone() const override
Duplicate a state.
virtual void destroy() const override
Release a state.
Definition: taexplicit.hh:158
virtual size_t hash() const override
Hash a state.
virtual int compare(const spot::state *other) const override
Compares two states (that come from the same automaton).
bool is_hole_state() const
Return true if the state has no successors.
Abstract class for states.
Definition: twa.hh:47
Successor iterators used by spot::ta_explicit.
Definition: taexplicit.hh:222
virtual bool next() override
Jump to the next successor (if any).
virtual bdd cond() const override
Get the condition on the edge leading to this successor.
virtual bool done() const override
Check whether the iteration is finished.
virtual const state * dst() const override
Get the destination state of the current edge.
virtual acc_cond::mark_t acc() const override
Get the acceptance mark of the edge leading to this successor.
virtual bool first() override
Position the iterator on the first successor (if any).
Definition: taexplicit.hh:39
virtual bool is_initial_state(const spot::state *s) const override
Return true if s is an initial state, otherwise false.
virtual bool is_accepting_state(const spot::state *s) const override
Return true if s is a Buchi-accepting state, otherwise false.
virtual const_states_set_t get_initial_states_set() const override
Get the initial states set of the automaton.
virtual std::string format_state(const spot::state *s) const override
Format the state as a string for printing.
virtual spot::state * get_artificial_initial_state() const override
Get the artificial initial state set of the automaton. Return 0 if this artificial state is not imple...
Definition: taexplicit.hh:93
virtual bool is_livelock_accepting_state(const spot::state *s) const override
Return true if s is a livelock-accepting state , otherwise false.
virtual ta_succ_iterator * succ_iter(const spot::state *s, bdd condition) const override
Get an iterator over the successors of state filtred by the changeset on transitions.
virtual void free_state(const spot::state *s) const override
Release a state s.
virtual bdd get_state_condition(const spot::state *s) const override
Return a BDD condition that represents the valuation of atomic propositions in the state s.
virtual ta_succ_iterator * succ_iter(const spot::state *s) const override
Get an iterator over the successors of state.
Iterate over the successors of a state.
Definition: ta.hh:197
A Testing Automaton.
Definition: ta.hh:75
Definition: automata.hh:26
std::set< const state * > get_states_set(const const_ta_ptr &t)
Compute states set for an automaton.
An acceptance mark.
Definition: acc.hh:84
Explicit transitions.
Definition: taexplicit.hh:134