dstar: implement dra_to_dba()

This is an implementation of Krishnan's ISAAC'94 paper to convert
deterministic Rabin automata into DBA when possible.

* src/dstarparse/dra2dba.cc: New file.
* src/dstarparse/dstar2tgba.cc: New file.
* src/dstarparse/Makefile.am: Add them.
* src/dstarparse/nra2nba.cc (nra_to_nba): Adjust so
that dra_to_dba() can call it using a masked automaton.
* src/dstarparse/public.hh (dra_to_dba, dstar_to_tgba): Declare.
* src/tgbatest/ltl2tgba.cc: Add an -XDD option.
* src/tgbatest/dstar.test: More tests.
This commit is contained in:
Alexandre Duret-Lutz 2013-08-16 17:01:44 +02:00
parent ce0aec604c
commit 9a7590a646
7 changed files with 516 additions and 23 deletions

View file

@ -106,13 +106,40 @@ namespace spot
/// \brief Convert a non-deterministic Rabin automaton into a
/// non-deterministic Büchi automaton.
SPOT_API
tgba* nra_to_nba(const dstar_aut* nra);
SPOT_API tgba*
nra_to_nba(const dstar_aut* nra);
/// \brief Convert a non-deterministic Rabin automaton into a
/// non-deterministic Büchi automaton.
///
/// This version simply ignores all states in \a ignore.
SPOT_API tgba*
nra_to_nba(const dstar_aut* nra, const state_set* ignore);
/// \brief Convert a deterministic Rabin automaton into a
/// deterministic Büchi automaton when possible.
///
/// See "Deterministic ω-automata vis-a-vis Deterministic Büchi
/// Automata", S. Krishnan, A. Puri, and R. Brayton (ISAAC'94) for
/// more details.
///
/// If the DRA is DBA-realizable, return that DBA. Otherwise,
/// return NULL.
SPOT_API tgba*
dra_to_dba(const dstar_aut* dra);
/// \brief Convert a non-deterministic Streett automaton into a
/// non-deterministic tgba.
SPOT_API
tgba* nsa_to_tgba(const dstar_aut* nra);
SPOT_API tgba*
nsa_to_tgba(const dstar_aut* nra);
/// \brief Convert a Rabin or Streett automaton into a TGBA.
///
/// For DRA, this function uses dra_to_dba() when possible, or fall
/// back to nra_to_nba().
SPOT_API tgba*
dstar_to_tgba(const dstar_aut* dstar);
/// @}
}