New game api

Introduce a new, uniform way to create and solve
games.
Games can now be created directly from specification
using creat_game, uniformly solved using
solve_game and transformed into a strategy
using create_strategy.
Strategy are mealy machines, which can be minimized.

* bin/ltlsynt.cc: Minor adaption
* spot/twaalgos/game.cc: solve_game, setters and getters
for named properties
* spot/twaalgos/game.hh: Here too
* spot/twaalgos/mealy_machine.cc: Minor adaption
* spot/twaalgos/synthesis.cc: create_game, create_strategy and
minimize_strategy
* spot/twaalgos/synthesis.hh: Here too
* tests/core/ltlsynt.test: Adapting
* tests/python/aiger.py
, tests/python/games.ipynb
, tests/python/mealy.py
, tests/python/parity.py
, tests/python/split.py: Adapting
This commit is contained in:
philipp 2021-08-13 14:50:16 +02:00 committed by Florian Renkin
parent 786599ed20
commit 4260b17fba
12 changed files with 3163 additions and 305 deletions

View file

@ -124,10 +124,16 @@ except RuntimeError as e:
else:
report_missing_exception()
spot.set_state_player(a, 1, 1)
assert spot.get_state_players(a) == (False, True, False)
assert spot.get_state_player(a, 0) == 0
assert spot.get_state_player(a, 1) == 1
try:
spot.set_state_player(a, 1, True)
except RuntimeError as e:
assert "Can only" in str(e)
else:
report_missing__exception()
spot.set_state_players(a, (False, True, False))
assert spot.get_state_player(a, 0) == False
assert spot.get_state_player(a, 1) == True
assert spot.get_state_player(a, 2) == False
try:
spot.set_state_players(a, [True, False, False, False])
@ -144,7 +150,7 @@ else:
report_missing_exception()
try:
spot.set_state_player(a, 4, 1)
spot.set_state_player(a, 4, True)
except RuntimeError as e:
assert "invalid state number" in str(e)
else: