spot  1.2.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | List of all members
spot::saba_state Class Referenceabstract

Abstract class for saba states. More...

#include <saba/sabastate.hh>

Collaboration diagram for spot::saba_state:
Collaboration graph

Public Member Functions

virtual int compare (const saba_state *other) const =0
 Compares two states (that come from the same automaton). More...
 
virtual size_t hash () const =0
 Hash a state. More...
 
virtual saba_stateclone () const =0
 Duplicate a state. More...
 
virtual bdd acceptance_conditions () const =0
 Get the acceptance condition. More...
 

Detailed Description

Abstract class for saba states.

Member Function Documentation

virtual bdd spot::saba_state::acceptance_conditions ( ) const
pure virtual

Get the acceptance condition.

saba are state-labeled automata, then their acceptance conditions are labeled on states.

virtual saba_state* spot::saba_state::clone ( ) const
pure virtual

Duplicate a state.

virtual int spot::saba_state::compare ( const saba_state other) const
pure 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::saba_state_ptr_less_than
virtual size_t spot::saba_state::hash ( ) const
pure 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::saba_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.


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

Please direct any question, comment, or bug report to the Spot mailing list at spot@lrde.epita.fr.
Generated on Thu May 15 2014 11:04:11 for spot by doxygen 1.8.4