spot  1.2.6
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Classes | Functions
Miscellaneous algorithms on TGBA

Classes

class  spot::bfs_steps
 Make a BFS in a spot::tgba to compute a tgba_run::steps. 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

SPOT_API sba * spot::degeneralize (const tgba *a, bool use_z_lvl=true, bool use_cust_acc_orders=false, int use_lvl_cache=1, bool skip_levels=true)
 Degeneralize a spot::tgba into an equivalent sba with only one acceptance condition. More...
 
SPOT_API 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. More...
 
SPOT_API 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. More...
 
SPOT_API tgba_explicit_number * spot::tgba_dupexp_bfs (const tgba *aut, std::map< const state *, const state *, state_ptr_less_than > &relation)
 Build an explicit automata from all states of aut, numbering states in bread first order as they are processed. More...
 
SPOT_API tgba_explicit_number * spot::tgba_dupexp_dfs (const tgba *aut, std::map< const state *, const state *, state_ptr_less_than > &relation)
 Build an explicit automata from all states of aut, numbering states in depth first order as they are processed. More...
 
SPOT_API unsigned spot::count_nondet_states (const tgba *aut)
 Count the number of non-deterministic states in aut. More...
 
SPOT_API bool spot::is_deterministic (const tgba *aut)
 Return true iff aut is deterministic. More...
 
SPOT_API bool spot::is_complete (const tgba *aut)
 Return true iff aut is complete. More...
 
SPOT_API bool spot::is_inherently_weak_scc (scc_map &map, unsigned scc)
 Whether the SCC number scc in map is inherently weak. More...
 
SPOT_API bool spot::is_weak_scc (scc_map &map, unsigned scc)
 Whether the SCC number scc in map is weak. More...
 
SPOT_API bool spot::is_complete_scc (scc_map &map, unsigned scc)
 Whether the SCC number scc in map is complete. More...
 
SPOT_API bool spot::is_syntactic_weak_scc (scc_map &map, unsigned scc)
 Whether the SCC number scc in map is syntactically weak. More...
 
SPOT_API bool spot::is_syntactic_terminal_scc (scc_map &map, unsigned scc)
 Whether the SCC number scc in map is syntactically terminal. More...
 
SPOT_API bool spot::is_terminal_scc (scc_map &map, unsigned scc)
 Whether the SCC number scc in map is terminal. More...
 
SPOT_API 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. More...
 
SPOT_API tgba_statistics spot::stats_reachable (const tgba *g)
 Compute statistics for an automaton. More...
 
SPOT_API tgba_sub_statistics spot::sub_stats_reachable (const tgba *g)
 Compute subended statistics for an automaton. More...
 
SPOT_API sba_explicit_number * spot::strip_acceptance (const tgba *a)
 Duplicate automaton a, removing all acceptance sets. More...
 
SPOT_API tgba_explicit_number * spot::tgba_powerset (const tgba *aut, power_map &pm, bool merge=true)
 Build a deterministic automaton, ignoring acceptance conditions. More...
 
SPOT_API tgba_explicit_number * spot::tgba_powerset (const tgba *aut)
 

Detailed Description

Function Documentation

SPOT_API 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.

SPOT_API sba* spot::degeneralize ( const tgba *  a,
bool  use_z_lvl = true,
bool  use_cust_acc_orders = false,
int  use_lvl_cache = 1,
bool  skip_levels = true 
)

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.

When use_z_lvl is set, the level of the degeneralized automaton is reset everytime an accepting SCC is exited. If use_cust_acc_orders is set, the degeneralization will compute a custom acceptance order for each SCC (this option is disabled by default because our benchmarks show that it usually does more harm than good). If use_lvl_cache is set, everytime an SCC is entered on a state that as already been associated to some level elsewhere, reuse that level (set it to 2 to keep the smallest number, 3 to keep the largest level, and 1 to keep the first level found).

Any of these three options will cause the SCCs of the automaton a to be computed prior to its actual degeneralization.

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

Return true iff aut is complete.

An automaton is complete if its translation relation is total, i.e., each state as a successor for any possible configuration.

SPOT_API bool spot::is_complete_scc ( scc_map &  map,
unsigned  scc 
)

Whether the SCC number scc in map is complete.

An SCC is complete iff for all states and all label there exists a transition that stays into this SCC.

The scc_map map should have been built already.

SPOT_API 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.

SPOT_API bool spot::is_inherently_weak_scc ( scc_map &  map,
unsigned  scc 
)

Whether the SCC number scc in map is inherently weak.

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

Note the terminal SCCs are also inherently weak with that definition.

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).

SPOT_API bool spot::is_syntactic_terminal_scc ( scc_map &  map,
unsigned  scc 
)

Whether the SCC number scc in map is syntactically terminal.

This works only on tgba whose labels are formulas. An SCC is syntactically terminal if one of its states is labeled by a syntactic-guarantee formula.

The scc_map map should have been built already.

SPOT_API bool spot::is_syntactic_weak_scc ( scc_map &  map,
unsigned  scc 
)

Whether the SCC number scc in map is syntactically weak.

This works only on tgba whose labels are formulas. An SCC is syntactically weak if one of its states is labeled by a syntactic-persistence formula.

The scc_map map should have been built already.

SPOT_API bool spot::is_terminal_scc ( scc_map &  map,
unsigned  scc 
)

Whether the SCC number scc in map is terminal.

An SCC is terminal if it is weak, complete, and accepting.

The scc_map map should have been built already.

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

Whether the SCC number scc in map is weak.

An SCC is weak if its non-accepting, or if all its transition are fully accepting (i.e., the belong to all acceptance sets).

Note that terminal SCCs are also weak with that definition.

The scc_map map should have been built already.

SPOT_API 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.

Parameters
nThe number of states wanted in the automata (>0). All states will be connected, and there will be no dead state.
dThe 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 d is considered only when adding the remaining transition. A density of 1 means all states will be connected to each other.
apThe list of atomic property that should label the transition.
dictThe bdd_dict to used for this automata.
n_accThe 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 to improve the chances).
aThe probability (between 0.0 and 1.0) that a transition belongs to an acceptance set.
tThe probability (between 0.0 and 1.0) that an atomic proposition is true.
envThe environment in which to declare the acceptance conditions.

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

@TechReport{      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 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 $[1,n]$ 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.)

SPOT_API tgba_statistics spot::stats_reachable ( const tgba *  g)

Compute statistics for an automaton.

SPOT_API 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.

SPOT_API tgba_sub_statistics spot::sub_stats_reachable ( const tgba *  g)

Compute subended statistics for an automaton.

SPOT_API 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.

SPOT_API tgba_explicit_number* spot::tgba_dupexp_bfs ( const tgba *  aut,
std::map< const state *, const state *, state_ptr_less_than > &  relation 
)

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

SPOT_API 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.

SPOT_API tgba_explicit_number* spot::tgba_dupexp_dfs ( const tgba *  aut,
std::map< const state *, const state *, state_ptr_less_than > &  relation 
)

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

SPOT_API tgba_explicit_number* spot::tgba_powerset ( const tgba *  aut,
power_map &  pm,
bool  merge = true 
)

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. The merge argument can be set to false to prevent merging of transitions.


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:44 for spot by doxygen 1.8.4