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:
parent
b3e994c249
commit
8b93b6967d
7 changed files with 145 additions and 68 deletions
|
|
@ -1,5 +1,5 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2014-2021 Laboratoire de
|
||||
# Copyright (C) 2014-2022 Laboratoire de
|
||||
# Recherche et Développement de l'Epita (LRDE).
|
||||
#
|
||||
# This file is part of Spot, a model checking library.
|
||||
|
|
@ -261,6 +261,12 @@ class twa:
|
|||
ostr = ostringstream()
|
||||
print_lbtt(ostr, a, opt)
|
||||
return ostr.str()
|
||||
if format == 'pg':
|
||||
if opt is not None:
|
||||
raise ValueError("print_pg() has no option")
|
||||
ostr = ostringstream()
|
||||
print_pg(ostr, a)
|
||||
return ostr.str()
|
||||
raise ValueError("unknown string format: " + format)
|
||||
|
||||
def save(a, filename, format='hoa', opt=None, append=False):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue