Store membership to acceptance sets using bitsets, not BDDs.

This is a huge patch, that took over a month to complete.  The bit sets
are currently restricted to what 'unsigned can store', but it should be
easy to extend it to 'uint64_t' should we need it.

* NEWS: Update.
* src/tgba/acc.hh: New file.
* src/tgbatest/acc.cc, src/tgbatest/acc.test: Test it.
* src/tgba/tgbakvcomplement.cc, src/tgba/tgbakvcomplement.hh,
src/tgba/tgbasgba.cc, src/tgba/tgbasgba.hh: Delete.  The KV
complementation is too slow to be used in practice, and I somehow broke
it during the conversion to bitsets.  The tgba->sgba conversion was only
used for the KV complementation, and should be better redone on
tgba_digraph_ptr should it be needed again.
* src/bin/ltlcross.cc, src/dstarparse/dra2ba.cc,
src/dstarparse/nsa2tgba.cc, src/graphtest/tgbagraph.cc,
src/graphtest/tgbagraph.test, src/kripke/fairkripke.cc,
src/kripke/fairkripke.hh, src/kripke/kripke.cc, src/kripke/kripke.hh,
src/kripke/kripkeexplicit.cc, src/kripke/kripkeexplicit.hh,
src/misc/hash.hh, src/neverparse/neverclaimparse.yy, src/priv/accmap.hh,
src/ta/ta.cc, src/ta/ta.hh, src/ta/taexplicit.cc, src/ta/taexplicit.hh,
src/ta/taproduct.cc, src/ta/taproduct.hh, src/ta/tgta.cc,
src/ta/tgta.hh, src/ta/tgtaexplicit.cc, src/ta/tgtaexplicit.hh,
src/ta/tgtaproduct.cc, src/ta/tgtaproduct.hh, src/taalgos/dotty.cc,
src/taalgos/emptinessta.cc, src/taalgos/minimize.cc,
src/taalgos/tgba2ta.cc, src/tgba/Makefile.am, src/tgba/fwd.hh,
src/tgba/taatgba.cc, src/tgba/taatgba.hh, src/tgba/tgba.cc,
src/tgba/tgba.hh, src/tgba/tgbagraph.cc, src/tgba/tgbagraph.hh,
src/tgba/tgbamask.cc, src/tgba/tgbamask.hh, src/tgba/tgbaproduct.cc,
src/tgba/tgbaproduct.hh, src/tgba/tgbaproxy.cc, src/tgba/tgbaproxy.hh,
src/tgba/tgbasafracomplement.cc, src/tgba/tgbasafracomplement.hh,
src/tgbaalgos/bfssteps.cc, src/tgbaalgos/complete.cc,
src/tgbaalgos/compsusp.cc, src/tgbaalgos/degen.cc,
src/tgbaalgos/dotty.cc, src/tgbaalgos/dtbasat.cc,
src/tgbaalgos/dtgbacomp.cc, src/tgbaalgos/dtgbasat.cc,
src/tgbaalgos/dupexp.cc, src/tgbaalgos/emptiness.cc,
src/tgbaalgos/emptiness.hh, src/tgbaalgos/gtec/ce.cc,
src/tgbaalgos/gtec/gtec.cc, src/tgbaalgos/gtec/gtec.hh,
src/tgbaalgos/gtec/sccstack.cc, src/tgbaalgos/gtec/sccstack.hh,
src/tgbaalgos/gv04.cc, src/tgbaalgos/hoaf.cc,
src/tgbaalgos/isweakscc.cc, src/tgbaalgos/lbtt.cc,
src/tgbaalgos/ltl2tgba_fm.cc, src/tgbaalgos/magic.cc,
src/tgbaalgos/ndfs_result.hxx, src/tgbaalgos/neverclaim.cc,
src/tgbaalgos/postproc.cc, src/tgbaalgos/powerset.cc,
src/tgbaalgos/randomgraph.cc, src/tgbaalgos/randomgraph.hh,
src/tgbaalgos/reducerun.cc, src/tgbaalgos/replayrun.cc,
src/tgbaalgos/safety.cc, src/tgbaalgos/save.cc, src/tgbaalgos/scc.cc,
src/tgbaalgos/scc.hh, src/tgbaalgos/sccfilter.cc,
src/tgbaalgos/sccinfo.cc, src/tgbaalgos/sccinfo.hh,
src/tgbaalgos/se05.cc, src/tgbaalgos/simulation.cc,
src/tgbaalgos/simulation.hh, src/tgbaalgos/stats.cc,
src/tgbaalgos/stripacc.cc, src/tgbaalgos/tau03.cc,
src/tgbaalgos/tau03opt.cc, src/tgbaalgos/weight.cc,
src/tgbaalgos/weight.hh, src/tgbaparse/tgbaparse.yy,
src/tgbatest/Makefile.am, src/tgbatest/complementation.cc,
src/tgbatest/complementation.test, src/tgbatest/degenlskip.test,
src/tgbatest/det.test, src/tgbatest/dstar.test, src/tgbatest/emptchk.cc,
src/tgbatest/explpro2.test, src/tgbatest/explpro3.test,
src/tgbatest/explpro4.test, src/tgbatest/explprod.test,
src/tgbatest/ltl2tgba.cc, src/tgbatest/ltl2tgba.test,
src/tgbatest/maskacc.cc, src/tgbatest/maskacc.test,
src/tgbatest/neverclaimread.test, src/tgbatest/randtgba.cc,
src/tgbatest/readsave.test, src/tgbatest/sim.test,
src/tgbatest/sim2.test, src/tgbatest/spotlbtt.test,
src/tgbatest/tgbaread.test, src/tgbatest/tripprod.test,
iface/dve2/dve2.cc: Adjust or use to the new acceptance interface.
This commit is contained in:
Alexandre Duret-Lutz 2014-09-29 18:17:34 +02:00
parent 37ece2b878
commit 2c764fb3c7
125 changed files with 1950 additions and 3254 deletions

