spot  1.2.6
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Classes | Public Types | Public Member Functions | List of all members
spot::ltl::nfa Class Reference

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

#include <ltlast/nfa.hh>

Collaboration diagram for spot::ltl::nfa:
Collaboration graph

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. More...
 
typedef boost::shared_ptr< nfaptr
 

Public Member Functions

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

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

Iterator over the successors of a state.

Member Function Documentation

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.

const state* spot::ltl::nfa::get_init_state ( )

Get the initial state of the NFA.

bool spot::ltl::nfa::is_final ( const state *  s)

Tell whether the given state is final or not.

bool spot::ltl::nfa::is_loop ( )

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


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 Sat Dec 6 2014 12:28:45 for spot by doxygen 1.8.4