Keep acceptance conditions on transitions going to accepting SCCs

by default in scc_filter().

Doing so helps the degeneralization algorithm, because it will
have more opportunity to be in an accepting level when it reaches
the accepting SCCs.

* src/tgbaalgos/sccfilter.cc (filter_iter::filter_iter): Take a
remove_all_useless argument.
(filter_iter::process_link): Use the flag to decide whether to
filter acceptance conditions going to accepting SCCs.
(scc_filter): Take a remove_all_useless argument and pass it to
filter_iter.
* src/tgbaalgos/sccfilter.hh (filter_iter): Add the new argument
and document the function.
* src/tgbatest/tgbatests/ltl2tgba.cc (main): Add option use -R3
for remove_all_useless=false and add -R3f for
remove_all_useless=true.
* src/tgbatest/ltl2tgba.test: Show one case where -R3f makes
the degeneralization worse than -R3.
This commit is contained in:
Alexandre Duret-Lutz 2010-03-06 00:18:33 +01:00
parent 2140256004
commit 27b419ce17
5 changed files with 93 additions and 18 deletions

View file

@ -75,3 +75,17 @@ for opt in '' -D -DS; do
grep 'transitions: 6$' stdout
grep 'states: 4$' stdout
done
# Make sure '(G (p -> F q)) && ((X (p) U q) || ! X (p U (p && q)))'
# has 6 states and 15 transitions, before and after degeneralization.
f='(G (p -> F q)) && ((X (p) U q) || ! X (p U (p && q)))'
for opt in '' -D -DS; do
../ltl2tgba -k -f -R3 $opt "$f" > stdout
grep 'transitions: 15$' stdout
grep 'states: 6$' stdout
done
# Note: this is worse with -R3f.
../ltl2tgba -k -f -R3f -DS "$f" > stdout
grep 'transitions: 17$' stdout
grep 'states: 7$' stdout