Commit graph

6176 commits

Author SHA1 Message Date
Florian Renkin
97046ea263 Synthesis decomposition: Add a new rewriting and tests
* spot/twaalgos/synthesis.cc: add a new rewriting rule
* tests/core/ltlsynt.test: test rewritings
2021-11-04 15:10:07 +01:00
Florian Renkin
7947ffc930 ltlsynt: correct verbose when --aiger is used
* bin/ltlsynt.cc: here
* tests/core/ltlsynt.test: add test
2021-11-04 10:20:48 +01:00
Alexandre Duret-Lutz
553381bd6e aiger: improve parse errors and test them
* spot/twaalgos/aiger.cc, spot/twaalgos/aiger.hh (parse_aag_impl_): Do
not display source filename in user facing errors.  Use GNU-style
"file:line: " prefixes for locations.  Adjust all sscanf() calls
to check for ignored trailing data.  Add some missing checks about the
order of input and output names, checks that output names do no
intersect input names.  Fix incorrect line number for unexpected
input variable number, and avoid using std::stoi as that throws
an std::invalid_argument on parse error.
* tests/python/aiger.py: Add test cases for each error message.
2021-11-03 23:13:28 +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
Florian Renkin
8aa9da7fc8 Synthesis: rewrite bypass
* spot/twaalgos/synthesis.cc: here
* spot/twaalgos/synthesis.hh: introduce a realizability_code
* bin/ltlsynt.cc, spot/twaalgos/aiger.cc: use this enum
* tests/core/ltlsynt.test: update tests
2021-11-02 10:22:40 +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
09b361712d python: make sure swig also work with --disable-dependency-tracking
Fixes #482, reported by Antoine Martin.

* python/Makefile.am: Do not pass -MF to Swig when AMDEP is false.
2021-10-29 11:41:09 +02:00
Alexandre Duret-Lutz
6464324a2c ltlsynt: fix a bug in split_2step_fast_here
* spot/twaalgos/synthesis.cc (split_2step_fast_here::get_ps): Fix the
state number recorded in the map.
* tests/core/ltlsynt.test: Add test case.
2021-10-24 22:34:06 +02:00
Alexandre Duret-Lutz
1df5f0e2c7 synthesis: simplify split_2step_fast_here
* spot/twaalgos/synthesis.cc (split_2step_fast_here): Do not use
a temporary vector to iterate over the original edges.
2021-10-23 01:23:24 +02:00
Alexandre Duret-Lutz
074678416f ltlsynt: improve error message in case of missing --ins and --outs
* bin/ltlsynt.cc: Here.
* tests/core/ltlsynt.test: Test the error.
2021-10-22 17:46:21 +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
5fd4d94031 ltlsynt: replace some leftover throw by error()
* bin/ltlsynt.cc (solve_formula): Report errors with error().
2021-10-11 13:39:52 +02:00
Alexandre Duret-Lutz
1eb18f4b83 ltlsynt: fix --help output for common Input options
* bin/common_finput.cc (argp): Declare all options in section 1.
2021-10-11 13:39:52 +02:00
Alexandre Duret-Lutz
82d4fc8ed9 ltlsynt: report AP missing from --ins and --outs
* bin/ltlsynt.cc (process_formula): Add a check.
* tests/core/ltlsynt.test: Add test case.
2021-10-09 21:18:21 +02:00
Alexandre Duret-Lutz
0e5f2d4819 ltlsynt: --ins is optional but not its argument
Fixes #481, reported by Michaël Cadilhac.

* bin/ltlsynt.cc (argp_option): Remove erroneous OPTION_ARG_OPTIONAL.
* tests/core/ltlsynt.test: Add test case.
2021-10-09 20:50:38 +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
9b3956f892 zlktree: fix handling of automata with false acceptance
Reported by Florian.

* spot/twaalgos/zlktree.cc (zielonka_tree_transform, acd_transform):
Here.
* tests/python/zlktree.py: Add test cases.
2021-10-07 11:11:49 +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
Alexandre Duret-Lutz
7bc2c31043 game: teach solve_game to use solve_safety_game
* spot/twaalgos/game.cc, spot/twaalgos/game.hh: Here.
* doc/org/tut40.org: Adjust example.
2021-10-07 09:25:01 +02:00
Alexandre Duret-Lutz
bdd20bd1a1 rename game_info to synthesis_info; move it with the synthesis code
* spot/twaalgos/game.cc, spot/twaalgos/game.hh (game_info): Move...
* spot/twaalgos/synthesis.cc,
spot/twaalgos/synthesis.hh (synthesis_info): ... here, because this
structure contains only synthesis stuff.  Also rename "solver" to
"algo" to match the ltlsynt option.
(solve_game): Move the two argument version of this function here,
since that's the only game-related generic function that use
synthesis_info.
* bin/ltlsynt.cc, tests/core/ltlsynt.test, tests/python/games.ipynb,
tests/python/synthesis.py, NEWS: Adjust all uses and mentions.
2021-10-07 09:06:15 +02:00
Alexandre Duret-Lutz
0ac5bbc05d ltlsynt: replace -x minimization-lvl=N by --simplify
* bin/ltlsynt.cc: Implement the new option, and make it default
to bisimulation with output assignment (a.k.a. bwoa).
* NEWS, bin/spot-x.cc, doc/org/ltlsynt.org: Update the documentation.
* spot/twaalgos/game.hh: Make bwoa the default.
* tests/core/ltlsynt.test: Add and adjust test cases.
* tests/python/games.ipynb: Adjust.
2021-10-06 18:00:24 +02:00
Alexandre Duret-Lutz
af5474d791 ltlsynt: replace -x specification-decomposition by --decompose
* bin/ltlsynt.cc: Implement the option, and enable it by default.
* doc/org/ltlsynt.org, doc/org/ltlsynt.tex, bin/spot-x.cc, NEWS:
Document it.
* tests/core/ltlsynt.test: Adjust test cases.
2021-10-06 10:51:42 +02:00
Alexandre Duret-Lutz
5d722ca584 * doc/org/tut.org: Fix a title. 2021-10-06 10:46:22 +02:00
Alexandre Duret-Lutz
405f76f0a0 games, synthetis: improve Doxygen
* spot/twaalgos/game.hh, spot/twaalgos/synthesis.hh,
spot/twaalgos/aiger.hh: Declare new Doxygen groups for games and
synthesis.
* doc/spot.bib: Cleanup.
2021-10-03 19:27:08 +02:00
Alexandre Duret-Lutz
188fee4756 * tests/core/ltlsynt.test: Test --aiger without option. 2021-10-03 18:37:55 +02:00
Alexandre Duret-Lutz
17070b6cee aiger: fix some typos and inconsistencies
* spot/twaalgos/aiger.hh: Fix errors in documentation.
* spot/twaalgos/aiger.cc: Adjust text of exception.
2021-10-03 18:33:57 +02:00
Alexandre Duret-Lutz
590929fbcf ltlsynt: improve documentation
This addresses a few points from #479.

* doc/org/ltlsynt.tex: New file.
* doc/Makefile.am: Add it.
* doc/org/ltlsynt.org: Show the architecture, and mention more
options.
* bin/spot-x.cc: Document ltlsynt's -x options.
* bin/ltlsynt.cc: Fix default value of --aiger, and typo in its
documentation.
2021-10-03 15:24:23 +02:00
Alexandre Duret-Lutz
ee83e8e4c2 tests: work around to compiler warnings
* tests/core/cube.cc, tests/core/twagraph.cc: Fix warning about
unused variable in absence of assert().
2021-10-03 00:57:21 +02:00
Alexandre Duret-Lutz
644342f5d4 simplify: fix some discrepancies between Intel and ARM
* spot/tl/simplify.cc (tl_simplifier_cache::as_bdd): Fix the order in
which as_bdd() is called recursively in binary nodes, do not let the
choice to the compiler.
* tests/core/ltlsynt.test: Adjust expected output.
2021-10-03 00:57:15 +02:00
Alexandre Duret-Lutz
1b69ed96f9 ltlsynt: deduce --outs from --ins or vice-versa
* bin/ltlsynt.cc: Implement it.
* NEWS, doc/org/ltlsynt.org: Document it.
* tests/core/ltlsynt.test: Test it.
2021-10-02 21:57:58 +02:00
Alexandre Duret-Lutz
60225fd139 acd: do not recompute identical subtrees
* spot/twaalgos/zlktree.cc, spot/twaalgos/zlktree.hh (acd::build_):
When processing a node identical to a node previously seen, simply
copy the children of that other node, and share its vectors.
2021-10-01 08:48:11 +02:00
Alexandre Duret-Lutz
2c435c6c11 zlktree: simplify heuristic computation
* spot/twaalgos/zlktree.cc: Here.
* spot/twaalgos/zlktree.hh: Add a way to remove an option.
2021-10-01 08:48:11 +02:00
Alexandre Duret-Lutz
88d0d2e112 org: cleanup tut40
* doc/org/tut40.org: Add more explanations and some cleanup.
* python/spot/__init__.py (set_state_players, get_state_winners,
get_state_players, set_state_player, get_state_winner,
get_state_player, get_strategy): Add these methods to the twa_graph
class for convenience.
* NEWS, doc/org/tut.org: Mention tut40.org.
2021-10-01 08:48:11 +02:00
Jerome Dubois
211e7d90d3 org: Add a pratical example for games
* doc/org/tut40.org: Add a documentation on how to use games in a
pratical case. In this example, we compute simulation using
games. Fixes #445.
* doc/Makefile.am: Add tut40.org.
2021-10-01 08:47:28 +02:00
Alexandre Duret-Lutz
ee80849caf dtwasat: various fixes
* spot/twaalgos/dtwasat.cc: Do not return a transition-based automaton
when state-based output is requested.
* tests/python/satmin.ipynb, spot/twaalgos/dtbasat.hh: Fix some typos.
* tests/python/satmin.py: Add test cases.
* NEWS: Mention the bugs.
2021-09-29 16:50:49 +02:00
Alexandre Duret-Lutz
fea0be96c1 acd: add ORDER_HEURISTIC for state-based ACD-transform
* spot/twaalgos/zlktree.cc, spot/twaalgos/zlktree.hh: Add the
acd_options::ORDER_HEURISTIC and use it by default in
acd_transform_sbacc().
* spot/misc/bitvect.hh (bitvect::count, bitvect::add_common): New
methods.
* tests/python/zlktree.ipynb: Adjust examples and discuss this
heuristic.
2021-09-24 22:28:10 +02:00
Alexandre Duret-Lutz
70ede35702 acd: add support for state-based output
* spot/twaalgos/zlktree.hh, spot/twaalgos/zlktree.cc (acd::node_level,
acd::state_step, acd_transform_sbacc): New public functions.
* tests/python/zlktree.ipynb, tests/python/zlktree.py: More tests.
* NEWS: Typo.
2021-09-24 13:38:51 +02:00
Alexandre Duret-Lutz
043a1dc394 acd: fix typeness checks, and add options for those
* spot/twaalgos/zlktree.cc, spot/twaalgos/zlktree.hh: Here.
* tests/python/zlktree.ipynb, tests/python/zlktree.py: Add tests
and examples.
2021-09-24 11:11:53 +02:00
Philipp Schlehuber
406bc8ed17 Remove do_simplify opt from split_2step
Removing this option to guarante that all arenas
are alternating

