hoa: store the automaton name as a property

* src/hoaparse/hoaparse.yy: Store the automaton name.
* src/tgbaalgos/hoa.cc: Output it if it exists.
* src/tgbatest/hoaparse.test: Adjust tests.
This commit is contained in:
Alexandre Duret-Lutz 2014-12-09 16:00:10 +01:00
parent f37ff8407c
commit 5a1e38d90f
3 changed files with 10 additions and 2 deletions

View file

@ -250,7 +250,10 @@ namespace spot
const char nl = newline ? '\n' : ' ';
os << "HOA: v1" << nl;
if (f)
auto* n = aut->get_named_prop("automaton-name");
if (n)
escape_str(os << "name: \"", *static_cast<std::string*>(n)) << '"' << nl;
else if (f)
escape_str(os << "name: \"", to_string(f)) << '"' << nl;
os << "States: " << num_states << nl
<< "Start: 0" << nl