get rid of tgba_tba_proxy

Replace it by a new degeneralize_tba(), that use the same tricks as
degeneralize().

* src/tgba/tgbatba.cc, src/tgba/tgbatba.hh: Delete.
* src/tgba/Makefile.am: Adjust.
* src/tgbaalgos/degen.cc, src/tgbaalgos/degen.hh: Implement
a degeneralize_tba() function sharing its code
with degeneralize().
* src/tgbatest/ltl2tgba.cc: Rename -D to -DT so that we can pass it the
same option as -DS.
* src/tgbatest/degenid.test, src/tgbatest/emptchk.test,
src/tgbatest/emptchke.test, src/tgbatest/ltlcounter.test,
src/tgbatest/ltlcross.test, src/tgbatest/spotlbtt.test,
src/tgbatest/ltl2tgba.test: Adjust.
* src/tgbatest/det.test, src/tgbatest/emptchk.test: Adjust numbers to
the smaller output.
* src/saba/sabacomplementtgba.cc, src/saba/sabacomplementtgba.hh,
src/tgbaalgos/minimize.cc, src/tgbaalgos/neverclaim.cc,
src/tgbaalgos/neverclaim.hh, src/tgbaalgos/postproc.cc,
src/tgbatest/randtgba.cc, src/tgbatest/complementation.cc,
wrap/python/spot.i, wrap/python/tests/ltl2tgba.py,
src/sabatest/sabacomplementtgba.cc: Adjust to the removal
of tgba_tba_proxy, using degeneralize_tba() if needed.
This commit is contained in:
Alexandre Duret-Lutz 2014-08-12 13:32:32 +02:00
parent e9893586cc
commit 5739240c0f
25 changed files with 488 additions and 1090 deletions

View file

@ -36,7 +36,6 @@
#include "tgbaalgos/save.hh"
#include "tgbaalgos/dotty.hh"
#include "tgbaalgos/lbtt.hh"
#include "tgba/tgbatba.hh"
#include "tgba/tgbasgba.hh"
#include "tgbaalgos/degen.hh"
#include "tgba/tgbaproduct.hh"
@ -190,7 +189,7 @@ syntax(char* prog)
<< std::endl
<< " -lS move generalized acceptance conditions to states "
<< "(SGBA)" << std::endl
<< " -D degeneralize the automaton as a TBA" << std::endl
<< " -DT degeneralize the automaton as a TBA" << std::endl
<< " -DS degeneralize the automaton as an SBA" << std::endl
<< " (append z/Z, o/O, l/L: to turn on/off options "
<< "(default: zol)\n "
@ -451,15 +450,18 @@ main(int argc, char** argv)
}
else if (!strcmp(argv[formula_index], "-D"))
{
degeneralize_opt = DegenTBA;
std::cerr << "-D was renamed to -DT\n";
abort();
}
else if (!strcmp(argv[formula_index], "-DC"))
{
opt_dtgbacomp = true;
}
else if (!strncmp(argv[formula_index], "-DS", 3))
else if (!strncmp(argv[formula_index], "-DS", 3)
|| !strncmp(argv[formula_index], "-DT", 3))
{
degeneralize_opt = DegenSBA;
degeneralize_opt =
argv[formula_index][2] == 'S' ? DegenSBA : DegenTBA;
const char* p = argv[formula_index] + 3;
while (*p)
{
@ -1354,7 +1356,10 @@ main(int argc, char** argv)
{
if (degeneralize_opt == DegenTBA)
{
degeneralized = a = new spot::tgba_tba_proxy(a);
degeneralized = a = spot::degeneralize_tba(a,
degen_reset,
degen_order,
degen_cache);
}
else if (degeneralize_opt == DegenSBA)
{
@ -1604,7 +1609,13 @@ main(int argc, char** argv)
degeneralize_opt = DegenTBA;
if (degeneralize_opt == DegenTBA)
{
product_degeneralized = a = new spot::tgba_tba_proxy(a);
tm.start("degeneralize product");
product_degeneralized = a =
spot::degeneralize_tba(a,
degen_reset,
degen_order,
degen_cache);
tm.stop("degeneralize product");
}
else if (degeneralize_opt == DegenSBA)
{