* spot/twaalgos/synthesis.hh: Here
* spot/twaalgos/synthesis.cc: Here
* spot/twaalgos/mealy_machine.cc: API change
* tests/python/aiger.py: API change
* tests/python/mealy.py: API change
* tests/python/split.py: API change
2021-09-22 12:52:10 +02:00
Alexandre Duret-Lutz
ddda68403f * spot/twa/twagraph.cc: Fixes #478. 2021-09-21 11:20:14 +02:00
Philipp
3f606cdc35 Updated News
* NEWS: Here
2021-09-21 11:03:44 +02:00
Florian Renkin
8296079282 synthesis: aps_of uses a local cache
* spot/twaalgos/synthesis.cc: here.
2021-09-17 17:15:32 +02:00
Alexandre Duret-Lutz
cb3a833a8d ltlsynt: fix syntax error handling
Fixes #477.

* bin/common_finput.cc (job_processor::process_string): Fix return
value.
* bin/ltlsynt.cc: Fix handling of syntax errors.  While we are here,
make sure game_info is destroyed before Spot's globals.
* tests/core/ltlsynt.test: Add a test case.
2021-09-17 17:09:49 +02:00
Alexandre Duret-Lutz
4710577dfe build: fix multiple GCC warnings
These occur when Spot is compiled with --enable-optimizations and
--disable-assert.

* spot/mc/unionfind.cc, spot/twaalgos/mealy_machine.cc,
spot/twaalgos/aiger.cc: Work around warnings about variables that are
only used in assert.
* spot/misc/common.hh [NDEBUG] (SPOT_ASSUME): Do not define
as assert() when it is disabled.
* spot/twaalgos/alternation.cc: Use insert instead of emplace
to work around a spurious possible nullptr dereference.
* spot/twaalgos/ltl2taa.cc, spot/twaalgos/ndfs_result.hxx,
spot/twaalgos/tau03.cc, spot/twaalgos/tau03opt.cc:
Work around spurious possible nullptr dereference.
* spot/twaalgos/sbacc.cc: Work around spurious "maybe uninitialized"
warning.
2021-09-17 17:09:42 +02:00
Philipp Schlehuber
c973fcdf2d Improving handling of unused proposition for aig
By default only propositions appearing in the strategy are
treated. By handing over propositions explicitly one
can force their appearance in the aig circuit.

* spot/twaalgos/aiger.cc: Here
* spot/twaalgos/aiger.hh: New doc
* tests/python/games.ipynb: New test
2021-09-16 14:53:49 +02:00
Florian Renkin
7c1230b484 synthesis: fix decomposition
It is wrong to decompose an implication that is not at the top of
the formula.

* spot/twaalgos/synthesis.cc: don't always split implication
2021-09-16 14:53:49 +02:00
Florian Renkin
ad5203e77a synthesis: Fix segfault when there is no output
* spot/twaalgos/synthesis.cc: here
* tests/python/synthesis.py: create a test
* tests/Makefile.am: add synthesis.py to the tests
2021-09-16 14:53:49 +02:00
Florian Renkin
306a45f239 Aiger: Add a way to evaluate an input sequence (Python)
Add a method to the class aig (Python) that produces a sequence of
outputs for a given sequence of inputs.

* python/spot/__init__.py: here
2021-09-16 14:53:49 +02:00
Florian Renkin
b9ec16f9c2 Typos
* bin/ltlsynt.cc, spot/twaalgos/game.hh,
spot/twaalgos/synthesis.cc: here
2021-09-16 14:53:48 +02:00