translator: add tls-max-states option

This restricts the time spent in translating sub-formulas for
implication tests by limiting the associated automata to 64 states by
default.  Doing so this does worsen any test case, and actually remove
all calls the BuDDy's GC in bdd.test.

* spot/twaalgos/translate.cc, spot/twaalgos/translate.hh,
spot/tl/simplify.cc, spot/tl/simplify.hh, spot/tl/contain.hh,
spot/tl/contain.cc, spot/twaalgos/ltl2tgba_fm.cc,
spot/twaalgos/ltl2tgba_fm.hh: Add support for the option or
its constraint via an output_aborter.
* bin/spot-x.cc, NEWS: Document it.
* tests/core/bdd.test: Adjust and augment test case.
This commit is contained in:
Alexandre Duret-Lutz 2020-09-17 20:49:23 +02:00
parent 9d7e6386e4
commit f5965966e9
11 changed files with 66 additions and 11 deletions

View file

@ -23,7 +23,8 @@ set -e
# Make sure that setting the SPOT_BDD_TRACE envvar actually does
# something.
genltl --kr-nlogn=2 | SPOT_BDD_TRACE=1 ltl2tgba -D >out 2>err
genltl --kr-nlogn=2 |
SPOT_BDD_TRACE=1 ltl2tgba -x tls-max-states=0 -D >out 2>err
cat err
grep spot: out && exit 1
grep 'spot: BDD package initialized' err
@ -34,3 +35,10 @@ test 11 = `grep -c 'spot: BDD GC' err`
# Minimal size for this automaton.
# See also https://www.lrde.epita.fr/dload/spot/mochart10-fixes.pdf
test "147,207" = `autfilt --stats=%s,%e out`
# With the default value of tls-max-states, no GC is needed
genltl --kr-nlogn=2 | SPOT_BDD_TRACE=1 ltl2tgba -D --stats=%s,%e >out 2>err
cat err
grep 'spot: BDD package initialized' err
test 0 = `grep -c 'spot: BDD GC' err`
test "147,207" = `cat out`