spot  1.0
Classes | Functions
Miscellaneous algorithms on TGBA
TGBA algorithms

Classes

class  spot::bfs_steps
 Make a BFS in a spot::tgba to compute a tgba_run::steps.This class should be used to compute the shortest path between a state of a spot::tgba and the first transition or state that matches some conditions. More...
struct  spot::tgba_statistics
struct  spot::tgba_sub_statistics
class  spot::printable_formula
class  spot::stat_printer
 prints various statistics about a TGBA More...

Functions

sba * spot::degeneralize (const tgba *a)
 Degeneralize a spot::tgba into an equivalent sba with only one acceptance condition.
tgba_explicit_number * spot::tgba_dupexp_bfs (const tgba *aut)
 Build an explicit automata from all states of aut, numbering states in bread first order as they are processed.
tgba_explicit_number * spot::tgba_dupexp_dfs (const tgba *aut)
 Build an explicit automata from all states of aut, numbering states in depth first order as they are processed.
unsigned spot::count_nondet_states (const tgba *aut)
 Count the number of non-deterministic states in aut.
bool spot::is_deterministic (const tgba *aut)
 Return true iff aut is deterministic.
bool spot::is_weak_scc (scc_map &map, unsigned scc)
 Whether the SCC number scc in map is weak.
tgba * spot::random_graph (int n, float d, const ltl::atomic_prop_set *ap, bdd_dict *dict, int n_acc=0, float a=0.1, float t=0.5, ltl::environment *env=&ltl::default_environment::instance())
 Construct a tgba randomly.
tgba_statistics spot::stats_reachable (const tgba *g)
 Compute statistics for an automaton.
tgba_sub_statistics spot::sub_stats_reachable (const tgba *g)
 Compute subended statistics for an automaton.
sba_explicit_number * spot::strip_acceptance (const tgba *a)
 Duplicate automaton a, removing all acceptance sets.
tgba_explicit_number * spot::tgba_powerset (const tgba *aut, power_map &pm)
 Build a deterministic automaton, ignoring acceptance conditions.This create a deterministic automaton that recognizes the same language as aut would if its acceptance conditions were ignored. This is the classical powerset algorithm.
tgba_explicit_number * spot::tgba_powerset (const tgba *aut)

Detailed Description

Function Documentation

unsigned spot::count_nondet_states ( const tgba *  aut)

Count the number of non-deterministic states in aut.

The automaton is deterministic if it has 0 nondeterministic states, but it is more efficient to call is_deterministic() if you do not care about the number of nondeterministic states.

sba* spot::degeneralize ( const tgba *  a)

Degeneralize a spot::tgba into an equivalent sba with only one acceptance condition.

This algorithms will build a new explicit automaton that has at most (N+1) times the number of states of the original automaton.

If you want to build a degeneralized automaton on-the-fly, see spot::tgba_sba_proxy or spot::tgba_tba_proxy.

See Also
tgba_sba_proxy, tgba_tba_proxy
bool spot::is_deterministic ( const tgba *  aut)

Return true iff aut is deterministic.

This function is more efficient than count_nondet_states() when the automaton is nondeterministic, because it can return before the entire automaton has been explored.

bool spot::is_weak_scc ( scc_map &  map,
unsigned  scc 
)

Whether the SCC number scc in map is weak.

An SCC is weak if either its cycles are all accepting, or they are all non-accepting.

The scc_map map should have been built already. The absence of accepting cycle is easy to check (the scc_map can tell whether the SCC is non-accepting already). Similarly, an SCC in which all transitions belong to all acceptance sets is necessarily weak. For other accepting SCCs, this function enumerates all cycles in the given SCC (it stops if it find a non-accepting cycle).

tgba* spot::random_graph ( int  n,
float  d,
const ltl::atomic_prop_set *  ap,
bdd_dict *  dict,
int  n_acc = 0,
float  a = 0.1,
float  t = 0.5,
ltl::environment *  env = &ltl::default_environment::instance() 
)

Construct a tgba randomly.

\param n The number of states wanted in the automata (>0).  All states
         will be connected, and there will be no dead state.
\param d The density of the automata.  This is the probability
         (between 0.0 and 1.0), to add a transition between two
         states.  All states have at least one outgoing transition,
         so \a d is considered only when adding the remaining transition.
         A density of 1 means all states will be connected to each other.
\param ap The list of atomic property that should label the transition.
\param dict The bdd_dict to used for this automata.
\param n_acc The number of acceptance sets to use.
         If this number is non null, then there is no guarantee
         that the generated graph contains an accepting cycle (raise
         the value of \a a to improve the chances).
\param a The probability (between 0.0 and 1.0) that a transition belongs
         to an acceptance set.
\param t The probability (between 0.0 and 1.0) that an atomic proposition
         is true.
\param env The environment in which to declare the acceptance conditions.

This algorithms is adapted from the one in Fig 6.2 page 48 of
@verbatim 

/// { tauriainen.00.a66, /// author = {Heikki Tauriainen}, /// title = {Automated Testing of {B"u}chi Automata Translators for /// {L}inear {T}emporal {L}ogic}, /// address = {Espoo, Finland}, /// institution = {Helsinki University of Technology, Laboratory for /// Theoretical Computer Science}, /// number = {A66}, /// year = {2000}, /// url = {http://citeseer.nj.nec.com/tauriainen00automated.html}, /// type = {Research Report}, /// note = {Reprint of Master's thesis} /// } ///

Although the intent is similar, there are some differences with
between the above published algorithm and this implementation .
First labels are on transitions, and acceptance conditions are
generated too.  Second, the number of successors of a node is
chosen in \form#0 following a normal distribution with mean

$1+(n-1)d$ and variance $(n-1)d(1-d)$. (This is less accurate, but faster than considering all possible n successors one by one.)

tgba_statistics spot::stats_reachable ( const tgba *  g)

Compute statistics for an automaton.

sba_explicit_number* spot::strip_acceptance ( const tgba *  a)

Duplicate automaton a, removing all acceptance sets.

This is equivalent to marking all states/transitions as accepting.

tgba_sub_statistics spot::sub_stats_reachable ( const tgba *  g)

Compute subended statistics for an automaton.

tgba_explicit_number* spot::tgba_dupexp_bfs ( const tgba *  aut)

Build an explicit automata from all states of aut, numbering states in bread first order as they are processed.

tgba_explicit_number* spot::tgba_dupexp_dfs ( const tgba *  aut)

Build an explicit automata from all states of aut, numbering states in depth first order as they are processed.

tgba_explicit_number* spot::tgba_powerset ( const tgba *  aut,
power_map &  pm 
)

Build a deterministic automaton, ignoring acceptance conditions.This create a deterministic automaton that recognizes the same language as aut would if its acceptance conditions were ignored. This is the classical powerset algorithm.

If pm is supplied it will be filled with the set of original states associated to each state of the deterministic automaton.

tgba_explicit_number* spot::tgba_powerset ( const tgba *  aut)

Please comment this page and report errors about it on the RefDocComments page.
Generated on Sat Oct 27 2012 09:34:33 for spot by doxygen 1.8.1.2