merge_states: don't call defrag_states if unnecessary

* spot/twa/twagraph.cc (merge_states): Return the number
of removed states, and use that to decide if defrag_states
is needed.
* spot/twa/twagraph.hh, NEWS: Document that.
* tests/core/tgbagraph.test, tests/core/twagraph.cc: Adjust test case.
This commit is contained in:
Alexandre Duret-Lutz 2021-07-13 10:20:14 +02:00
parent d019ea61fe
commit 4570c735f3
5 changed files with 40 additions and 12 deletions

2
NEWS
View file

@ -228,6 +228,8 @@ New in spot 2.9.7.dev (not yet released)
before attempting to detect mergeable states. When merging states
with identical outgoing transitions, it will now also consider
self-looping transitions has having identical destinations.
Additionally, this function now returns the number of states that
have been merged (and therefore removed from the automaton).
Python: