* src/tgbaalgos/magic.hh: Fix a comment and remove se05 interface.
* src/tgbaalgos/magic.cc: Fix a comment. * src/tgbaalgos/se05.hh: New file. * src/tgbaalgos/se05.cc: Fix a comment. * src/tgbaalgos/tau03.hh: New file. * src/tgbaalgos/tau03.cc: New file. * src/tgbaalgos/Makefile.am: Add it. * src/tgbatest/ltl2tgba.cc: Add tau03 new emptiness check. * src/tgbatest/randtgba.cc: Add tau03 new emptiness check. * src/tgbatest/emptchkr: Fix a comment. * src/tgbatest/tba_samples_from_spin/explicit1_1.tba, src/tgbatest/tba_samples_from_spin/explicit1_2.tba, src/tgbatest/tba_samples_from_spin/explicit1_3.tba, src/tgbatest/tba_samples_from_spin/explicit1_4.tba, src/tgbatest/tba_samples_from_spin/explicit1_5.tba, src/tgbatest/tba_samples_from_spin/explicit1_6.tba, src/tgbatest/tba_samples_from_spin/explicit1_7.tba, src/tgbatest/tba_samples_from_spin/explicit1_8.tba, src/tgbatest/tba_samples_from_spin/explicit1_9.tba, src/tgbatest/tba_samples_from_spin/explicit2_1.tba, src/tgbatest/tba_samples_from_spin/explicit2_2.tba, src/tgbatest/tba_samples_from_spin/explicit2_3.tba, src/tgbatest/tba_samples_from_spin/explicit2_4.tba, src/tgbatest/tba_samples_from_spin/explicit2_5.tba, src/tgbatest/tba_samples_from_spin/explicit2_6.tba, src/tgbatest/tba_samples_from_spin/explicit2_7.tba, src/tgbatest/tba_samples_from_spin/explicit2_8.tba, src/tgbatest/tba_samples_from_spin/explicit2_9.tba: New files * src/tgbatest/tba_samples_from_spin.test : New test. * src/tgbatest/Makefile.am: Add it.
This commit is contained in:
parent
c3e399c837
commit
9bea364e40
31 changed files with 836079 additions and 133 deletions
|
|
@ -22,25 +22,26 @@
|
|||
#ifndef SPOT_TGBAALGOS_MAGIC_HH
|
||||
# define SPOT_TGBAALGOS_MAGIC_HH
|
||||
|
||||
#include "tgba/tgba.hh"
|
||||
#include "emptiness.hh"
|
||||
#include <cstddef>
|
||||
|
||||
namespace spot
|
||||
{
|
||||
class tgba;
|
||||
class emptiness_check;
|
||||
|
||||
/// \addtogroup emptiness_check_algorithms
|
||||
/// @{
|
||||
|
||||
/// \brief Returns an emptiness checker on the spot::tgba automaton \a a.
|
||||
/// During the visit of \a a, the returned checker stores explicitely all
|
||||
/// the traversed states.
|
||||
///
|
||||
/// \pre The automaton \a a must have at most one accepting condition (i.e.
|
||||
/// it is a TBA).
|
||||
///
|
||||
/// The method \a check() of the returned checker can be called several times
|
||||
/// 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 the following.
|
||||
/// paths. The implemented algorithm is the following:
|
||||
///
|
||||
/// \verbatim
|
||||
/// procedure check ()
|
||||
|
|
@ -95,111 +96,31 @@ namespace spot
|
|||
emptiness_check* explicit_magic_search(const tgba *a);
|
||||
|
||||
/// \brief Returns an emptiness checker on the spot::tgba automaton \a a.
|
||||
/// During the visit of \a a, the returned checker does not store explicitely
|
||||
/// the traversed states but uses the bit state hashing technic. However, the
|
||||
/// implemented algorithm is the same as the one of
|
||||
/// spot::explicit_magic_search.
|
||||
///
|
||||
/// \pre The automaton \a a must have at most one accepting 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
|
||||
/// @book{Holzmann91,
|
||||
/// author = {G.J. Holzmann},
|
||||
/// title = {Design and Validation of Computer Protocols},
|
||||
/// publisher = {Prentice-Hall},
|
||||
/// address = {Englewood Cliffs, New Jersey},
|
||||
/// year = {1991}
|
||||
/// }
|
||||
/// \endverbatim
|
||||
///
|
||||
/// Consequently, the detection of an acceptence cycle is not ensured. The
|
||||
/// implemented algorithm is the same as the one of
|
||||
/// spot::explicit_magic_search.
|
||||
///
|
||||
/// \sa spot::explicit_magic_search
|
||||
///
|
||||
emptiness_check* bit_state_hashing_magic_search(const tgba *a, size_t size);
|
||||
|
||||
/// \brief Returns an emptiness check on the spot::tgba automaton \a a.
|
||||
/// During the visit of \a a, the returned checker stores explicitely all
|
||||
/// the traversed states.
|
||||
///
|
||||
/// \pre The automaton \a a must have at most one accepting condition (i.e.
|
||||
/// it is a TBA).
|
||||
///
|
||||
/// The method \a check() of the returned checker can be called several times
|
||||
/// (until it returns a null pointer) to enumerate all the visited accepting
|
||||
/// paths. The implemented algorithm is the following:
|
||||
///
|
||||
/// \verbatim
|
||||
/// procedure check ()
|
||||
/// begin
|
||||
/// weight = 0;
|
||||
/// call dfs_blue(s0);
|
||||
/// end;
|
||||
///
|
||||
/// procedure dfs_blue (s)
|
||||
/// begin
|
||||
/// s.color = cyan;
|
||||
/// s.weight = weight;
|
||||
/// for all t in post(s) do
|
||||
/// if t.color == white then
|
||||
/// if the edge (s,t) is accepting then
|
||||
/// weight = weight + 1;
|
||||
/// end if;
|
||||
/// call dfs_blue(t);
|
||||
/// if the edge (s,t) is accepting then
|
||||
/// weight = weight - 1;
|
||||
/// end if;
|
||||
/// else if t.color == cyan and
|
||||
/// (the edge (s,t) is accepting or
|
||||
/// weight > t.weight) 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 != red then
|
||||
/// call dfs_red(t);
|
||||
/// end if;
|
||||
/// end for;
|
||||
/// end;
|
||||
/// \endverbatim
|
||||
///
|
||||
/// It is an adaptation to TBA (and a slight extension) of the one
|
||||
/// presented in
|
||||
/// \verbatim
|
||||
/// InProceedings{ schwoon.05.tacas,
|
||||
/// author = {Stephan Schwoon and Javier Esparza},
|
||||
/// title = {A Note on On-The-Fly Verification Algorithms},
|
||||
/// booktitle = {TACAS'05},
|
||||
/// pages = {},
|
||||
/// year = {2005},
|
||||
/// volume = {},
|
||||
/// series = {LNCS},
|
||||
/// publisher = {Springer-Verlag}
|
||||
/// }
|
||||
/// \endverbatim
|
||||
///
|
||||
/// The extention consists in the introduction of a weight associated
|
||||
/// to each state in the blue stack (the cyan states). The weight of a
|
||||
/// cyan state corresponds to the number of accepting arcs traversed to reach
|
||||
/// it from the initial state. Weights are used to detect accepting cycle in
|
||||
/// the blue dfs.
|
||||
///
|
||||
emptiness_check* explicit_se05_search(const tgba *a);
|
||||
|
||||
/// \brief Returns an emptiness checker on the spot::tgba automaton \a a.
|
||||
/// During the visit of \a a, the returned checker does not store explicitely
|
||||
/// the traversed states but uses the bit state hashing technic. However, the
|
||||
/// implemented algorithm is the same as the one of
|
||||
/// spot::explicit_se05_search.
|
||||
///
|
||||
/// \pre The automaton \a a must have at most one accepting condition (i.e.
|
||||
/// it is a TBA).
|
||||
///
|
||||
/// \sa spot::explicit_se05_search
|
||||
///
|
||||
emptiness_check* bit_state_hashing_se05_search(const tgba *a, size_t size);
|
||||
|
||||
/// @}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue