introduce count_univbranch_states() and count_univbranch_edges()

Fixes #368, suggested by František Blahoudek.

* spot/twaalgos/isdet.cc, spot/twaalgos/isdet.hh
(count_univbranch_states(), count_univbranch_edges()): New functions.
* bin/common_aoutput.cc, bin/common_aoutput.hh: Add %u and variants.
* NEWS: Mention these.
* tests/core/alternating.test: Test them.
This commit is contained in:
Alexandre Duret-Lutz 2018-11-07 16:59:43 +01:00
parent 60296317c7
commit 29e08a1afb
6 changed files with 125 additions and 4 deletions

View file

@ -53,6 +53,8 @@ State: 6 "t"
--END--
EOF
test "1 2 4" = "`autfilt --stats='%u %[s]u %[e]u' alt.hoa`"
autfilt --has-univ-branch --has-exist-branch --dot=bans alt.hoa >alt.dot
cat >expect.dot <<EOF
@ -986,4 +988,9 @@ State: 2 {0}
[t] 2&1
--END--
EOF
test '2 0 1 1 1' = "`autfilt --stats='%[iw]c %[W]c %[c]c %[C]c %[t]c' in`"
stats='%[iw]c_%[W]c_%[c]c_%[C]c_%[t]c_%U_%[e]U_%[s]U'
test '2_0_1_1_1_1_3_3' = "`autfilt --stats=$stats in`"
autfilt --stats='%[x]U' in 2>stderr && exit2
grep '%\[x\]U' stderr