rename cleanup_acceptance() as cleanup_acceptance_here()

And add a cleanup_acceptance() version that copies.

* src/tgbaalgos/cleanacc.cc, src/tgbaalgos/cleanacc.hh: Rename
and add the second version.
* src/bin/autfilt.cc, src/bin/ltlcross.cc,
src/tgbaalgos/dtgbacomp.cc, src/tgbaalgos/remfin.cc: Use
cleanup_acceptance_here.
This commit is contained in:
Alexandre Duret-Lutz 2015-03-31 10:44:53 +02:00
parent c5ecd09fb6
commit df981a0676
6 changed files with 22 additions and 11 deletions

View file

@ -21,11 +21,11 @@
namespace spot
{
void cleanup_acceptance(tgba_digraph_ptr& aut)
tgba_digraph_ptr cleanup_acceptance_here(tgba_digraph_ptr aut)
{
auto& acc = aut->acc();
if (acc.num_sets() == 0)
return;
return aut;
auto& c = aut->get_acceptance();
acc_cond::mark_t used_in_cond = c.used_sets();
@ -39,7 +39,7 @@ namespace spot
auto useless = acc.comp(useful);
if (!useless)
return;
return aut;
// Remove useless marks from the automaton
for (auto& t: aut->transitions())
@ -50,7 +50,14 @@ namespace spot
// This may in turn cause even more set to be unused, because of
// some simplifications, so do it again.
return cleanup_acceptance(aut);
return cleanup_acceptance_here(aut);
}
tgba_digraph_ptr cleanup_acceptance(const_tgba_digraph_ptr aut)
{
return cleanup_acceptance_here(make_tgba_digraph(aut,
tgba::prop_set::all()));
}
}