replace sba_explicit_* by tgba_digraph, and use tgba_digraph is postproc

This is a huge patch.  tgba_digraph are equiped with some boolean
properties that can be used to indicate whether they represent SBA
(and will carry more informations later).  All algorithms that produce
or use sba_explicit_* automata are changed to use tgba_digraph.
postproc has been rewritten using only tgba_digraph, and this required
changing the return types of many algorithms from tgba* to
tgba_digraph*.

* src/bin/dstar2tgba.cc, src/bin/ltlfilt.cc, src/dstarparse/dra2ba.cc,
src/dstarparse/dstar2tgba.cc, src/dstarparse/nra2nba.cc,
src/dstarparse/nsa2tgba.cc, src/dstarparse/public.hh,
src/tgba/tgbagraph.hh, src/tgba/tgbasafracomplement.cc,
src/tgbaalgos/compsusp.cc, src/tgbaalgos/compsusp.hh,
src/tgbaalgos/degen.cc, src/tgbaalgos/degen.hh,
src/tgbaalgos/dotty.cc, src/tgbaalgos/minimize.cc,
src/tgbaalgos/minimize.hh, src/tgbaalgos/postproc.cc,
src/tgbaalgos/postproc.hh, src/tgbaalgos/sccfilter.cc,
src/tgbaalgos/sccinfo.cc, src/tgbaalgos/stripacc.cc,
src/tgbaalgos/stripacc.hh, src/tgbaalgos/translate.cc,
src/tgbaalgos/translate.hh, src/tgbatest/ltl2tgba.cc,
wrap/python/spot.i: Update.
This commit is contained in:
Alexandre Duret-Lutz 2014-08-11 19:08:14 +02:00
parent 637aeff2d3
commit 6c9d5e4bb3
26 changed files with 296 additions and 257 deletions

View file

@ -1,6 +1,6 @@
// -*- coding: utf-8 -*-
// Copyright (C) 2012 Laboratoire de Recherche et Développement de
// l'Epita (LRDE).
// Copyright (C) 2012, 2014 Laboratoire de Recherche et Développement
// de l'Epita (LRDE).
//
// This file is part of Spot, a model checking library.
//
@ -22,42 +22,13 @@
namespace spot
{
namespace
void strip_acceptance_here(tgba_digraph* a)
{
class strip_iter: public tgba_reachable_iterator_depth_first
{
public:
strip_iter(const tgba* a)
: tgba_reachable_iterator_depth_first(a),
out_(new sba_explicit_number(a->get_dict()))
{
}
sba_explicit_number*
result()
{
return out_;
}
void
process_link(const state*, int in,
const state*, int out,
const tgba_succ_iterator* si)
{
state_explicit_number::transition* t = out_->create_transition(in, out);
out_->add_conditions(t, si->current_condition());
}
private:
sba_explicit_number* out_;
};
}
sba_explicit_number*
strip_acceptance(const tgba* a)
{
strip_iter si(a);
si.run();
return si.result();
unsigned n = a->num_states();
for (unsigned s = 0; s < n; ++s)
for (auto& t: a->out(s))
t.acc = bddfalse;
a->set_acceptance_conditions(bddfalse);
a->get_dict()->unregister_all_typed_variables(bdd_dict::acc, a);
}
}