hoa: output highlighted states and edges in v1.1

* spot/twaalgos/hoa.cc: Here.
* doc/org/hoa.org, NEWS: Document that.
* tests/core/readsave.test: Test it.
This commit is contained in:
Alexandre Duret-Lutz 2016-07-15 20:03:12 +02:00
parent bbc3afe1cf
commit e17a617bc2
4 changed files with 181 additions and 12 deletions

View file

@ -493,6 +493,28 @@ namespace spot
prop(" !inherently-weak");
os << nl;
// highlighted states and edges are only output in the 1.1 format,
// because we use a dot in the header name.
if (v1_1)
{
if (auto hstates = aut->get_named_prop
<std::map<unsigned, unsigned>>("highlight-states"))
{
os << "spot.highlight.states:";
for (auto& p: *hstates)
os << ' ' << p.first << ' ' << p.second;
os << nl;
}
if (auto hedges = aut->get_named_prop
<std::map<unsigned, unsigned>>("highlight-edges"))
{
os << "spot.highlight.edges:";
for (auto& p: *hedges)
os << ' ' << p.first << ' ' << p.second;
os << nl;
}
}
// If we want to output implicit labels, we have to
// fill a vector with all destinations in order.
std::vector<unsigned> out;