* src/tgba/tgba.hh, src/tgba/tgba.cc

(tgba::number_of_acceptance_conditions): New method.
* src/tgbaalgos/lbtt.cc (lbtt_bfs::lbtt_bfs): Use it.
This commit is contained in:
Alexandre Duret-Lutz 2004-11-04 12:55:03 +00:00
parent 1d3100607a
commit d60025dcd1
4 changed files with 28 additions and 11 deletions

View file

@ -25,7 +25,8 @@ namespace spot
{
tgba::tgba()
: last_support_conditions_input_(0),
last_support_variables_input_(0)
last_support_variables_input_(0),
num_acc_(-1)
{
}
@ -75,4 +76,21 @@ namespace spot
return "";
}
int
tgba::number_of_acceptance_conditions() const
{
if (num_acc_ < 0)
{
bdd all = all_acceptance_conditions();
int n = 0;
while (all != bddfalse)
{
++n;
all -= bdd_satone(all);
}
num_acc_ = n;
}
return num_acc_;
}
}