Replace prune_scc() by scc_filter().
prune_scc() leaked memory and failed to remove chains of useless SCCs. * src/tgbaalgos/reductgba_sim.cc (reduc_tgba_sim): Call scc_filter() instead of prune_scc(), and do it before running any simulation-based reduction. * src/tgbaalgos/reductgba_sim.hh (reduc_tgba_sim): Return a const tgba*. * src/tgbatest/ltl2tgba.cc: Call scc_filter() instead of prune_scc(). * src/tgbatest/scc.test: Add two more tests that failed with prune_scc().
This commit is contained in:
parent
74f620d192
commit
7ea51cc65f
6 changed files with 122 additions and 66 deletions
|
|
@ -40,6 +40,7 @@
|
|||
#include "tgbaparse/public.hh"
|
||||
#include "tgbaalgos/dupexp.hh"
|
||||
#include "tgbaalgos/neverclaim.hh"
|
||||
#include "tgbaalgos/sccfilter.hh"
|
||||
|
||||
#include "misc/escape.hh"
|
||||
|
||||
|
|
@ -148,21 +149,18 @@ main(int argc, char** argv)
|
|||
spot::free_relation_simulation(rel_del);
|
||||
}
|
||||
|
||||
spot::tgba* res = automatareduc;
|
||||
|
||||
if (o & spot::Reduce_Scc)
|
||||
{
|
||||
automatareduc->prune_scc();
|
||||
//automatareduc->display_scc(std::cout);
|
||||
res = spot::scc_filter(automatareduc);
|
||||
delete automatareduc;
|
||||
}
|
||||
|
||||
if (automatareduc != 0)
|
||||
{
|
||||
spot::dotty_reachable(std::cout, automatareduc);
|
||||
}
|
||||
spot::dotty_reachable(std::cout, res);
|
||||
|
||||
if (automata != 0)
|
||||
delete automata;
|
||||
if (automatareduc != 0)
|
||||
delete automatareduc;
|
||||
delete automata;
|
||||
delete res;
|
||||
#ifndef REDUCCMP
|
||||
if (f != 0)
|
||||
f->destroy();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue