postprocess: call restrict_dead_end_edges_here()

Related to issue #587.

* spot/twaalgos/postproc.cc, spot/twaalgos/postproc.hh: Add
support for option "rde".
* bin/spot-x.cc, NEWS: Mention it.
* tests/core/deadends.test, tests/core/ltl2tgba2.test,
tests/python/atva16-fig2a.ipynb, tests/python/deadends.py: Adjust test
cases to reflect the improvement.
* tests/core/ltlsynt.test: Also adjust this test case, which is the
only one worsened.  Some extra gates are generated when translating
GFa<->GFb with --algo=ds or --algo=sd.  Issue #588 would be one way to
fix that.
This commit is contained in:
Alexandre Duret-Lutz 2024-07-17 16:59:07 +02:00
parent 31511e042a
commit 6a7ef4db3f
9 changed files with 75 additions and 41 deletions

View file

@ -59,7 +59,8 @@ FG((Gp2 | Xp3) & (F!p2 | X!p3))
GFp0 & FGp1 & FGp2 & GFp3
EOF
ltl2tgba -F input.ltl | tee output.aut |
# disable rde so we can apply it manually
ltl2tgba -x rde=0 -F input.ltl | tee output.aut |
autfilt --restrict-dead --stats="%T %t %M" |
while read in out f; do
: $in : $out : "$f"
@ -68,3 +69,12 @@ ltl2tgba -F input.ltl | tee output.aut |
done
autcross -F output.aut --language-preserved 'autfilt --restrict-dead'
# by default, the result of ltl2tgba is already restricted
ltl2tgba -F input.ltl |
autfilt --restrict-dead --stats="%T %t %M" |
while read in out f; do
: $in : $out : "$f"
test $in -ne $out && exit 1
:
done

View file

@ -273,7 +273,7 @@ and-fg,32, $fg42, $fg42, $fg42, $fg42, $fg42, $fg42
!sb-patterns,5, 2,7, 2,7, 2,7, 2,7, 3,12, 3,12
!sb-patterns,6, 3,11, 4,14, 3,11, 4,14, 3,11, 4,14
!sb-patterns,7, 4,16, 4,16, 4,16, 4,16, 4,16, 4,16
!sb-patterns,9, 3,13, 3,13, 4,17, 4,17, 5,21, 5,21
!sb-patterns,9, 3,12, 3,12, 4,17, 4,17, 5,21, 5,21
!sb-patterns,10, 2,6, 2,6, 2,6, 2,6, 2,6, 2,6
!sb-patterns,11, 1,0, 1,0, 1,0, 1,0, 1,0, 1,0
!sb-patterns,12, 1,0, 1,0, 1,0, 1,0, 1,0, 1,0
@ -340,7 +340,7 @@ and-fg,32, $fg42, $fg42, $fg42, $fg42, $fg42, $fg42
!hkrss-patterns,53, 4,32, 4,32, 4,32, 4,32, 4,32, 4,32
!hkrss-patterns,54, 4,32, 4,32, 4,32, 4,32, 4,32, 4,32
!hkrss-patterns,55, 5,12, 6,12, 5,12, 6,12, 5,12, 6,12
!p-patterns,2, 2,15, 2,15, 3,19, 3,19, 4,23, 4,23
!p-patterns,2, 2,14, 2,14, 3,19, 3,19, 4,23, 4,23
!p-patterns,3, 3,41, 3,41, 3,41, 3,41, 3,41, 3,41
!p-patterns,4, 1,1, 1,1, 1,1, 1,1, 1,1, 1,1
!p-patterns,5, 2,6, 2,6, 2,6, 2,6, 2,6, 2,6
@ -379,7 +379,7 @@ FG(a | Fb), 3,15, 3,15, 3,15, 3,15, 1,4
FG(a & Fb), 2,7, 2,7, 3,9, 3,9, 1,4
GF(a & Gb), 2,7, 2,7, 3,9, 3,9, 1,4
GF(a | Gb), 2,7, 2,7, 3,12, 3,12, 1,4
Ge | GF(Ge & X(c & Fd)), 4,31, 4,31, 6,39, 6,39, 2,16
Ge | GF(Ge & X(c & Fd)), 4,30, 4,30, 6,39, 6,39, 2,16
F(GF(b & Gc) | Ge), 3,22, 3,22, 4,26, 4,26, 1,8
EOF

View file

@ -22,40 +22,43 @@
set -e
cat >exp <<EOF
parity 17;
0 1 0 7,8;
8 1 1 2;
parity 18;
0 2 0 7,8;
8 2 1 2;
2 3 0 11,12;
12 3 1 2,3;
3 2 0 13,14;
14 2 1 2,3;
13 2 1 1,4;
4 1 0 8,15;
15 1 1 5,6;
6 1 0 8,15;
5 2 0 16,17;
17 2 1 2;
16 2 1 5,6;
13 2 1 4,5;
5 2 0 8,17;
17 2 1 5,6;
6 1 0 10,18;
18 1 1 5,6;
10 1 1 2;
4 1 0 15,16;
16 1 1 2,3;
15 1 1 4,5;
11 3 1 4,5;
7 2 1 0,1;
1 1 0 9,10;
10 1 1 2,3;
9 1 1 1,5;
11 3 1 1,4;
7 1 1 1,2;
parity 13;
0 1 0 1,2;
9 1 1 0,1;
parity 15;
0 2 0 1,2;
2 1 1 3;
3 3 0 5,4;
4 2 1 12,3;
12 2 0 5,4;
5 1 1 6,7;
7 1 0 9,8;
8 3 1 12,3;
9 1 1 11,10;
10 2 0 9,8;
11 1 0 9,8;
6 1 0 13,4;
13 1 1 6,10;
1 1 1 6,3;
3 3 0 4,5;
5 2 1 6,3;
6 2 0 4,5;
4 1 1 7,8;
8 2 0 10,9;
9 3 1 6,3;
10 2 1 11,8;
11 1 0 12,9;
12 1 1 11,8;
7 1 0 13,5;
13 1 1 7,8;
1 2 1 14,0;
14 1 0 15,2;
15 1 1 14,0;
parity 5;
0 1 0 2,3;
3 3 1 1;