rename pg_print() as print_pg() and add it to to_str()

* NEWS: Mention those change.
* spot/twaalgos/game.hh (print_pg): New function.
(pg_print): Mark as deprecated.
* spot/twaalgos/game.cc (pg_print): Redirect to print_pg().
(print_pg): Update to output state names.
* python/spot/__init__.py: Teach to_str() about print_pg().
* bin/ltlsynt.cc: Adjust to call print_pg().
* tests/python/games.ipynb: Add an example.
* tests/core/ltlsynt.test: Adjust to remove the "INIT" note.
This commit is contained in:
Alexandre Duret-Lutz 2022-07-22 16:52:03 +02:00
parent b3e994c249
commit 8b93b6967d
7 changed files with 145 additions and 68 deletions

View file

@ -400,7 +400,7 @@ namespace
[](const spot::twa_graph_ptr& game)->void
{
if (opt_print_pg)
spot::pg_print(std::cout, game);
spot::print_pg(std::cout, game);
else
spot::print_hoa(std::cout, game, opt_print_hoa_args) << '\n';
}
@ -785,7 +785,7 @@ namespace
if (opt_print_pg || opt_print_hoa)
{
if (opt_print_pg)
spot::pg_print(std::cout, arena);
spot::print_pg(std::cout, arena);
else
spot::print_hoa(std::cout, arena, opt_print_hoa_args) << '\n';
return 0;