tl: mp_class() and --format=%[vw]h

Tools for deciding the class of a formula.

* spot/tl/hierarchy.cc, spot/tl/hierarchy.hh: New files.
* spot/tl/Makefile.am: Add them.
* bin/common_output.cc, bin/common_output.hh: Implement --format=%h.
* tests/core/hierarchy.test: More tests.
* NEWS: Update.
This commit is contained in:
Alexandre Duret-Lutz 2017-01-10 21:34:56 +01:00
parent de8a248fb2
commit 7d9ce0d6fc
7 changed files with 276 additions and 11 deletions

View file

@ -44,3 +44,21 @@ test 3 -eq `genltl --dac | ltlfilt --recurrence -v -c`
test 3 -eq `genltl --dac | ltl2tgba -G -D -S |
autfilt --generalized-rabin | dstar2tgba |
autfilt --is-deterministic -v -c`
test "$(echo $(genltl --dac --format='%h') | sed 's/ //g')" = \
SSSSSGSOSRSSSSSSSSSSSSPSSRSRSRSSSSSSSSSSRORRRRSRSTRSRST
# Implementations of uniq differ in the number of leading spaces, so
# we remove them all.
genltl --dac --format='%[vw]h' | sort | uniq -c |
sed 's/^ *\([0-9]\+\) \+/\1 /g' >out
cat >expected <<EOF
1 guarantee obligation persistence recurrence reactivity
2 obligation persistence recurrence reactivity
1 persistence reactivity
2 reactivity
12 recurrence reactivity
37 safety obligation persistence recurrence reactivity
EOF
diff out expected