Make --keep-states more useful by actually removing states.

Fixes #70.

We don't modify the behavior of mask_keep_states(), because it is
actually useful in some algorithm to remove states without renumbering
all the other states.

* src/bin/autfilt.cc: Call purge_dead_states().
* src/tgbatest/maskkeep.test: Adjust.
This commit is contained in:
Alexandre Duret-Lutz 2015-03-25 21:29:42 +01:00
parent 23bcbb5b37
commit 483212d275
2 changed files with 12 additions and 33 deletions

View file

@ -506,7 +506,10 @@ namespace
// Postprocessing.
if (!opt_keep_states.empty())
aut = mask_keep_states(aut, opt_keep_states, opt_keep_states_initial);
{
aut = mask_keep_states(aut, opt_keep_states, opt_keep_states_initial);
aut->purge_dead_states();
}
if (opt_mask_acc)
aut = mask_acc_sets(aut, opt_mask_acc & aut->acc().all_sets());