sccsimpl: Remove Fin sets between SCCs

We do not remove them in rejecting SCCs (as it might make the SCC
accepting), but we can remove them between SCCs.

Fixes #101.

* src/twaalgos/sccfilter.cc: Here.
* src/tests/sccsimpl.test: Add test case.
* NEWS: Mention this.
This commit is contained in:
Alexandre Duret-Lutz 2015-08-14 11:31:25 +02:00
parent 2eab0344b9
commit 0143f0d435
3 changed files with 46 additions and 40 deletions

View file

@ -155,10 +155,12 @@ namespace spot
if (keep)
{
unsigned u = this->si->scc_of(dst);
// If the edge is between two SCCs, or in a
// non-accepting SCC. Remove the acceptance sets.
if ((this->si->is_rejecting_scc(u))
|| (RemoveAll && u != this->si->scc_of(src)))
// If the edge is between two SCCs, we can simplify
// remove the acceptance sets. If the SCC is non-accepting,
// we can only remove the Inf sets.
if (RemoveAll && u != this->si->scc_of(src))
acc = 0U;
else if (this->si->is_rejecting_scc(u))
acc &= accmask;
}