strength: fix is_terminal()

Fix #198.  Reported by Maximilien Colange.

* spot/twaalgos/strength.cc (is_terminal): Test that no accepting
transition lead to a rejecting SCC.
* tests/core/strength.test: Add test case.
* spot/twaalgos/strength.hh, spot/twa/twa.hh, doc/org/concepts.org:
Adjust documentation.
* NEWS: Mention the fix.
This commit is contained in:
Alexandre Duret-Lutz 2016-11-28 16:19:05 +01:00
parent 2fbc75f439
commit 9bc978a90f
6 changed files with 133 additions and 15 deletions

View file

@ -1179,10 +1179,12 @@ namespace spot
/// \brief Whether the automaton is terminal.
///
/// An automaton is terminal if it is weak, no non-accepting cycle
/// can be reached from an accepting cycle, and the accepting
/// strongly components are complete (i.e., any suffix is accepted
/// as soon as we enter an accepting component).
/// An automaton is terminal if it is weak, its accepting strongly
/// components are complete, and no accepting edge lead to a
/// non-accepting SCC.
///
/// This property ensures that a word can be accepted as soon as
/// on of its prefixes move through an accepting edge.
///
/// \see prop_weak()
/// \see prop_inherently_weak()