Commit graph

16 commits

Author SHA1 Message Date
Philipp Schlehuber-Caissier
524edea8da Propagate colors in split_2step
Reduce the amount of uncolored transitions
after split_2step by trying to color the env transitions.
This is currently only supported for parity like
acceptance conditions.

* spot/twaalgos/game.cc: Determinizatio of "colored"
game can created trivial self-loops. Fix them
* spot/twaalgos/synthesis.cc: Here
* tests/core/ltlsynt.test,
tests/python/_synthesis.ipynb,
tests/python/games.ipynb,
tests/python/synthesis.ipynb,
tests/python/synthesis.py: New and adjusted tests
2022-04-07 21:21:06 +02:00
Florian Renkin
dd58747659 synthesis.ipynb: remove useless import
* tests/python/synthesis.ipynb: here.
2022-03-22 16:08:51 +01:00
Philipp Schlehuber-Caissier
97fc3f6c0b Introduce simplify_mealy
Convenience function dispatching to
minimize_mealy and reduce_mealy.
Change tests accordingly

* spot/twaalgos/mealy_machine.cc,
  spot/twaalgos/mealy_machine.hh: Here
* bin/ltlsynt.cc: Use simplify
* spot/twaalgos/synthesis.cc,
  spot/twaalgos/synthesis.hh: Remove
 minimization, Update options
* tests/core/ltlsynt.test,
  tests/python/synthesis.ipynb,
  tests/python/_synthesis.ipynb: Adapt
2022-03-18 15:35:54 +01:00
Philipp Schlehuber-Caissier
86de4d4052 Introduce mealy_prod
Product between mealy machines
with propagation of synthesis outputs
and additional assertions.
Currently it only supports input complete machines

* spot/twaalgos/mealy_machine.cc,
  spot/twaalgos/mealy_machine.hh: Here
* bin/ltlsynt.cc: Use
* tests/python/except.py,
  tests/python/synthesis.ipynb: Test
2022-03-18 15:33:15 +01:00
Alexandre Duret-Lutz
75818fde13 synthesis: fix suboptimal colorization after LAR
* spot/twaalgos/synthesis.cc (ltl_to_game): In LAR and LAR_OLD mode,
for max odd and colorize the game after the split, not before.  The
previous code used to colorize twice, and could waste up to 4 colors
in the process.
* tests/core/ltlsynt.test, tests/python/_mealy.ipynb,
tests/python/games.ipynb, tests/python/synthesis.ipynb,
tests/python/synthesis.py: Adjust all test cases to reflect the fact
that the game uses fewer colors.
2022-03-17 16:44:48 +01:00
Florian Renkin
4f69e99c45 synthesis.ipynb: correct typos
* tests/python/synthesis.ipynb: here
2022-03-17 11:53:51 +01:00
Philipp Schlehuber
488efee7b3 aiger accepts splitted mealy machines
* spot/twaalgos/aiger.cc,
  spot/twaalgos/aiger.hh: Here
* tests/python/synthesis.ipynb: Tests
2021-12-10 12:44:36 +01:00
Alexandre Duret-Lutz
6555af1f44 python: fix support for std::vector<const_twa_graph_ptr>
* spot/twaalgos/aiger.hh, spot/twaalgos/aiger.cc: Fix prototypes, as
well as several error messages.
* python/spot/impl.i: Implement an ad-hoc conversion for
std::vector<const_twa_graph_ptr>.
* tests/python/synthesis.ipynb: Use it to simplify the example.
Adjust some comments.
2021-11-12 22:38:37 +01:00
philipp
98ebbea17e Renaming and clean up
"Strategy" was used for mealy machines and game strategies a like.
Introduced the notion of mealy machine in three different flavors:
mealy machine: twa_graph with synthesis-outputs
separated mealy machine: mealy machine and all transitions
have conditions of the form (bdd over inputs)&(bdd over outputs)
split mealy machine: mealy machine that alternates between
env and player states. Needs state-players

* bin/ltlsynt.cc: renaming
* python/spot/impl.i: Add vector for const_twa_graph_ptr
* spot/twaalgos/aiger.cc,
spot/twaalgos/aiger.hh: Adapting functions
* spot/twaalgos/mealy_machine.cc,
spot/twaalgos/mealy_machine.hh: Add test functions and
propagate properties correctly. Adjust for names
* spot/twaalgos/synthesis.cc,
spot/twaalgos/synthesis.hh: Removing unnecessary functions
and adapt to new names
* tests/python/aiger.py,
tests/python/_mealy.ipynb,
tests/python/mealy.py,
tests/python/synthesis.ipynb: Adjust
2021-11-11 00:38:14 +01:00
Florian Renkin
d4967f20e9 Notebooks: correct typos
* tests/python/acc_cond.ipynb, tests/python/contains.ipynb,
tests/python/decompose.ipynb, tests/python/games.ipynb,
tests/python/randltl.ipynb, tests/python/synthesis.ipynb,
tests/python/testingaut.ipynb: here.
2021-11-06 11:56:05 +01:00
Florian Renkin
aff04c2207 Aiger parser: correct input and output names
* spot/twaalgos/aiger.cc: here.
* tests/python/aiger.py: add tests
* tests/python/synthesis.ipynb: correct notebook
2021-11-03 13:10:27 +01:00
Alexandre Duret-Lutz
3be79ea476 print_dot: improve aiger rendering
* spot/twaalgos/dot.cc: Improve the aiger printer by using a more
traditional dot syntax, indenting the output, adding some hard-coded
colors, fixing a bug in the negation of latch inputs, and rotating the
triangles for horizontal output.
* tests/python/synthesis.ipynb: Adjust expected output, and add
an example of horizontal layout.
2021-10-29 23:21:54 +02:00
Alexandre Duret-Lutz
753d572e4d print_dot: improve the rendering of Mealy machines
* spot/twaalgos/dot.cc (print_dot): Add some detection of Mealy
machines, and some code to render its I/O in a <table>.
* tests/python/synthesis.ipynb: Adjust expected output.
* tests/python/_mealy.ipynb: New file.
* tests/Makefile.am: Add python/_mealy.ipynb.
* NEWS: Mention the new feature.
2021-10-29 16:45:35 +02:00
Alexandre Duret-Lutz
c43712682f synthesis: rename create_game() to ltl_to_game()
* bin/ltlsynt.cc, spot/twaalgos/aiger.hh, spot/twaalgos/synthesis.cc,
spot/twaalgos/synthesis.hh, tests/python/synthesis.ipynb,
tests/python/synthesis.py: Here.
2021-10-18 09:17:40 +02:00
Alexandre Duret-Lutz
b9a39c5576 aiger: fix forcing of input properties
* spot/twaalgos/aiger.cc: Here.
* tests/python/synthesis.ipynb: Adjust.
2021-10-07 14:08:29 +02:00
Alexandre Duret-Lutz
0ec1ee6de3 move parts of games.ipynb into synthesis.ipynb
* tests/python/synthesis.ipynb: New file, with bits removed from...
* tests/python/games.ipynb: ... here.
* tests/Makefile.am: Add synthesis.ipynb.
* NEWS, doc/org/tut.org: Mention the new notebook.
2021-10-07 10:48:02 +02:00