spot  1.0.2
Classes | Functions
Emptiness-check algorithms
Emptiness-checks

Classes

class  spot::couvreur99_check
 An implementation of the Couvreur99 emptiness-check algorithm. More...
class  spot::couvreur99_check_shy
 A version of spot::couvreur99_check that tries to visit known states first. More...

Functions

emptiness_check * spot::couvreur99 (const tgba *a, option_map options=option_map(), const numbered_state_heap_factory *nshf=numbered_state_heap_hash_map_factory::instance())
 Check whether the language of an automate is empty.
emptiness_check * spot::explicit_gv04_check (const tgba *a, option_map o=option_map())
 Emptiness check based on Geldenhuys and Valmari's TACAS'04 paper.
emptiness_check * spot::explicit_magic_search (const tgba *a, option_map o=option_map())
 Returns an emptiness checker on the spot::tgba automaton a.
emptiness_check * spot::bit_state_hashing_magic_search (const tgba *a, size_t size, option_map o=option_map())
 Returns an emptiness checker on the spot::tgba automaton a.
emptiness_check * spot::magic_search (const tgba *a, option_map o=option_map())
 Wrapper for the two magic_search implementations.
emptiness_check * spot::explicit_se05_search (const tgba *a, option_map o=option_map())
 Returns an emptiness check on the spot::tgba automaton a.
emptiness_check * spot::bit_state_hashing_se05_search (const tgba *a, size_t size, option_map o=option_map())
 Returns an emptiness checker on the spot::tgba automaton a.
emptiness_check * spot::se05 (const tgba *a, option_map o)
 Wrapper for the two se05 implementations.
emptiness_check * spot::explicit_tau03_search (const tgba *a, option_map o=option_map())
 Returns an emptiness checker on the spot::tgba automaton a.
emptiness_check * spot::explicit_tau03_opt_search (const tgba *a, option_map o=option_map())
 Returns an emptiness checker on the spot::tgba automaton a.

Detailed Description

Function Documentation

emptiness_check* spot::bit_state_hashing_magic_search ( const tgba *  a,
size_t  size,
option_map  o = option_map() 
)

Returns an emptiness checker on the spot::tgba automaton a.

\pre The automaton \a a must have at most one acceptance condition (i.e.
it is a TBA).

During the visit of \a a, the returned checker does not store explicitely
the traversed states but uses the bit-state hashing technic presented in:

@verbatim 

/// {Holzmann91, /// author = {G.J. Holzmann}, /// title = {Design and Validation of Computer Protocols}, /// publisher = {Prentice-Hall}, /// address = {Englewood Cliffs, New Jersey}, /// year = {1991} /// } ///

Consequently, the detection of an acceptence cycle is not ensured.

The size of the heap is limited to \n size bytes.

The implemented algorithm is the same as the one of
spot::explicit_magic_search.

\sa spot::explicit_magic_search
emptiness_check* spot::bit_state_hashing_se05_search ( const tgba *  a,
size_t  size,
option_map  o = option_map() 
)

Returns an emptiness checker on the spot::tgba automaton a.

\pre The automaton \a a must have at most one acceptance condition (i.e.
it is a TBA).

During the visit of \a a, the returned checker does not store explicitely
the traversed states but uses the bit-state hashing technic presented in:

@verbatim 

/// {Holzmann91, /// author = {G.J. Holzmann}, /// title = {Design and Validation of Computer Protocols}, /// publisher = {Prentice-Hall}, /// address = {Englewood Cliffs, New Jersey}, /// year = {1991} /// } ///

Consequently, the detection of an acceptence cycle is not ensured.

The size of the heap is limited to \n size bytes.

The implemented algorithm is the same as the one of
spot::explicit_se05_search.

\sa spot::explicit_se05_search
emptiness_check* spot::couvreur99 ( const tgba *  a,
option_map  options = option_map(),
const numbered_state_heap_factory *  nshf = numbered_state_heap_hash_map_factory::instance() 
)

Check whether the language of an automate is empty.

This is based on the following paper.
@verbatim 

/// {couvreur.99.fm, /// author = {Jean-Michel Couvreur}, /// title = {On-the-fly Verification of Temporal Logic}, /// pages = {253–271}, /// editor = {Jeannette M. Wing and Jim Woodcock and Jim Davies}, /// booktitle = {Proceedings of the World Congress on Formal Methods in /// the Development of Computing Systems (FM'99)}, /// publisher = {Springer-Verlag}, /// series = {Lecture Notes in Computer Science}, /// volume = {1708}, /// year = {1999}, /// address = {Toulouse, France}, /// month = {September}, /// isbn = {3-540-66587-0} /// } ///

A recursive definition of the algorithm would look as follows,
but the implementation is of course not recursive.
(<code>&lt;Sigma, Q, delta, q, F&gt;</code> is the automaton to
check, H is an associative array mapping each state to its
positive DFS order or 0 if it is dead, SCC is and ACC are two
stacks.)

@verbatim 

/// check(<Sigma, Q, delta, q, F>, H, SCC, ACC) /// if q is not in H // new state /// H[q] = H.size + 1 /// SCC.push(<H[q], {}>) /// forall <a, s> : <q, _, a, s> in delta /// ACC.push(a) /// res = check(<Sigma, Q, delta, s, F>, H, SCC, ACC) /// if res /// return res /// <n, _> = SCC.top() /// if n = H[q] /// SCC.pop() /// mark_reachable_states_as_dead(<Sigma, Q, delta, q, F>, H$) /// return 0 /// else /// if H[q] = 0 // dead state /// ACC.pop() /// return true /// else // state in stack: merge SCC /// all = {} /// do /// <n, a> = SCC.pop() /// all = all union a union { ACC.pop() } /// until n <= H[q] /// SCC.push(<n, all>) /// if all != F /// return 0 /// return new emptiness_check_result(necessary data) ///

check() returns 0 iff the automaton's language is empty.  It
returns an instance of emptiness_check_result.  If the automaton
accept a word.  (Use emptiness_check_result::accepting_run() to
extract an accepting run.)

There are two variants of this algorithm: spot::couvreur99_check and
spot::couvreur99_check_shy.  They differ in their memory usage, the
number for successors computed before they are used and the way
the depth first search is directed.

spot::couvreur99_check performs a straightforward depth first search.
The DFS stacks store tgba_succ_iterators, so that only the
iterators which really are explored are computed.

spot::couvreur99_check_shy tries to explore successors which are
visited states first.  this helps to merge SCCs and generally
helps to produce shorter counter-examples.  However this
algorithm cannot stores unprocessed successors as
tgba_succ_iterators: it must compute all successors of a state
at once in order to decide which to explore first, and must keep
a list of all unexplored successors in its DFS stack.

The couvreur99() function is a wrapper around these two flavors
of the algorithm.  \a options is an option map that specifies
which algorithms should be used, and how.

The following options are available.
\li \c "shy" : if non zero, then spot::couvreur99_check_shy is used,
               otherwise (and by default) spot::couvreur99_check is used.

\li \c "poprem" : specifies how the algorithm should handle the
destruction of non-accepting maximal strongly connected
components.  If \c poprem is non null, the algorithm will keep a
list of all states of a SCC that are fully processed and should
be removed once the MSCC is popped.  If \c poprem is null (the
default), the MSCC will be traversed again (i.e. generating the
successors of the root recursively) for deletion.  This is a
choice between memory and speed.

\li \c "group" : this options is used only by spot::couvreur99_check_shy.
If non null (the default), the successors of all the
states that belong to the same SCC will be considered when
choosing a successor.  Otherwise, only the successor of the
topmost state on the DFS stack are considered.  
emptiness_check* spot::explicit_gv04_check ( const tgba *  a,
option_map  o = option_map() 
)

Emptiness check based on Geldenhuys and Valmari's TACAS'04 paper.

\pre The automaton \a a must have at most one acceptance condition.

The original algorithm, coming from the following paper, has only
been slightly modified to work on transition-based automata.
@verbatim 

/// {geldenhuys.04.tacas, /// author = {Jaco Geldenhuys and Antti Valmari}, /// title = {Tarjan's Algorithm Makes On-the-Fly {LTL} Verification /// More Efficient}, /// booktitle = {Proceedings of the 10th International Conference on Tools /// and Algorithms for the Construction and Analysis of Systems /// (TACAS'04)}, /// editor = {Kurt Jensen and Andreas Podelski}, /// pages = {205–219}, /// year = {2004}, /// publisher = {Springer-Verlag}, /// series = {Lecture Notes in Computer Science}, /// volume = {2988}, /// isbn = {3-540-21299-X} /// } ///

emptiness_check* spot::explicit_magic_search ( const tgba *  a,
option_map  o = option_map() 
)

Returns an emptiness checker on the spot::tgba automaton a.

\pre The automaton \a a must have at most one acceptance condition (i.e.
it is a TBA).

During the visit of \a a, the returned checker stores explicitely all
the traversed states.
The method \a check() of the checker can be called several times
(until it returns a null pointer) to enumerate all the visited acceptance
paths. The implemented algorithm is the following:

@verbatim 

/// procedure check () /// begin /// call dfs_blue(s0); /// end; /// /// procedure dfs_blue (s) /// begin /// s.color = blue; /// for all t in post(s) do /// if t.color == white then /// call dfs_blue(t); /// end if; /// if (the edge (s,t) is accepting) then /// target = s; /// call dfs_red(t); /// end if; /// end for; /// end; /// /// procedure dfs_red(s) /// begin /// s.color = red; /// if s == target then /// report cycle /// end if; /// for all t in post(s) do /// if t.color == blue then /// call dfs_red(t); /// end if; /// end for; /// end; ///

This algorithm is an adaptation to TBA of the one
(which deals with accepting states) presented in

@verbatim 

/// Article{ courcoubetis.92.fmsd, /// author = {Costas Courcoubetis and Moshe Y. Vardi and Pierre /// Wolper and Mihalis Yannakakis}, /// title = {Memory-Efficient Algorithm for the Verification of /// Temporal Properties}, /// journal = {Formal Methods in System Design}, /// pages = {275–288}, /// year = {1992}, /// volume = {1} /// } ///

\xrefitem bug 1.
emptiness_check* spot::explicit_se05_search ( const tgba *  a,
option_map  o = option_map() 
)

Returns an emptiness check on the spot::tgba automaton a.

\pre The automaton \a a must have at most one acceptance condition (i.e.
it is a TBA).

During the visit of \a a, the returned checker stores explicitely all
the traversed states.
The method \a check() of the checker can be called several times
(until it returns a null pointer) to enumerate all the visited accepting
paths. The implemented algorithm is an optimization of
spot::explicit_magic_search and is the following:

@verbatim 

/// procedure check () /// begin /// call dfs_blue(s0); /// end; /// /// procedure dfs_blue (s) /// begin /// s.color = cyan; /// for all t in post(s) do /// if t.color == white then /// call dfs_blue(t); /// else if t.color == cyan and /// (the edge (s,t) is accepting or /// (it exists a predecessor p of s in st_blue and s != t and /// the arc between p and s is accepting)) then /// report cycle; /// end if; /// if the edge (s,t) is accepting then /// call dfs_red(t); /// end if; /// end for; /// s.color = blue; /// end; /// /// procedure dfs_red(s) /// begin /// if s.color == cyan then /// report cycle; /// end if; /// s.color = red; /// for all t in post(s) do /// if t.color == blue then /// call dfs_red(t); /// end if; /// end for; /// end; ///

It is an adaptation to TBA of the one presented in
@verbatim 

/// {SE04, /// author = {Stefan Schwoon and Javier Esparza}, /// institution = {Universit{"a}t Stuttgart, Fakult"at Informatik, /// Elektrotechnik und Informationstechnik}, /// month = {November}, /// number = {2004/06}, /// title = {A Note on On-The-Fly Verification Algorithms}, /// year = {2004}, /// url = ///{http://www.fmi.uni-stuttgart.de/szs/publications/info/schwoosn.SE04.shtml} /// } ///

\sa spot::explicit_magic_search
emptiness_check* spot::explicit_tau03_opt_search ( const tgba *  a,
option_map  o = option_map() 
)

Returns an emptiness checker on the spot::tgba automaton a.

\pre The automaton \a a must have at least one acceptance condition.

During the visit of \a a, the returned checker stores explicitely all
the traversed states. The implemented algorithm is the following:

