stats: fix slow %s and inappropriate %S output

Fixes #269.

* spot/twaalgos/stats.cc: Use twa_statistics instead of
twa_sub_statistics when %t is not used.
* bin/common_aoutput.cc: Likewise, also fix %S to use twa_statistics
instead of num_states(), and document that %s,%t,%e all return
statistics about the reachable part of the automaton.
* tests/core/format.test: Add more tests.
* NEWS: Document the issue.
This commit is contained in:
Alexandre Duret-Lutz 2017-06-19 17:06:56 +02:00
parent 7b5b8f34f0
commit 413d2d6a6c
4 changed files with 81 additions and 11 deletions

6
NEWS
View file

@ -134,6 +134,12 @@ New in spot 2.3.4.dev (not yet released)
SCC) or 'y' (split universal destination by colors) universal
edges could be connected to undefined states.
- Using --stats=%s or --stats=%s or --stats=%t could take an
unnecessary long time on automata with many atomic propositions,
due to a typo. Furthermore, %s/%e/%t/%E/%T were printing
a number of reachable states/edges/transitions, but %S was
incorrectly counting all states even unreachable.
Backward-incompatible changes:
- spot::acc_cond::mark_t::operator bool() has been marked as