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:
parent
2fbc75f439
commit
9bc978a90f
6 changed files with 133 additions and 15 deletions
|
|
@ -79,6 +79,17 @@ namespace spot
|
|||
break;
|
||||
}
|
||||
}
|
||||
// A terminal automaton should accept any word that as a prefix
|
||||
// leading to an accepting edge. In other words, we cannot have
|
||||
// an accepting edge that goes into a rejecting SCC.
|
||||
if (terminal && is_term)
|
||||
for (auto& e: aut->edges())
|
||||
if (si->is_rejecting_scc(si->scc_of(e.dst))
|
||||
&& aut->acc().accepting(e.acc))
|
||||
{
|
||||
is_term = false;
|
||||
break;
|
||||
}
|
||||
exit:
|
||||
if (need_si)
|
||||
delete si;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue