merge transitions: also merge transitions with same conditions

* src/tgba/tgbagraph.cc (merge_transition): Do it.
* src/tgbatest/readsave.test: Test it.
* src/bin/autfilt.cc: Fix statistics about the original
automaton when using --stats or --name.
This commit is contained in:
Alexandre Duret-Lutz 2014-12-17 09:04:28 +01:00
parent b8a38915e5
commit 8e9c431706
3 changed files with 192 additions and 1 deletions

View file

@ -502,7 +502,11 @@ namespace
spot::stopwatch sw;
sw.start();
auto aut = haut->aut;
// If --stats or --name is used, duplicate the automaton so we
// never modify the original automaton (e.g. with
// merge_transitions()) and the statistics about it make sense.
auto aut = ((format == Stats) || opt_name) ?
spot::make_tgba_digraph(haut->aut) : haut->aut;
// Preprocessing.