print_hoa: output all registered APs

Also introduce twa::unregister_ap() and twa_graph::remove_unused_ap()
so that the methods where this behavior is expected can be fixed.

And fix ltsmin::kripke() which did not register APs.

Part of #170.

* spot/twaalgos/hoa.cc: Use apvars() to print all registerd APs.
Throw an exception when printing automata using unregistered APs.
* spot/ltsmin/ltsmin.cc: Call register_ap().
* spot/twa/twa.cc, spot/twa/twa.hh, spot/twa/twagraph.cc,
spot/twa/twagraph.hh (twa::unregister_ap, twa_graph::remove_unused_ap):
New methods.
* spot/tl/exclusive.cc, spot/twaalgos/postproc.cc,
spot/twaalgos/remprop.cc, spot/twaalgos/relabel.cc: Use them.
* tests/core/maskacc.test, tests/core/maskkeep.test,
tests/core/strength.test: Adjust expected results.
* NEWS: Mention those changes.
This commit is contained in:
Alexandre Duret-Lutz 2016-04-30 23:54:31 +02:00
parent 9afa98a1dd
commit 1c2c914d7e
14 changed files with 124 additions and 49 deletions

13
NEWS
View file

@ -19,6 +19,9 @@ New in spot 2.0a (not yet released)
is still the default, but we plan to default to version 1.1 in the
future.
* twa::unregister_ap() and twa_graph::remove_unused_ap() are new
methods introduced to fix some of the bugs below.
Documentation:
* Add missing documentation for the option string passed to
@ -38,10 +41,20 @@ New in spot 2.0a (not yet released)
been performed.
* The automaton parser did not fully register atomic propositions
for automata read from never claim or as LBTT.
* spot::ltsmin::kripke() had the same issue.
* The sub_stats_reachable() function used to count the number
of transitions based on the number of atomic propositions
actually *used* by the automaton instead of using the number
of AP declared.
* print_hoa() will now output all the atomic propositions that have
been registered, not only those that are used in the automaton.
(Note that it will also throw an exception if the automaton uses
an unregistered AP; this is how some of the above bugs were
found.)
* The for Small or Deterministic preference, the postprocessor
will now unregister atomic propositions that are no longer
used in labels. Simplification of exclusive properties
and remove_ap::strip() will do similarly.
New in spot 2.0 (2016-04-11)