@verbatim 

/// procedure check () /// begin /// weight = 0; // the null vector /// call dfs_blue(s0); /// end; /// /// procedure dfs_blue (s) /// begin /// s.color = cyan; /// s.acc = emptyset; /// s.weight = weight; /// for all t in post(s) do /// let (s, l, a, t) be the edge from s to t; /// if t.color == white then /// for all b in a do /// weight[b] = weight[b] + 1; /// end for; /// call dfs_blue(t); /// for all b in a do /// weight[b] = weight[b] - 1; /// end for; /// end if; /// Acc = s.acc U a; /// if t.color == cyan && /// (Acc U support(weight - t.weight) U t.acc) == all_acc then /// report a cycle; /// else if Acc not included in t.acc then /// t.acc := t.acc U Acc; /// call dfs_red(t, Acc); /// end if; /// end for; /// s.color = blue; /// end; /// /// procedure dfs_red(s, Acc) /// begin /// for all t in post(s) do /// let (s, l, a, t) be the edge from s to t; /// if t.color == cyan && /// (Acc U support(weight - t.weight) U t.acc) == all_acc then /// report a cycle; /// else if t.color != white and Acc not included in t.acc then /// t.acc := t.acc U Acc; /// call dfs_red(t, Acc); /// end if; /// end for; /// end; ///

This algorithm is a generalisation to TGBA of the one implemented in
spot::explicit_se05_search. It is based on the acceptance set labelling
of states used in spot::explicit_tau03_search. Moreover, it introduce
a slight optimisation based on vectors of integers counting for each
acceptance condition how many time the condition has been visited in
the path stored in the blue stack. Such a vector is associated to each
state of this stack.
emptiness_check* spot::explicit_tau03_search ( const tgba *  a,
option_map  o = option_map() 
)

Returns an emptiness checker on the spot::tgba automaton a.

\pre The automaton \a a must have at least one acceptance condition.

During the visit of \a a, the returned checker stores explicitely all
the traversed states. The implemented algorithm is the following:

@verbatim 

/// procedure check () /// begin /// call dfs_blue(s0); /// end; /// /// procedure dfs_blue (s) /// begin /// s.color = blue; /// s.acc = emptyset; /// for all t in post(s) do /// if t.color == white then /// call dfs_blue(t); /// end if; /// end for; /// for all t in post(s) do /// let (s, l, a, t) be the edge from s to t; /// if s.acc U a not included in t.acc then /// call dfs_red(t, a U s.acc); /// end if; /// end for; /// if s.acc == all_acc then /// report a cycle; /// end if; /// end; /// /// procedure dfs_red(s, A) /// begin /// s.acc = s.acc U A; /// for all t in post(s) do /// if t.color != white and A not included in t.acc then /// call dfs_red(t, A); /// end if; /// end for; /// end; ///

This algorithm is the one presented in

@verbatim 

/// {HUT-TCS-A83, /// address = {Espoo, Finland}, /// author = {Heikki Tauriainen}, /// institution = {Helsinki University of Technology, Laboratory for /// Theoretical Computer Science}, /// month = {December}, /// number = {A83}, /// pages = {132}, /// title = {On Translating Linear Temporal Logic into Alternating and /// Nondeterministic Automata}, /// type = {Research Report}, /// year = {2003}, /// url = {http://www.tcs.hut.fi/Publications/info/bibdb.HUT-TCS-A83.shtml} /// } ///

emptiness_check* spot::magic_search ( const tgba *  a,
option_map  o = option_map() 
)

Wrapper for the two magic_search implementations.

This wrapper calls explicit_magic_search_search() or bit_state_hashing_magic_search() according to the "bsh" option in the option_map. If "bsh" is set and non null, its value is used as the size of the hash map.

emptiness_check* spot::se05 ( const tgba *  a,
option_map  o 
)

Wrapper for the two se05 implementations.

This wrapper calls explicit_se05_search() or bit_state_hashing_se05_search() according to the "bsh" option in the option_map. If "bsh" is set and non null, its value is used as the size of the hash map.


Please comment this page and report errors about it on the RefDocComments page.
Generated on Wed Mar 6 2013 09:25:15 for spot by doxygen 1.8.1.2