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:
parent
7c0ce376c5
commit
9923cbaae0
2 changed files with 24 additions and 17 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue