nra2nba: Produce a tgba_digraph.

* src/dstarparse/nra2nba.cc: Produce tgba_digraph instead
of tgba_explicit_number.
* src/tgbaalgos/sccinfo.hh (is_useful_state): Make sure
it is reachable.
This commit is contained in:
Alexandre Duret-Lutz 2014-08-05 16:08:44 +02:00
parent 7c0ce376c5
commit 9923cbaae0
2 changed files with 24 additions and 17 deletions

View file

@ -68,6 +68,7 @@ namespace spot
std::vector<scc_node> node_;
const tgba_digraph* aut_;
const scc_node& node(unsigned scc) const
{
assert(scc < node_.size());
@ -87,6 +88,11 @@ namespace spot
return node_.size();
}
bool reachable_state(unsigned st) const
{
return scc_of(st) != -1U;
}
unsigned scc_of(unsigned st) const
{
assert(st < sccof_.size());
@ -125,7 +131,7 @@ namespace spot
bool is_useful_state(unsigned st) const
{
return node(scc_of(st)).useful;
return reachable_state(st) && node(scc_of(st)).useful;
}
/// \brief Return the set of all used acceptance combinations, for