restructure the complementation code
The previous code was sometime doing the work of remove_fin() in addition to complementing the acceptance conditions. This separate the two operations clearly. Also the specialized code for complementing weak automata is now a specialized code for remove_fin() on weak automata. * src/twaalgos/dtgbacomp.hh, src/twaalgos/dtgbacomp.cc: Rename as ... * src/twaalgos/complement.hh, src/twaalgos/complement.cc: ... these. * src/twaalgos/Makefile.am: Adjust. * src/twaalgos/complement.hh (dtgba_complement): Rename as ... (dtwa_complement): ... this, and restrict the purpose to completion and accetance complementation. Further acceptance simplification can be done with remove_fin() and to_generalized_buchi(). * src/twaalgos/remfin.cc (remove_fin): Specialize handling of weak automata using the code that was originally in dtgba_complement(). Also mark the output as state-based when the input has to Inf. * src/twaalgos/postproc.cc, src/twaalgos/postproc.hh: Make sure scc_filter is always called after to_generalized_buchi(). * bench/stutter/stutter_invariance_randomgraph.cc, src/bin/ltlcross.cc, src/tests/ikwiad.cc, src/twaalgos/minimize.cc, src/twaalgos/powerset.cc, src/twaalgos/stutter.cc: Adjust usage. * src/tests/dstar.test, src/tests/ltl2dstar4.test, src/tests/remfin.test: Adjust expected outputs. * wrap/python/spot_impl.i: Export dtwa_complement().
This commit is contained in:
parent
fb642c6df5
commit
06d3bc67ea
18 changed files with 336 additions and 448 deletions
|
|
@ -44,7 +44,8 @@
|
|||
#include "twaalgos/ltl2tgba_fm.hh"
|
||||
#include "twaalgos/bfssteps.hh"
|
||||
#include "twaalgos/isdet.hh"
|
||||
#include "twaalgos/dtgbacomp.hh"
|
||||
#include "twaalgos/complement.hh"
|
||||
#include "twaalgos/remfin.hh"
|
||||
|
||||
namespace spot
|
||||
{
|
||||
|
|
@ -632,7 +633,7 @@ namespace spot
|
|||
{
|
||||
// If the automaton is deterministic, complementing is
|
||||
// easy.
|
||||
aut_neg_f = dtgba_complement(aut_f);
|
||||
aut_neg_f = remove_fin(dtwa_complement(aut_f));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -654,7 +655,7 @@ namespace spot
|
|||
{
|
||||
// Complement the minimized WDBA.
|
||||
assert(min_aut_f->is_inherently_weak());
|
||||
auto neg_min_aut_f = dtgba_complement(min_aut_f);
|
||||
auto neg_min_aut_f = remove_fin(dtwa_complement(min_aut_f));
|
||||
if (product(aut_f, neg_min_aut_f)->is_empty())
|
||||
// Finally, we are now sure that it was safe
|
||||
// to minimize the automaton.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue