stats: speed up the computation of transitions

Juraj Major reported a case with 32 APs where ltlcross would take
forever to gather statistics.  It turns out that for each edge,
twa_sub_statistics was enumerating all compatible assignments of 32
APs.  This uses bdd_satcountset() instead, and also store the result
in a long long to avoid overflows.

* spot/twaalgos/stats.cc (twa_sub_statistics): Improve the code for
counting transitions.
* bin/common_aoutput.hh, bin/ltlcross.cc, spot/twaalgos/stats.hh:
Store transition counts are long long.
* tests/core/readsave.test: Add test case.
* NEWS: Mention the bug.
This commit is contained in:
Alexandre Duret-Lutz 2020-05-18 16:52:31 +02:00
parent 4608d9a5b1
commit d25fcb23eb
6 changed files with 45 additions and 21 deletions

8
NEWS
View file

@ -21,6 +21,14 @@ New in spot 2.9.0.dev (not yet released)
spot::translator class when creating deterministic automata with
generic acceptance.
Bugs fixed:
- spot::twa_sub_statistics was very slow at computing the number of
transitons, and could overflow. It is now avoiding some costly
loop of BDD operations, and storing the result using at least 64
bits. This affects the output of "ltlcross --csv" and
"--stats=%t" for many tools.
New in spot 2.9 (2020-04-30)
Command-line tools: