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

View file

@ -1,5 +1,5 @@
// -*- coding: utf-8 -*-
// Copyright (C) 2015 Laboratoire de Recherche et Développement de
// Copyright (C) 2015, 2016 Laboratoire de Recherche et Développement de
// l'Epita (LRDE).
//
// This file is part of Spot, a model checking library.
@ -139,7 +139,7 @@ namespace spot
if (v >= 0)
{
exist &= bdd_ithvar(v);
d->unregister_variable(v, res);
res->unregister_ap(v);
}
}
for (auto ap: props_pos)
@ -148,7 +148,7 @@ namespace spot
if (v >= 0)
{
restrict &= bdd_ithvar(v);
d->unregister_variable(v, res);
res->unregister_ap(v);
}
}
for (auto ap: props_neg)
@ -157,7 +157,7 @@ namespace spot
if (v >= 0)
{
restrict &= bdd_nithvar(v);
d->unregister_variable(v, res);
res->unregister_ap(v);
}
}