spot
1.2.4
|
Nondeterministic Finite Automata used by automata operators. More...
#include <ltlast/nfa.hh>
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< nfa > | ptr |
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 &) |
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.
Iterator over the successors of a state.
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.
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.