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:
Alexandre Duret-Lutz 2015-10-13 19:30:26 +02:00
parent fb642c6df5
commit 06d3bc67ea
18 changed files with 336 additions and 448 deletions

View file

@ -60,7 +60,8 @@
#include "twaalgos/simulation.hh"
#include "twaalgos/compsusp.hh"
#include "twaalgos/powerset.hh"
#include "twaalgos/dtgbacomp.hh"
#include "twaalgos/complement.hh"
#include "twaalgos/remfin.hh"
#include "twaalgos/complete.hh"
#include "twaalgos/dtbasat.hh"
#include "twaalgos/dtgbasat.hh"
@ -338,7 +339,7 @@ checked_main(int argc, char** argv)
bool opt_determinize = false;
unsigned opt_determinize_threshold = 0;
unsigned opt_o_threshold = 0;
bool opt_dtgbacomp = false;
bool opt_dtwacomp = false;
bool reject_bigger = false;
bool opt_monitor = false;
bool containment = false;
@ -411,7 +412,7 @@ checked_main(int argc, char** argv)
}
else if (!strcmp(argv[formula_index], "-DC"))
{
opt_dtgbacomp = true;
opt_dtwacomp = true;
}
else if (!strncmp(argv[formula_index], "-DS", 3)
|| !strncmp(argv[formula_index], "-DT", 3))
@ -1203,14 +1204,14 @@ checked_main(int argc, char** argv)
a = satminimized;
}
if (opt_dtgbacomp)
if (opt_dtwacomp)
{
tm.start("DTGBA complement");
a = dtgba_complement(ensure_digraph(a));
tm.stop("DTGBA complement");
tm.start("DTωA complement");
a = remove_fin(dtwa_complement(ensure_digraph(a)));
tm.stop("DTωA complement");
}
if (opt_determinize || opt_dtgbacomp || opt_dtbasat >= 0
if (opt_determinize || opt_dtwacomp || opt_dtbasat >= 0
|| opt_dtgbasat >= 0)
{
if (scc_filter && (reduction_dir_sim || reduction_rev_sim))