honor ap() when counting transitions
Fixing this bug alone revealed another bug: parsing never claim or LBTT automata did not register APs. So this fixes both bugs. This is the first part of #170. * spot/twa/twa.hh (register_aps_from_dict): New method. * spot/parseaut/parseaut.yy: Call it for never claim and LBTT files. * spot/twaalgos/stats.cc: Simplify using ap_vars(). * tests/core/ltl2tgba.test: Add a test case. * NEWS: Mention the bugs.
This commit is contained in:
parent
1ceb0ed272
commit
9afa98a1dd
5 changed files with 40 additions and 18 deletions
|
|
@ -62,7 +62,7 @@ namespace spot
|
|||
{
|
||||
public:
|
||||
sub_stats_bfs(const const_twa_ptr& a, twa_sub_statistics& s)
|
||||
: stats_bfs(a, s), s_(s), seen_(bddtrue)
|
||||
: stats_bfs(a, s), s_(s), seen_(a->ap_vars())
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -71,24 +71,7 @@ namespace spot
|
|||
const twa_succ_iterator* it) override
|
||||
{
|
||||
++s_.edges;
|
||||
|
||||
bdd cond = it->cond();
|
||||
bdd newvars = bdd_exist(bdd_support(cond), seen_);
|
||||
if (newvars != bddtrue)
|
||||
{
|
||||
seen_ &= newvars;
|
||||
int count = 0;
|
||||
while (newvars != bddtrue)
|
||||
{
|
||||
++count;
|
||||
newvars = bdd_high(newvars);
|
||||
}
|
||||
// If we discover one new variable, that means that all
|
||||
// transitions we counted so far are actually double
|
||||
// subtransitions. If we have two new variables, they where
|
||||
// quadruple transitions, etc.
|
||||
s_.transitions <<= count;
|
||||
}
|
||||
while (cond != bddfalse)
|
||||
{
|
||||
cond -= bdd_satoneset(cond, seen_, bddtrue);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue