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

@ -28,7 +28,6 @@
#include "priv/countstates.hh"
#include "powerset.hh"
#include "isdet.hh"
#include "tgba/tgbatba.hh"
#include "dtbasat.hh"
#include "dtgbasat.hh"
#include "complete.hh"
@ -273,14 +272,14 @@ namespace spot
// If we don't have a DBA, attempt tba-determinization if requested.
if (tba_determinisation_ && !dba)
{
const tgba* tmpd = 0;
const tgba_digraph* tmpd = 0;
if (PREF_ == Deterministic
&& f
&& f->is_syntactic_recurrence()
&& sim->number_of_acceptance_conditions() > 1)
tmpd = new tgba_tba_proxy(sim);
tmpd = degeneralize_tba(sim);
const tgba* in = tmpd ? tmpd : sim;
auto in = tmpd ? tmpd : sim;
// These thresholds are arbitrary.
//
@ -293,7 +292,7 @@ namespace spot
// are 8 times bigger, with no more that 2^15 cycle per SCC.
// The cycle threshold is the most important limit here. You
// may up it if you want to try producing larger automata.
const tgba* tmp =
auto tmp =
tba_determinize_check(in,
(PREF_ == Small) ? 2 : 8,
1 << ((PREF_ == Small) ? 13 : 15),
@ -341,8 +340,8 @@ namespace spot
// sure it is at least 1.
target_acc = original_acc > 0 ? original_acc : 1;
const tgba* in = 0;
const tgba* to_free = 0;
const tgba_digraph* in = 0;
const tgba_digraph* to_free = 0;
if (target_acc == 1)
{
// If we are seeking a minimal DBA with unknown number of
@ -351,7 +350,7 @@ namespace spot
if (state_based_)
to_free = in = degeneralize(dba);
else if (dba->number_of_acceptance_conditions() != 1)
to_free = in = new tgba_tba_proxy(dba);
to_free = in = degeneralize_tba(dba);
else
in = dba;
}