spot  1.0.1
Classes | Public Types | Public Member Functions | Public Attributes | Private Attributes | List of all members
spot::state_ta_explicit Class Reference

#include <ta/taexplicit.hh>

Inheritance diagram for spot::state_ta_explicit:
Inheritance graph
Collaboration diagram for spot::state_ta_explicit:
Collaboration graph

Classes

struct  transition
 Explicit transitions. More...

Public Types

typedef std::list< transition * > transitions

Public Member Functions

 state_ta_explicit (const state *tgba_state, const bdd tgba_condition, bool is_initial_state=false, bool is_accepting_state=false, bool is_livelock_accepting_state=false, transitions *trans=0)
virtual int compare (const spot::state *other) const
 Compares two states (that come from the same automaton).
virtual size_t hash () const
 Hash a state.
virtual state_ta_explicitclone () const
 Duplicate a state.
virtual void destroy () const
 Release a state.
virtual ~state_ta_explicit ()
transitionsget_transitions () const
transitionsget_transitions (bdd condition) const
void add_transition (transition *t, bool add_at_beginning=false)
const stateget_tgba_state () const
const bdd get_tgba_condition () const
bool is_accepting_state () const
void set_accepting_state (bool is_accepting_state)
bool is_livelock_accepting_state () const
void set_livelock_accepting_state (bool is_livelock_accepting_state)
bool is_initial_state () const
void set_initial_state (bool is_initial_state)
bool is_hole_state () const
 Return true if the state has no successors.
void delete_stuttering_and_hole_successors ()
 Remove stuttering transitions and transitions leading to states having no successors.
void free_transitions ()

Public Attributes

state_ta_explicitstuttering_reachable_livelock

Private Attributes

const statetgba_state_
const bdd tgba_condition_
bool is_initial_state_
bool is_accepting_state_
bool is_livelock_accepting_state_
transitionstransitions_
Sgi::hash_map< int,
transitions *, Sgi::hash< int > > 
transitions_by_condition

Detailed Description

states used by spot::ta_explicit.

Member Typedef Documentation

Constructor & Destructor Documentation

spot::state_ta_explicit::state_ta_explicit ( const state tgba_state,
const bdd  tgba_condition,
bool  is_initial_state = false,
bool  is_accepting_state = false,
bool  is_livelock_accepting_state = false,
transitions trans = 0 
)
inline
virtual spot::state_ta_explicit::~state_ta_explicit ( )
inlinevirtual

Member Function Documentation

void spot::state_ta_explicit::add_transition ( transition t,
bool  add_at_beginning = false 
)
virtual state_ta_explicit* spot::state_ta_explicit::clone ( ) const
virtual

Duplicate a state.

Implements spot::state.

virtual int spot::state_ta_explicit::compare ( const spot::state other) const
virtual

Compares two states (that come from the same automaton).

This method returns an integer less than, equal to, or greater than zero if this is found, respectively, to be less than, equal to, or greater than other according to some implicit total order.

This method should not be called to compare states from different automata.

See Also
spot::state_ptr_less_than

Implements spot::state.

void spot::state_ta_explicit::delete_stuttering_and_hole_successors ( )

Remove stuttering transitions and transitions leading to states having no successors.

virtual void spot::state_ta_explicit::destroy ( ) const
inlinevirtual

Release a state.

Methods from the tgba or tgba_succ_iterator always return a new state that you should deallocate with this function. Before Spot 0.7, you had to "delete" your state directly. Starting with Spot 0.7, you should update your code to use this function instead. destroy() usually call delete, except in subclasses that destroy() to allow better memory management (e.g., no memory allocation for explicit automata).

Reimplemented from spot::state.

void spot::state_ta_explicit::free_transitions ( )
const bdd spot::state_ta_explicit::get_tgba_condition ( ) const
const state* spot::state_ta_explicit::get_tgba_state ( ) const
transitions* spot::state_ta_explicit::get_transitions ( ) const
transitions* spot::state_ta_explicit::get_transitions ( bdd  condition) const
virtual size_t spot::state_ta_explicit::hash ( ) const
virtual

Hash a state.

This method returns an integer that can be used as a hash value for this state.

Note that the hash value is guaranteed to be unique for all equal states (in compare()'s sense) for only has long has one of these states exists. So it's OK to use a spot::state as a key in a hash_map because the mere use of the state as a key in the hash will ensure the state continues to exist.

However if you create the state, get its hash key, delete the state, recreate the same state, and get its hash key, you may obtain two different hash keys if the same state were not already used elsewhere. In practice this weird situation can occur only when the state is BDD-encoded, because BDD numbers (used to build the hash value) can be reused for other formulas. That probably doesn't matter, since the hash value is meant to be used in a hash_map, but it had to be noted.

Implements spot::state.

bool spot::state_ta_explicit::is_accepting_state ( ) const
bool spot::state_ta_explicit::is_hole_state ( ) const

Return true if the state has no successors.

bool spot::state_ta_explicit::is_initial_state ( ) const
bool spot::state_ta_explicit::is_livelock_accepting_state ( ) const
void spot::state_ta_explicit::set_accepting_state ( bool  is_accepting_state)
void spot::state_ta_explicit::set_initial_state ( bool  is_initial_state)
void spot::state_ta_explicit::set_livelock_accepting_state ( bool  is_livelock_accepting_state)

Member Data Documentation

bool spot::state_ta_explicit::is_accepting_state_
private
bool spot::state_ta_explicit::is_initial_state_
private
bool spot::state_ta_explicit::is_livelock_accepting_state_
private
state_ta_explicit* spot::state_ta_explicit::stuttering_reachable_livelock
const bdd spot::state_ta_explicit::tgba_condition_
private
const state* spot::state_ta_explicit::tgba_state_
private
transitions* spot::state_ta_explicit::transitions_
private
Sgi::hash_map<int, transitions*, Sgi::hash<int> > spot::state_ta_explicit::transitions_by_condition
private

The documentation for this class was generated from the following file:

Please comment this page and report errors about it on the RefDocComments page.
Generated on Wed Jan 23 2013 15:00:02 for spot by doxygen 1.8.1.2