View file

@ -37,7 +37,6 @@
#include "tgbaalgos/dotty.hh"
#include "tgbaalgos/lbtt.hh"
#include "tgbaalgos/hoaf.hh"
#include "tgba/tgbasgba.hh"
#include "tgbaalgos/degen.hh"
#include "tgba/tgbaproduct.hh"
#include "tgbaalgos/reducerun.hh"
@ -187,8 +186,6 @@ syntax(char* prog)
<< "Automaton degeneralization (after translation):"
<< std::endl
<< " -lS move generalized acceptance conditions to states "
<< "(SGBA)" << 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 "
@ -339,7 +336,6 @@ checked_main(int argc, char** argv)
bool paper_opt = false;
bool utf8_opt = false;
enum { NoDegen, DegenTBA, DegenSBA } degeneralize_opt = NoDegen;
enum { TransitionLabeled, StateLabeled } labeling_opt = TransitionLabeled;
enum { TransFM, TransTAA, TransCompo } translation = TransFM;
bool fm_red = false;
bool fm_exprop_opt = false;
@ -378,7 +374,6 @@ checked_main(int argc, char** argv)
unsigned opt_o_threshold = 0;
bool opt_dtgbacomp = false;
bool reject_bigger = false;
bool opt_bisim_ta = false;
bool opt_monitor = false;
bool containment = false;
bool spin_comments = false;
@ -395,6 +390,7 @@ checked_main(int argc, char** argv)
bool reduction_dont_care_sim = false;
int limit_dont_care_sim = 0;
bool reduction_iterated_dont_care_sim = false;
bool opt_bisim_ta = false;
bool ta_opt = false;
bool tgta_opt = false;
bool opt_with_artificial_initial_state = true;
@ -597,10 +593,6 @@ checked_main(int argc, char** argv)
fair_loop_approx = true;
translation = TransFM;
}
else if (!strcmp(argv[formula_index], "-lS"))
{
labeling_opt = StateLabeled;
}
else if (!strcmp(argv[formula_index], "-m"))
{
opt_reduce = true;
@ -1280,7 +1272,7 @@ checked_main(int argc, char** argv)
assume_sba = false;
}
unsigned int n_acc = a->number_of_acceptance_conditions();
unsigned int n_acc = a->acc().num_sets();
if (echeck_inst
&& degeneralize_opt == NoDegen
&& n_acc > 1
@ -1305,13 +1297,9 @@ checked_main(int argc, char** argv)
tm.stop("degeneralization");
assume_sba = true;
}
else if (labeling_opt == StateLabeled)
{
a = spot::make_sgba(a);
}
}
if (opt_determinize && a->number_of_acceptance_conditions() <= 1
if (opt_determinize && a->acc().num_sets() <= 1
&& (!f || f->is_syntactic_recurrence()))
{
tm.start("determinization 2");
@ -1512,7 +1500,7 @@ checked_main(int argc, char** argv)
assume_sba = false;
unsigned int n_acc = a->number_of_acceptance_conditions();
unsigned int n_acc = a->acc().num_sets();
if (echeck_inst
&& degeneralize_opt == NoDegen
&& n_acc > 1
@ -1541,8 +1529,7 @@ checked_main(int argc, char** argv)
if (echeck_inst
&& (a->number_of_acceptance_conditions()
< echeck_inst->min_acceptance_conditions()))
&& (a->acc().num_sets() < echeck_inst->min_acceptance_conditions()))
{
if (!paper_opt)
{
@ -1720,8 +1707,7 @@ checked_main(int argc, char** argv)
<< a_size.states << ", "
<< std::right << std::setw(10)
<< a_size.transitions << ", ";
std::cout <<
ec->automaton()->number_of_acceptance_conditions()
std::cout << ec->automaton()->acc().num_sets()
<< ", ";
auto ecs = ec->emptiness_check_statistics();
if (ecs)