spot  0.9.1
Classes | Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes
spot::ltl::nfa Class Reference

Nondeterministic Finite Automata used by automata operators. More...

#include <ltlast/nfa.hh>

List of all members.

Classes

struct  transition
 Explicit transitions. More...

Public Types

typedef std::list< transition * > state
typedef boost::shared_ptr
< formula_tree::node
label
typedef succ_iterator iterator
 Iterator over the successors of a state.
typedef boost::shared_ptr< nfaptr

Public Member Functions

 nfa ()
 ~nfa ()
void add_transition (int src, int dst, const label lbl)
void set_init_state (int name)
void set_final (int name)
const stateget_init_state ()
 Get the initial state of the NFA.
bool is_final (const state *s)
 Tell whether the given state is final or not.
bool is_loop ()
 Tell whether the NFA is `loop', i.e. without any final state.
unsigned arity ()
 Get the `arity' i.e. max t.cost, for each transition t.
iterator begin (const state *s) const
 Return an iterator on the first succesor (if any) of state.
iterator end (const state *s) const
 Return an iterator just past the last succesor of state.
int format_state (const state *s) const
const std::string & get_name () const
void set_name (const std::string &)

Private Types

typedef Sgi::hash_map< int,
state *, Sgi::hash< int > > 
is_map
typedef Sgi::hash_map< const
state *, int, ptr_hash< state > > 
si_map

Private Member Functions

stateadd_state (int name)
 nfa (const nfa &other)
nfaoperator= (const nfa &other)

Private Attributes

is_map is_
si_map si_
size_t arity_
std::string name_
stateinit_
std::set< int > finals_

Detailed Description

Nondeterministic Finite Automata used by automata operators.

States are represented by integers. Labels are represented by formula_tree's nodes. Currently, only one initial state is possible.


Member Typedef Documentation

typedef Sgi::hash_map<int, state*, Sgi::hash<int> > spot::ltl::nfa::is_map [private]

Iterator over the successors of a state.

typedef boost::shared_ptr<formula_tree::node> spot::ltl::nfa::label
typedef boost::shared_ptr<nfa> spot::ltl::nfa::ptr
typedef Sgi::hash_map<const state*, int, ptr_hash<state> > spot::ltl::nfa::si_map [private]
typedef std::list<transition*> spot::ltl::nfa::state

Constructor & Destructor Documentation

spot::ltl::nfa::nfa ( const nfa other) [private]

Explicitly disllow use of implicity generated member functions we don't want.


Member Function Documentation

state* spot::ltl::nfa::add_state ( int  name) [private]
void spot::ltl::nfa::add_transition ( int  src,
int  dst,
const label  lbl 
)
unsigned spot::ltl::nfa::arity ( )

Get the `arity' i.e. max t.cost, for each transition t.

iterator spot::ltl::nfa::begin ( const state s) const

Return an iterator on the first succesor (if any) of state.

The usual way to do this with a for loop.

    for (nfa::iterator i = a.begin(s); i != a.end(s); ++i);
iterator spot::ltl::nfa::end ( const state s) const

Return an iterator just past the last succesor of state.

int spot::ltl::nfa::format_state ( const state s) const

Get the initial state of the NFA.

const std::string& spot::ltl::nfa::get_name ( ) const
bool spot::ltl::nfa::is_final ( const state s)

Tell whether the given state is final or not.

Tell whether the NFA is `loop', i.e. without any final state.

nfa& spot::ltl::nfa::operator= ( const nfa other) [private]
void spot::ltl::nfa::set_final ( int  name)
void spot::ltl::nfa::set_init_state ( int  name)
void spot::ltl::nfa::set_name ( const std::string &  )

Member Data Documentation

size_t spot::ltl::nfa::arity_ [private]
std::set<int> spot::ltl::nfa::finals_ [private]
std::string spot::ltl::nfa::name_ [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 May 23 2012 12:06:47 for spot by doxygen 1.7.6.1