remove_fin: improve behavior on unclean acceptance
Related to #188. This is a third fix that independently makes `'utfilt --is-unambiguous -q smaller.hoa' instantaneous. * spot/twaalgos/remfin.cc: Clean the received automaton if necessary. * bin/autfilt.cc: No need to call cleanup_acceptance_here() before remove_fin() anymore. * tests/core/remfin.test: Add an additional test. * NEWS: Mention the change.
This commit is contained in:
parent
3dc084c4f6
commit
56f768f5a6
4 changed files with 363 additions and 4 deletions
|
|
@ -517,6 +517,20 @@ namespace spot
|
|||
if (auto maybe = rabin_to_buchi_maybe(aut))
|
||||
return maybe;
|
||||
|
||||
{
|
||||
// We want a clean acceptance condition, i.e., one where all
|
||||
// sets are useful. If that is not the case, clean it first.
|
||||
acc_cond::mark_t unused = aut->acc().all_sets();
|
||||
for (auto& t: aut->edges())
|
||||
{
|
||||
unused -= t.acc;
|
||||
if (!unused)
|
||||
break;
|
||||
}
|
||||
if (unused)
|
||||
return remove_fin(cleanup_acceptance(aut));
|
||||
}
|
||||
|
||||
std::vector<acc_cond::acc_code> code;
|
||||
std::vector<acc_cond::mark_t> rem;
|
||||
std::vector<acc_cond::mark_t> keep;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue