From 0143f0d4358424d039d92bcb92750b91f2d7e44e Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Fri, 14 Aug 2015 11:31:25 +0200 Subject: [PATCH] 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. --- NEWS | 4 +++ src/tests/sccsimpl.test | 72 +++++++++++++++++++-------------------- src/twaalgos/sccfilter.cc | 10 +++--- 3 files changed, 46 insertions(+), 40 deletions(-) diff --git a/NEWS b/NEWS index d83235908..eb8cd057a 100644 --- a/NEWS +++ b/NEWS @@ -6,6 +6,10 @@ New in spot 1.99.2a (not yet released) * The html documentation now includes a HTML copies of the man pages, and HTML copies of the Python notebooks. + * scc_filter(aut, true) does not remove Fin marks from rejecting + SCCs, but it now does remove Fin marks from transitions between + SCCs. + * Bugs fixed - Some acceptance conditions like Fin(0)|Fin(1)|Fin(2)&Inf(3) were not detected as generalized-Rabin. diff --git a/src/tests/sccsimpl.test b/src/tests/sccsimpl.test index 65a02bb4b..5fdaf6513 100755 --- a/src/tests/sccsimpl.test +++ b/src/tests/sccsimpl.test @@ -255,7 +255,7 @@ State: 0 [t] 0 State: 1 [!0] 1 {0} -[0] 0 +[0] 0 {0} --END-- HOA: v1 States: 2 @@ -271,41 +271,41 @@ State: 1 --END-- EOF -# run 0 ../../bin/autfilt -C -H --any --high input >output -# cat >expected <output +cat >expected <output cat >expected <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; }