Commit graph

6312 commits

Author SHA1 Message Date
Alexandre Duret-Lutz
7149e5a34d * .gitlab-ci.yml (alpine-gcc): Fix path for logs. 2022-05-02 15:35:51 +02:00
Alexandre Duret-Lutz
7d9fddadce work around an issue in Flex 2.6.4
The fallback definition of SIZE_MAX supplied by flex was not
preprocessor friendly and prevented robin_hood.hh from doing "#if
SIZE_MAX == UINT64_MAX", as observed by Marc Espie on OpenBSD.

* spot/parseaut/scanaut.ll, spot/parsetl/scantl.ll: Define
__STDC_VERSION__ just so that the code generated by Flex
include <inttypes.h>.
* NEWS: Mention the bug.
* THANKS: Add Marc.
2022-05-02 15:35:09 +02:00
Alexandre Duret-Lutz
64020279cb reduce_parity: fix to work on automata with deleted edges
* spot/twaalgos/parity.cc (reduce_parity): Use the
size of the edge vector to initialize piprime1 and piprime2,
not the number of edges.
* tests/python/parity.py: Add test case, based on a report
by Yann Thierry-Mieg.
2022-05-02 15:34:57 +02:00
Alexandre Duret-Lutz
b7825552f8 remove uses of unary_function and binary_function
These were deprecated in C++11, and are supposed to be removed from
C++17, however gcc-snapshot just started warning about those.

* spot/misc/bddlt.hh, spot/misc/hash.hh, spot/misc/ltstr.hh,
spot/twa/taatgba.hh, spot/twaalgos/ltl2tgba_fm.cc: Here.
2022-05-02 15:34:14 +02:00
Florian Renkin
355c5ffeb1 ltlsynt: display the number of subformulas
* bin/ltlsynt.cc: here
* tests/core/ltlsynt.test: ajust tests
2022-04-25 11:25:29 +02:00
Florian Renkin
62725fb507 ltlsynt: don't solve games when we want to display them
* bin/ltlsynt.cc: here
2022-04-25 11:25:29 +02:00
Florian Renkin
55aac8e107 ltlsynt: display ACD instead of LAR when needed
* spot/twaalgos/synthesis.cc: here
* tests/core/ltlsynt.test: add test
2022-04-25 11:25:25 +02:00
Alexandre Duret-Lutz
5f43c9bfce ltlsynt: implement --tlsf to call syfco automatically
Fixes #473.

* NEWS, doc/org/ltlsynt.org: Mention it.
* bin/common_trans.cc, bin/common_trans.hh (read_stdout_of_command):
New function.
* bin/ltlsynt.cc: Implement the --tlsf option.
* tests/core/syfco.test: New file.
* tests/Makefile.am: Add it.
2022-04-13 09:08:40 +02:00
Philipp Schlehuber-Caissier
06b73c39fa +ud option of mealy_machine_to_aig received wrong value
Also aiger received a tracing option for
debugging

* spot/twaalgos/aiger.cc: Here
* tests/core/ltlsynt.test: Test
2022-04-07 21:21:52 +02:00
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
Philipp Schlehuber-Caissier
dfb75632ba Update merge_states
Current implementation of merge_states fails
on certain self-loops.
Updated implementation to take them into
account and use a hashbased implementation
to speed up calculations.
Moreover, merge_states() is now aware
of "state-player", just like defrag_states_

* spot/twa/twagraph.cc: Here
* spot/twaalgos/game.cc: Fix odd cycle for sink
* spot/twaalgos/synthesis.cc: Adapt split_det pipeline
* tests/python/_synthesis.ipynb: Tests
2022-04-07 17:42:14 +02:00
Alexandre Duret-Lutz
a211bace68 autcross: implement --language-complemented
Suggested by Ondřej Lengál.  Fixes #504.

* bin/autcross.cc: Implement the --language-complemented option.
* NEWS, doc/org/autcross.org: Document it.
* tests/core/autcross.test: Test it.
* THANKS: Add Ondřej.
2022-04-06 15:38:23 +02:00
Alexandre Duret-Lutz
5e1b751971 debian: simplify LTO configuration to work around newer libtool
Libtool 2.4.7 breaks if AR_FLAGS contains a space. See
https://lists.gnu.org/archive/html/bug-libtool/2022-03/msg00009.html

* debian/rules: Use gcc-{nm,ar,ranlib} so we do not have to pass
the plugin explicitly.
2022-03-30 11:20:25 +02:00
Philipp Schlehuber-Caissier
27d455389e Correct bug in zielonka
Optimization in Zielonka failed
under certain circumstances
todo: Devise a specialized test
for direct attr computation

* spot/twaalgos/game.cc: Correction
* tests/python/game.py: Test
2022-03-29 22:36:35 +02:00
Alexandre Duret-Lutz
9c6a09890e parsetl: speedup parsing of n-ary operators with many operands
Issue #500, reported by Yann Thierry-Mieg.

* spot/parsetl/parsetl.yy, spot/parsetl/scantl.ll: Use variant
to store a new pnode objects that delays the construction of n-ary
operators.
* spot/parsetl/Makefile.am: Do not distribute stack.hh anymore.
* spot/tl/formula.cc: Fix detection of overflow in Star and FStar.
* HACKING: Update Bison requirements to 3.3.
* tests/core/500.test: New test case.
* tests/Makefile.am: Add it.
* tests/core/ltl2tgba2.test, tests/core/ltlsynt.test,
tests/core/tostring.test: Adjust to new expected order.
* NEWS: Mention the change.
2022-03-28 09:00:18 +02:00
Alexandre Duret-Lutz
46f3f5aaf4 * doc/org/tut40.org: Clarify, as suggested by a CAV'22 reviewer. 2022-03-25 22:56:37 +01:00
Florian Renkin
7abcf4e38b ltlsynt: create a "bypass" option
* bin/ltlsynt.cc: here.
* tests/core/ltlsynt.test: add tests
2022-03-22 19:05:31 +01:00
Florian Renkin
328cf95816 ltlsynt: generalization of the bypass
* spot/twaalgos/synthesis.cc, spot/twaalgos/synthesis.hh: generalize the
  bypass and avoid to construct a strategy when we want realizability.
* bin/ltlsynt.cc: adapt for realizability
* tests/core/ltlsynt.test: update tests
2022-03-22 19:05:28 +01:00
Florian Renkin
0a6b627914 option_map: Don't report unused options if option_map is not used
* spot/misc/optionmap.cc, spot/misc/optionmap.hh: here.
2022-03-22 16:08:51 +01:00
Florian Renkin
8d9597d80d ltlsynt: add --algo=acd
* bin/ltlsynt.cc: Add "acd" to the list of possible paritization
		  algorithms used by ltlsynt
* spot/twaalgos/synthesis.cc, spot/twaalgos/synthesis.hh: Add
	ACD as paritisation algorithm
* tests/core/ltlsynt.test: add tests
2022-03-22 16:08:51 +01:00
Florian Renkin
dd58747659 synthesis.ipynb: remove useless import
* tests/python/synthesis.ipynb: here.
2022-03-22 16:08:51 +01:00
Florian Renkin
0dd36e9a53 ltlsynt: don't fail if --outs or --ins is set to empty
* bin/ltlsynt.cc: here
* tests/core/ltlsynt.test: add tests
2022-03-22 16:08:51 +01:00
Alexandre Duret-Lutz
e9c1aeaa54 * spot/twaalgos/gfguarantee.hh: Typos in comments. 2022-03-22 15:50:36 +01:00
Alexandre Duret-Lutz
3ed337ec46 graph: fix invalid read
Reported by Florian Renkin.

* spot/graph/graph.hh (sort_edges_of): Fix invalid read when sorting a
state without successor.  Seen on core/tgbagraph.test.
2022-03-22 15:50:36 +01:00
Philipp Schlehuber-Caissier
bb7072402a Removing eeroneaus test
* tests/python/except.py: Here
2022-03-21 10:51:38 +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
5cd0ce14b0 fix mempool test to use __has_include
This follows 6b88d6f35b.

* tests/core/mempool.cc: Use __has_include too.
2022-03-17 16:50:01 +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
Alexandre Duret-Lutz
c1e6340228 optionmap: set_if_unset and simplifications
* spot/misc/optionmap.hh (set_if_unset): New method.
* spot/misc/optionmap.cc (set_if_unset, set, set_str): Implement
set_if_unset, and simplify set and set_str to not perform two lookups.
* spot/twaalgos/synthesis.cc (create_translator): Use set_if_unset
to simplify the code.
2022-03-17 16:42:01 +01:00
Florian Renkin
4f69e99c45 synthesis.ipynb: correct typos
* tests/python/synthesis.ipynb: here
2022-03-17 11:53:51 +01:00
Florian Renkin
e248f4500d ltlsynt: typo in help
* bin/ltlsynt.cc: here
2022-03-15 14:04:16 +01:00
Alexandre Duret-Lutz
0745e735bb fix typos and make formula_from_bdd more usable in Python
* python/spot/impl.i (formula_from_bdd): Instantiate for twa_graph.
* spot/twa/twa.hh (register_aps_from_dict): Typo in exception.
* tests/python/except.py: More tests for the above.
* tests/python/bdddict.py: Typo in comment.
2022-03-11 09:53:04 +01:00
187bacc254 tests: don't wipe python environment
* tests/run.in: keep original PYTHONPATH contents
* NEWS: mention the bug
2022-03-10 15:57:19 +01:00
Alexandre Duret-Lutz
530cf7ca47 tests: replace all "assert" by unittest assertions
If the assert fails because of a comparison, it is useful that the
test suite log contains a comparison of these values.
unittest.assertEqual() and friends do that for us.

* HACKING: Add a section about Python tests.
* tests/sanity/style.test: Forbid the use of "assert" in
Python tests.
* tests/python/298.py, tests/python/341.py, tests/python/471.py,
tests/python/accparse2.py, tests/python/aiger.py,
tests/python/aliases.py, tests/python/alternating.py,
tests/python/bdddict.py, tests/python/bdditer.py,
tests/python/bugdet.py, tests/python/complement_semidet.py,
tests/python/declenv.py, tests/python/decompose_scc.py,
tests/python/det.py, tests/python/dualize.py, tests/python/ecfalse.py,
tests/python/except.py, tests/python/game.py, tests/python/gen.py,
tests/python/genem.py, tests/python/implies.py,
tests/python/intrun.py, tests/python/kripke.py,
tests/python/langmap.py, tests/python/ltl2tgba.py,
tests/python/ltlf.py, tests/python/ltlparse.py,
tests/python/ltlsimple.py, tests/python/mealy.py,
tests/python/merge.py, tests/python/mergedge.py,
tests/python/misc-ec.py, tests/python/optionmap.py,
tests/python/origstate.py, tests/python/otfcrash.py,
tests/python/parity.py, tests/python/parsetgba.py,
tests/python/pdegen.py, tests/python/prodexpt.py,
tests/python/randgen.py, tests/python/relabel.py,
tests/python/remfin.py, tests/python/removeap.py,
tests/python/rs_like.py, tests/python/satmin.py,
tests/python/sbacc.py, tests/python/sccfilter.py,
tests/python/sccinfo.py, tests/python/sccsplit.py,
tests/python/semidet.py, tests/python/setacc.py,
tests/python/setxor.py, tests/python/simplacc.py,
tests/python/simstate.py, tests/python/sonf.py, tests/python/split.py,
tests/python/streett_totgba.py, tests/python/streett_totgba2.py,
tests/python/stutter.py, tests/python/sum.py,
tests/python/synthesis.py, tests/python/toparity.py,
tests/python/toweak.py, tests/python/tra2tba.py,
tests/python/trival.py, tests/python/twagraph.py,
tests/python/zlktree.py: Replace all occurrences of "assert" by calls
to unittest.TestCase methods.
2022-03-07 09:03:21 +01:00
Alexandre Duret-Lutz
7b7e1b254b tests: avoid seq
Partial fix for #501.

* tests/core/prodchain.test: Hardcode the seq output.
* tests/core/bricks.test: Use $AWK instead of seq.
* tests/core/defs.in: Define $AWK.
* NEWS: Mention the bug.
2022-03-04 17:25:37 +01:00
93fb11017b ltlfilt: add --sonf and --sonf-aps flags
* bin/ltlfilt.cc: Here.
* NEWS: Mention new ltlfilt flags.
* tests/Makefile.am, tests/core/sonf.test: Test these flags.
2022-03-04 17:24:26 +01:00
c71691659b tl: implement suffix operator normal form
* spot/tl/Makefile.am: New sonf files
* spot/tl/sonf.cc, spot/tl/sonf.hh: Here.
* python/spot/impl.i: include sonf.hh header
* doc/spot.bib: add entry for the SONF paper
* tests/Makefile.am: new python tests
* tests/python/formulas.ipynb: show sample usage
* tests/python/sonf.py: test automata equivalence before/after SONF
* NEWS: mention the change
2022-03-04 17:23:58 +01:00
Alexandre Duret-Lutz
c7201e4776 * .gitlab-ci.yml (alpine-gcc): Fix path for logs. 2022-03-03 09:10:53 +01:00
Alexandre Duret-Lutz
6b88d6f35b configure: remove some header checks
do them using C++17's __has_include instead

* configure.ac: Do not check for sys/times.h,
valgrind/memcheck.h, and spawn.h.
* bin/common_trans.cc, spot/misc/fixpool.hh, spot/misc/mspool.hh,
spot/misc/timer.hh: Adjust to use __has_include instead.
2022-03-02 17:37:25 +01:00
Alexandre Duret-Lutz
cdc89dad16 work around an issue in Flex 2.6.4
The fallback definition of SIZE_MAX supplied by flex was not
preprocessor friendly and prevented robin_hood.hh from doing "#if
SIZE_MAX == UINT64_MAX", as observed by Marc Espie on OpenBSD.

* spot/parseaut/scanaut.ll, spot/parsetl/scantl.ll: Define
__STDC_VERSION__ just so that the code generated by Flex
include <inttypes.h>.
* NEWS: Mention the bug.
* THANKS: Add Marc.
2022-02-17 16:57:18 +01:00
Alexandre Duret-Lutz
3f9f6029e7 reduce_parity: fix to work on automata with deleted edges
* spot/twaalgos/parity.cc (reduce_parity): Use the
size of the edge vector to initialize piprime1 and piprime2,
not the number of edges.
* tests/python/parity.py: Add test case, based on a report
by Yann Thierry-Mieg.
2022-02-14 09:13:36 +01:00
Alexandre Duret-Lutz
58f33deeca remove uses of unary_function and binary_function
These were deprecated in C++11, and are supposed to be removed from
C++17, however gcc-snapshot just started warning about those.

* spot/misc/bddlt.hh, spot/misc/hash.hh, spot/misc/ltstr.hh,
spot/twa/taatgba.hh, spot/twaalgos/ltl2tgba_fm.cc: Here.
2022-02-07 16:41:59 +01:00
Alexandre Duret-Lutz
a3753e608b improve support for LTLf semantics
* spot/twaalgos/remprop.cc, spot/twaalgos/remprop.hh (to_finite): New
function.
* bin/autfilt.cc (--to-finite): Add it.
* doc/org/tut12.org: Update to use it.
* spot/twa/twagraph.cc (purge_dead_states): Also remove false edges.
* spot/parseaut/parseaut.yy: Do not ignore false self-loops, and
add false self-loop on accepting states without successors.
* NEWS: List the above changes.
* tests/core/ltlf.test: New file.
* tests/Makefile.am: Add it.
* tests/core/complete.test: Adjust expected output.
2022-02-07 16:41:59 +01:00
Alexandre Duret-Lutz
9b0a20412b dot: Add option @ to support aliases
Fixes #497.

* spot/twaalgos/dot.cc: Implement this option.
* tests/core/ltl2tgba.test, tests/core/randaut.test: @ is
now a valid option for --dot, use something else.
* tests/python/aliases.ipynb: New file.
* tests/Makefile.am, doc/org/tut.org: Add it.
* doc/org/hoa.org: Mention aliases.
* NEWS: Mention this new feature.
2022-02-04 14:35:46 +01:00
Alexandre Duret-Lutz
4506643632 hoa: extract the alias formating code for reuse
* spot/twaalgos/hoa.hh (hoa_alias_formater): New class.
* spot/twaalgos/hoa.cc: Implement hoa_alias_formater using the code
that was previously in metadata::encode_label, and use it in place.
2022-02-03 17:39:42 +01:00
Alexandre Duret-Lutz
f759697e1c autfilt: add --aliases=drop|keep option
* bin/autfilt.cc: Here.
* spot/twaalgos/hoa.cc, spot/twaalgos/hoa.hh: Fix the prototype
of set_aliases so that it is usable.
* tests/core/dualize.test: Add a simple test case.
* NEWS: Mention the new option.
2022-02-01 16:35:41 +01:00
Alexandre Duret-Lutz
95b2e7366f Merge branch 'master' into next 2022-02-01 13:53:52 +01:00
Alexandre Duret-Lutz
664788bb16 * NEWS, configure.ac: Bump version to 2.10.4.dev. 2022-02-01 13:52:13 +01:00
Alexandre Duret-Lutz
bf77d0f0d3 Release Spot 2.10.4
* NEWS, configure.ac, doc/org/setup.org: Bump version to 2.10.4.
2022-02-01 13:50:56 +01:00