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:
Alexandre Duret-Lutz 2016-04-29 18:07:44 +02:00
parent 1ceb0ed272
commit 9afa98a1dd
5 changed files with 40 additions and 18 deletions

View file

@ -1529,6 +1529,7 @@ never: "never"
// Pretend that we have declared all states.
for (auto& p: res.info_states)
p.declared = true;
res.h->aut->register_aps_from_dict();
}
nc-states:
@ -1750,6 +1751,7 @@ lbtt: lbtt-header lbtt-body ENDAUT
res.info_states.resize(res.h->aut->num_states());
for (auto& s: res.info_states)
s.declared = true;
res.h->aut->register_aps_from_dict();
}
| lbtt-header-states LBTT_EMPTY
{