spot
0.8.2
|
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. | |
typedef boost::shared_ptr< nfa > | ptr |
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 state * | get_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 | |
state * | add_state (int name) |
nfa (const nfa &other) | |
nfa & | operator= (const nfa &other) |
Private Attributes | |
is_map | is_ |
si_map | si_ |
size_t | arity_ |
std::string | name_ |
state * | init_ |
std::set< int > | finals_ |
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.
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 |
spot::ltl::nfa::nfa | ( | const nfa & | other | ) | [private] |
Explicitly disllow use of implicity generated member functions we don't want.
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 |
const state* spot::ltl::nfa::get_init_state | ( | ) |
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.
bool spot::ltl::nfa::is_loop | ( | ) |
Tell whether the NFA is `loop', i.e. without any final state.
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 & | ) |
size_t spot::ltl::nfa::arity_ [private] |
std::set<int> spot::ltl::nfa::finals_ [private] |
state* spot::ltl::nfa::init_ [private] |
is_map spot::ltl::nfa::is_ [private] |
std::string spot::ltl::nfa::name_ [private] |
si_map spot::ltl::nfa::si_ [private] |