remove the sba interface

* src/tgba/tgbagraph.hh: Automatize the setting of the SingleAccSet
property.
* src/tgbaalgos/minimize.cc: Do not bother setting SingleAccSet.
* src/tgba/sba.hh: Delete.
* src/tgba/Makefile.am, wrap/python/spot.i: Adjust.
* src/taalgos/tgba2ta.cc: Do not include sba.hh.
* src/neverparse/neverclaimparse.yy: Set the SBA property on the output.
* src/tgbaalgos/lbtt.cc (lbtt_read_gba): Set the StateBasedAcc property
on output.
* src/tgbaalgos/dotty.cc, src/tgbaalgos/neverclaim.cc: Do not rely on
the sba interface.
* src/dstarparse/dra2ba.cc, src/dstarparse/nra2nba.cc,
src/tgbaalgos/simulation.cc, src/tgbaalgos/sccfilter.cc: Set
tgba_digraph::StateBasedAcc as appropriate.
* src/tgbatest/ltl2tgba.cc: Add extra assert.
This commit is contained in:
Alexandre Duret-Lutz 2014-08-12 11:31:42 +02:00
parent cc38443ed0
commit e9893586cc
15 changed files with 30 additions and 58 deletions

View file

@ -21,8 +21,7 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <ostream>
#include "tgba/tgba.hh"
#include "tgba/sba.hh"
#include "tgba/tgbagraph.hh"
#include "dotty.hh"
#include "dottydec.hh"
#include "tgba/bddprint.hh"
@ -42,7 +41,7 @@ namespace spot
dotty_decorator* dd)
: tgba_reachable_iterator_breadth_first(a), os_(os),
mark_accepting_states_(mark_accepting_states), dd_(dd),
sba_(dynamic_cast<const sba*>(a))
sba_(dynamic_cast<const tgba_digraph*>(a))
{
}
@ -120,7 +119,7 @@ namespace spot
std::ostream& os_;
bool mark_accepting_states_;
dotty_decorator* dd_;
const sba* sba_;
const tgba_digraph* sba_;
};
}

View file

@ -244,6 +244,7 @@ namespace spot
auto aut = std::unique_ptr<tgba_digraph>(new tgba_digraph(dict));
acc_mapper_int acc_b(aut.get(), num_acc, envacc);
aut->new_states(num_states);
aut->set_bprop(tgba_digraph::StateBasedAcc);
for (unsigned n = 0; n < num_states; ++n)
{

View file

@ -143,7 +143,6 @@ namespace spot
bdd allacc = bddfalse;
if (!final->empty())
{
res->set_bprop(tgba_digraph::SingleAccSet);
int accvar =
dict->register_acceptance_variable(ltl::constant::true_instance(),
res);

View file

@ -23,7 +23,7 @@
#include <ostream>
#include <sstream>
#include "bdd.h"
#include "tgba/sba.hh"
#include "tgba/tgbagraph.hh"
#include "neverclaim.hh"
#include "tgba/bddprint.hh"
#include "reachiter.hh"
@ -42,8 +42,9 @@ namespace spot
: tgba_reachable_iterator_breadth_first(a),
os_(os), f_(f), accept_all_(-1), fi_needed_(false),
comments_(comments), all_acc_conds_(a->all_acceptance_conditions()),
sba_(dynamic_cast<const sba*>(a))
sba_(dynamic_cast<const tgba_digraph*>(a))
{
assert(!sba_ || sba_->get_bprop(tgba_digraph::StateBasedAcc));
}
void
@ -193,7 +194,7 @@ namespace spot
state* init_;
bool comments_;
bdd all_acc_conds_;
const sba* sba_;
const tgba_digraph* sba_;
};
} // anonymous

View file

@ -499,7 +499,11 @@ namespace spot
tgba_digraph*
scc_filter_states(const tgba_digraph* aut, scc_info* given_si)
{
return scc_filter_apply<state_filter<>>(aut, given_si);
bool sb = aut->get_bprop(tgba_digraph::StateBasedAcc);
auto res = scc_filter_apply<state_filter<>>(aut, given_si);
if (sb)
res->set_bprop(tgba_digraph::StateBasedAcc);
return res;
}
tgba_digraph*

View file

@ -550,6 +550,8 @@ namespace spot
tgba_digraph* res = new tgba_digraph(d);
d->register_all_variables_of(a_, res);
res->set_acceptance_conditions(all_acceptance_conditions_);
if (Sba)
res->set_bprop(tgba_digraph::StateBasedAcc);
bdd sup_all_acc = bdd_support(all_acceptance_conditions_);
// Non atomic propositions variables (= acc and class)