Optimize tgba_tba_proxy and tgba_sba_proxy for states that share

an acceptance condition on all outgoing transitions.

This was motivated by experiments from Rdiger Ehlers, showing
that "ltl2ba -f 'a U (b U c)'" outperformed "ltl2tgba -f -N -R3 'a
U (b U c)'".  With this change and the previous one, it is no
longer the case.

* src/tgba/tgbatba.cc (tgba_tba_proxy_succ_iterator::aut_): Store
a pointer to the source automaton and...
(tgba_tba_proxy_succ_iterator::sync_): ... use it in an extra
optimization step to gather the acceptance conditions common
to all outgoing transitions of the destination state, and pretend
they are on the current (ingoing) transition.
(tgba_tba_proxy::succ_iter): Pass the
source automaton to the constructed iterator.
* src/tgbatest/spotlbtt.test: Test -f -N -R3 -r7.
* src/tgbatest/ltl2tgba.test: Add a test case for 'a U (b U c)'.
This commit is contained in:
Alexandre Duret-Lutz 2010-03-03 10:52:38 +01:00
parent efb15a9171
commit 96cc3a3f67
4 changed files with 63 additions and 6 deletions

View file

@ -50,3 +50,12 @@ check 'a R (b R c)'
check '(a U b) U (c U d)'
check '((Xp2)U(X(1)))&(p1 R(p2 R p0))'
# Make sure 'a U (b U c)' has 3 states and 6 transitions,
# before and after degeneralization.
for opt in '' -D -DS; do
../ltl2tgba -k -f -R3 $opt 'a U (b U c)' > stdout
grep 'transitions: 6$' stdout
grep 'states: 3$' stdout
done