simulation: Fix co-simulation and iterated simulations of BA automata
* src/tgbaalgos/simulation.hh, src/tgbaalgos/simulation.cc (simulation_sba, cosimulation_sba, iterated_simulations_sba): New function. Also speedup the existing functions by avoiding add_acceptince_conditions() and add_conditions(). Finally, use scc_filter_states() when dealing with degeneralized automata. * src/tgbaalgos/postproc.cc, src/tgbaalgos/postproc.hh (do_ba_simul): New method. Use it after degeneralization. * src/tgba/tgbaexplicit.hh (get_transition, get_state): New methods. * src/tgbatest/basimul.test: New file. * src/tgbatest/Makefile.am (TESTS): Add it. * NEWS: Introduce the new function and summarize the bug.
This commit is contained in:
parent
372790a489
commit
0c7c933805
8 changed files with 303 additions and 110 deletions
|
|
@ -80,6 +80,23 @@ namespace spot
|
|||
}
|
||||
}
|
||||
|
||||
const tgba* postprocessor::do_ba_simul(const tgba* a, int opt)
|
||||
{
|
||||
switch (opt)
|
||||
{
|
||||
case 0:
|
||||
return a;
|
||||
case 1:
|
||||
return simulation_sba(a);
|
||||
case 2:
|
||||
return cosimulation_sba(a);
|
||||
case 3:
|
||||
default:
|
||||
return iterated_simulations_sba(a);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const tgba* postprocessor::do_degen(const tgba* a)
|
||||
{
|
||||
const tgba* d = degeneralize(a,
|
||||
|
|
@ -90,7 +107,7 @@ namespace spot
|
|||
if (ba_simul_ <= 0)
|
||||
return d;
|
||||
|
||||
const tgba* s = do_simul(d, ba_simul_);
|
||||
const tgba* s = do_ba_simul(d, ba_simul_);
|
||||
if (s != d)
|
||||
delete d;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue