genem: Implement accepting cycle search

Implement an accepting run search in spot::sccinfo, use it with the
generic emptiness check.

* spot/twaalgos/sccinfo.cc, spot/twaalgos/sccinfo.hh: Here.
* spot/twaalgos/genem.cc, spot/twaalgos/genem.hh: Use it.
* tests/python/genem.py: Test it.
This commit is contained in:
Clément Gillard 2018-12-11 13:43:53 +01:00 committed by Alexandre Duret-Lutz
parent 4ecd066c0e
commit 51ca5ecdb1
5 changed files with 217 additions and 16 deletions

View file

@ -19,6 +19,7 @@
#pragma once
#include <spot/twaalgos/emptiness.hh>
#include <spot/twaalgos/sccinfo.hh>
namespace spot
@ -28,6 +29,13 @@ namespace spot
SPOT_API bool
generic_emptiness_check(const const_twa_graph_ptr& aut);
/// \ingroup emptiness_check_algorithms
/// \brief Accepting run search in an automaton, for any acceptance condition.
/// \return An accepting run over the automaton, or nullptr if the language is
/// empty.
SPOT_API twa_run_ptr
generic_accepting_run(const const_twa_graph_ptr& aut);
/// \ingroup emptiness_check_algorithms
/// \brief Emptiness check of one SCC, for any acceptance condition.
SPOT_API bool