parseaut: improve parsing of HOA labels

On a debug build with the automaton from #476, the gain seems to be
about 33% of the parsing time.

* spot/parseaut/parseaut.yy, spot/parseaut/parsedecl.hh,
spot/parseaut/scanaut.ll: Share a hash map of string->BDD
between the scanner and parser so that [labels] can be looked
up by the scanner if they have already been parsed once.
* NEWS: Mention it.
This commit is contained in:
Alexandre Duret-Lutz 2021-09-13 17:21:49 +02:00
parent 9539fbcf4c
commit ce1cf5507f
4 changed files with 51 additions and 17 deletions

6
NEWS
View file

@ -232,6 +232,12 @@ New in spot 2.9.8.dev (not yet released)
that error messages should be emitted as if the next automaton
was read from "filename" starting on line 10. (Issue #232)
- The automaton parser for HOA will now be faster at parsing files
where a label is used multiple times (i.e., most automata): it
uses a hash table to avoid reconstructing BDDs corresponding to
label that have already been parsed. This trick was already used
in the never claim parser.
- spot::twa_graph::merge_states() will now sort the vector of edges
before attempting to detect mergeable states. When merging states
with identical outgoing transitions, it will now also consider