Commit graph

6408 commits

Author SHA1 Message Date
Alexandre Duret-Lutz
bdaa31ef21 work around gcc-snapshot warnings about dangling references
* spot/twaalgos/game.hh, spot/twaalgos/game.cc (get_state_players,
get_strategy, get_state_winners): Take argument by reference, not
copy.
* spot/twaalgos/synthesis.cc, spot/twaalgos/mealy_machine.cc: Replace
auto by actual type for readability.
2023-01-31 14:29:40 +01:00
Alexandre Duret-Lutz
d16183c053 * .gitlab-ci.yml: Use pipeline id to name volumes. 2023-01-25 08:36:40 +01:00
Alexandre Duret-Lutz
121d5e5524 bin: fix number conversion routines on 32bit
On 32bit archetectures, long int = int the current check for detecting
values that overflow int will fail.  Conversion routings should check
errno.

* bin/common_conv.cc, bin/common_range.cc: Here.
2023-01-25 08:36:27 +01:00
Alexandre Duret-Lutz
e5150d0314 autfilt: allow --highlight-word to work on Fin acceptance
Fixes #523.

* bin/autfilt.cc: Remove the restriction.
* tests/core/acc_word.test: Add test case.
* NEWS: Mention the fix.
2023-01-24 17:55:17 +01:00
Florian Renkin
5b0143eba6 ltlsynt: typo in doc
* bin/ltlsynt.cc: here
2023-01-23 16:35:16 +01:00
Alexandre Duret-Lutz
60abfeb31f bin: update copyright year and laboratory name
* bin/common_setup.cc: Here.
2023-01-23 16:07:49 +01:00
Alexandre Duret-Lutz
3aba452b5b robin_hood: update to version version 3.11.5
* spot/priv/robin_hood.hh: Update.
* spot/priv/Makefile.am: Patch ROBIN_HOOD_IS_TRIVIALLY_COPYABLE to
work around an issue with clang on Arch linux.
2023-01-23 15:25:06 +01:00
Alexandre Duret-Lutz
a9c457f93f dbranch: fix handling of states without successors
Fixes #524, reported by Rüdiger Ehlers.

* spot/twaalgos/dbranch.cc: When merging an edge going to state
without successors simply delete it.
* bin/spot-x.cc: Typo in documentation.
* tests/core/ltlcross.test: Add a test case.
* NEWS: Mention the bug.
2023-01-23 11:59:49 +01:00
Alexandre Duret-Lutz
09bbaa1e41 more code smells
* bin/common_file.cc, bin/common_file.hh, bin/common_finput.cc,
bin/common_finput.hh, bin/common_output.cc, bin/common_setup.cc,
bin/common_setup.hh, bin/common_trans.cc, bin/common_trans.hh,
bin/dstar2tgba.cc, bin/genaut.cc, bin/genltl.cc, bin/ltl2tgba.cc,
bin/ltl2tgta.cc, bin/ltlcross.cc, bin/ltldo.cc, bin/ltlfilt.cc,
bin/ltlsynt.cc, bin/randltl.cc: Fix minor code issues reported by
sonarcloud.
2023-01-10 21:53:40 +01:00
Alexandre Duret-Lutz
96c3972c5c bin: detect overflows in conversion functions
* bin/common_conv.cc (to_int, to_unsigned): Here.
* bin/common_range.cc (parse_range): And there.
* tests/core/ltlgrind.test, tests/core/genaut.test,
tests/core/randaut.test: Add test cases.
2023-01-09 11:34:21 +01:00
Alexandre Duret-Lutz
05edab3f5a fix some code smells reported by sonarcloud
* bench/dtgbasat/gen.py, bin/autcross.cc, bin/autfilt.cc,
bin/common_aoutput.cc, bin/common_aoutput.hh: Various cleanups.
2023-01-06 10:12:50 +01:00
Alexandre Duret-Lutz
716bb781eb * spot/twaalgos/game.cc: Fix incorrect std::forward. 2023-01-05 17:51:01 +01:00
Alexandre Duret-Lutz
2ba6fba29f simplify several comparison operators
* spot/twaalgos/dtbasat.cc, spot/twaalgos/dtwasat.cc,
spot/twaalgos/simulation.cc: Simplify, as reported by sonarcloud.
2023-01-05 17:50:37 +01:00
Alexandre Duret-Lutz
16ad7bdf77 * doc/org/spot.css: Do not define background twice. 2023-01-05 17:47:46 +01:00
Alexandre Duret-Lutz
396009c014 parseaut: better merge of multiple initial states
If an initial states without incoming transition has to be merged into
another one, its outgoing edges can be reused by just changing their
source.

* spot/parseaut/parseaut.yy (fix_initial_state): Implement this here.
* tests/core/522.test: Add more tests.
* tests/core/readsave.test: Adjust one expected output.
* doc/org/hoa.org: Mention the completeness change.
* NEWS: Mention the new feature.
2023-01-05 16:15:08 +01:00
Alexandre Duret-Lutz
daf797b9d4 fix merging of initial states in state-based automata
Fixes #522 reported by Raven Beutner.

* spot/parseaut/parseaut.yy: Make sure all edges leaving
the initial state have the same color.
* THANKS: Add Raven.
* NEWS: Mention the bug.
* tests/core/522.test: New file.
* tests/Makefile.am: Add it.
2023-01-04 15:12:59 +01:00
Alexandre Duret-Lutz
c9ba998200 avoid a g++-12 warning about potential null pointer dereference
* spot/twaalgos/determinize.cc (sorted_nodes): Rewrite to
avoid reallocation of temporary vector.
2022-12-10 22:18:18 +00:00
Alexandre Duret-Lutz
ba695194cd priv: remove unused allocator.hh
* spot/priv/allocator.hh: Delete.
* spot/priv/Makefile.am, tests/core/mempool.cc: Adjust.
2022-12-10 22:18:18 +00:00
Alexandre Duret-Lutz
d0b1508831 acd: rewrite Python wrapper without jQuery
* python/spot/__init__.py (acd): Rewrite javascript so that it does
not use jQuery, to make it easier to use in jupyterlab, or with
nbconvert.
* tests/python/zlktree.ipynb: Adjust.
* NEWS: Mention this.
2022-12-10 22:18:18 +00:00
Philipp Schlehuber-Caissier
427f667f9f lazy eval for sat mealy minimization
Evaluate incomp of player conditions only if necessary

* spot/twaalgos/mealy_machine.cc: Here
2022-12-09 17:00:52 +01:00
Philipp Schlehuber-Caissier
6e2e7c942e Using partitioned_relabel_here
Put the new function to use in order to speed up
mealy machine minimization

* spot/twaalgos/mealy_machine.cc: Here
* spot/twaalgos/synthesis.cc
, spot/twaalgos/synthesis.hh: Helper function to relabel games
* tests/python/_mealy.ipynb
, tests/python/except.py
, tests/python/_partitioned_relabel.ipynb: Adapt/expand tests
2022-12-09 17:00:52 +01:00
Philipp Schlehuber-Caissier
fb63dfc309 introduce partitioned_relabel_here
Function taking an automaton and trying to relabel
it by partitioning the old conditions and encode the
different subsets of the partition with new variables

* spot/priv/Makefile.am: Add
* spot/priv/partitioned_relabel.hh
, spot/priv/partitioned_relabel.cc: try_partition_me,
computes the partition of a given vector of bdds
* spot/twaalgos/relabel.hh
, spot/twaalgos/relabel.cc: Here. Adapt also relabel()
to cope with the different type of relabeling_maps
* tests/python/_partitioned_relabel.ipynb
, tests/python/except.py: Test and Usage
* tests/Makefile.am: Add test
2022-12-09 17:00:51 +01:00
Alexandre Duret-Lutz
b02d8328ee Merge branch 'master' into next 2022-12-09 09:45:01 +01:00
Alexandre Duret-Lutz
09e147ee4b * NEWS, configure.ac: Bump version to 2.11.3.dev. 2022-12-09 09:43:18 +01:00
Alexandre Duret-Lutz
d7feeca13e Release Spot 2.11.3
* NEWS, configure.ac, doc/org/setup.org: Bump version to 2.11.3.
2022-12-09 09:40:27 +01:00
Alexandre Duret-Lutz
1248d326aa Work around spurious g++-12 warnings
* spot/twaalgos/ltl2tgba_fm.cc, spot/tl/formula.hh,
spot/twaalgos/translate.cc: Add SPOT_ASSUME in various places to help
g++.
2022-12-09 09:30:10 +01:00
Alexandre Duret-Lutz
720c380412 formula: new trivial simplifications
Add the following rules:
  - f|[+] = [+] if f rejects [*0]
  - f|[*] = [*] if f accepts [*0]
  - f&&[+] = f if f rejects [*0]
  - b:b[*i..j] = b[*max(i,1)..j]
  - b[*i..j]:b[*k..l] = b[*max(i,1)+max(k,1)-1,1), j+l-1]

* spot/tl/formula.cc: Implement the new rules.
* doc/tl/tl.tex: Document them.
* tests/core/equals.test: Test them.
* NEWS: Add them
2022-12-09 09:30:10 +01:00
Alexandre Duret-Lutz
8ed9e3381f formula: introduce one_plus(), and saturate predefined formulas
* spot/tl/formula.hh, spot/tl/formula.cc (one_plus): New.
(fnode): Add a saturated argument.
(tt_, ff_, eword_, one_plus, one_star): Create saturated node.
(destroy): Do not check for id() < 3.
2022-12-09 09:29:46 +01:00
Alexandre Duret-Lutz
4629d074ab Fix semantics of [*i..j] and [:*i..j]
* doc/tl/tl.tex: After a discussion with Antoin, it appears that the
semantics previously given for f[*0..j] was not considering that f[*0]
should accept any sequence of one letter.
2022-12-07 11:26:51 +01:00
Alexandre Duret-Lutz
5dbf601afb * NEWS: Typos. 2022-12-06 16:07:21 +01:00
Philipp Schlehuber-Caissier
37d4e513d9 game: fix appending strategies bug
When calling solve_parity_game() multiple times on the same
automaton the strategies are appended one after the other.
Reported by Dávid Smolka.

* NEWS: Mention the bug.
* spot/twaalgos/game.cc: Fix it.
* tests/python/game.py: Test it.
* THANKS: Add Dávid.
2022-12-06 16:06:04 +01:00
Philipp Schlehuber-Caissier
86c433cf80 mealy: fix incorrect assertion
* spot/twaalgos/mealy_machine.cc (minimize_mealy): Do not compare
result to the original unsplit machine without splitting it first.
* tests/python/mealy.py: Add a test case.
2022-12-06 16:04:40 +01:00
Alexandre Duret-Lutz
6b70edabf0 getopt: do not include sys/cdefs.h to please Alpine Linux
* m4/getopt.m4: Pretend sys/cdefs.h is missing, so that Alpine linux
does not output a warning which we would turn into an error.
2022-12-02 17:30:29 +01:00
Alexandre Duret-Lutz
29037c1f55 autfilt: print match count even on parse errors
* bin/autfilt.cc: If -c is used, print the match_count even
in present of parse errors.
* tests/core/readsave.test: Adjust.
* NEWS: Mention the bug.
2022-12-02 15:24:31 +01:00
Alexandre Duret-Lutz
a032abf0c5 parseaut: diagnose states that are unused and undefined
Reported by Pierre Ganty.

* spot/parseaut/parseaut.yy: Add diagnostics.
* tests/core/parseaut.test: Adjust expected output, and add a test
case.
* NEWS: Mention the bug.
2022-12-02 15:24:25 +01:00
Alexandre Duret-Lutz
cfe1b0b70d configure: --with-pythondir should also override pyexecdir
Fixes #512.

* configure.ac: Here.
* NEWS: Mention the bug.
2022-11-17 11:14:32 +01:00
Alexandre Duret-Lutz
c2a3f2941d ltl_to_tgba_fm: fix a memory leak on abort
This issue surfaced in twacube.test after the previous patches.

* spot/twaalgos/ltl2tgba_fm.cc: Release the formula namer on abort.
* NEWS: Mention the bug.
2022-11-15 17:50:45 +01:00
Alexandre Duret-Lutz
843c4cdb91 translate, simplify: limit containment checks of n-ary operators
Fixes #521.

* spot/tl/simplify.cc, spot/tl/simplify.hh,
spot/twaalgos/translate.cc, spot/twaalgos/translate.hh: Add an option
to limit automata-based implication checks of n-ary operators when too
many operands are used.  Defaults to 16.
* bin/spot-x.cc, NEWS, doc/tl/tl.tex: Document it.
* tests/core/bdd.test: Disable the limit for this test.
2022-11-15 17:49:21 +01:00
Alexandre Duret-Lutz
f2c65ea557 simplify: set exprop=false during containment checks
For issue #521, reported by Jacopo Binchi.

* spot/tl/simplify.cc: Here.
* tests/core/521.test: New test case.
* tests/Makefile.am: Add it.
* NEWS: Mention it.
* THANKS: Add Jacopo Binchi.
2022-11-15 17:22:13 +01:00
Alexandre Duret-Lutz
a6c65dff8d misc Doxygen fixes
* spot/misc/satsolver.hh, spot/tl/formula.hh, spot/twaalgos/hoa.hh,
spot/twaalgos/synthesis.hh, spot/twaalgos/zlktree.hh,
spot/twacube_algos/convert.hh: Typos in Doxygen comments.
2022-11-10 17:08:30 +01:00
Alexandre Duret-Lutz
0f4f7ec287 * debian/copyright: Fix download URL. 2022-11-10 17:08:30 +01:00
Alexandre Duret-Lutz
b36cee06a1 adjust to Swig 4.1.0
* python/spot/__init__.py: Add flatnested versions of some static
methods.
* spot/twa/acc.hh: Hide && version of & and |, causing trouble
to swig.
* tests/python/_synthesis.ipynb, tests/python/synthesis.ipynb:
Upgrade expected type names.
* tests/python/ipnbdoctest.py: Adjust for difference between 4.0 and
4.1.
2022-11-10 17:08:30 +01:00
Alexandre Duret-Lutz
6dc740184c * tests/sanity/style.test: Fix recent grep warnings. 2022-11-07 09:37:40 +01:00
Alexandre Duret-Lutz
5c5133348e mealy: improve error reporting
* spot/twaalgos/mealy_machine.cc: Add more exceptions.
* tests/python/except.py: Test them.
2022-11-07 09:07:31 +01:00
Alexandre Duret-Lutz
fafe40c530 fix namespace for exception errors
* spot/priv/satcommon.cc, spot/twaalgos/dtbasat.cc,
spot/twaalgos/dtwasat.cc: When setting exception on std::ofstream, use
ofstream::failbit and ofstream::badbit instead of ifstream::failbit
and ifstream::badbit.
2022-11-04 18:21:13 +01:00
Alexandre Duret-Lutz
17a959aa29 Bump version to 2.11.2.dev
* NEWS, configure.ac: Here.
2022-10-26 11:24:20 +02:00
Alexandre Duret-Lutz
66aaa11580 Release Spot 2.11.2
* NEWS, configure.ac, doc/org/setup.org: Bump version to 2.11.2.
2022-10-26 11:15:39 +02:00
Alexandre Duret-Lutz
c312a05bbd do not use id for animating the logo
because we remove ids using svgo...

* doc/org/spot2.svg, doc/org/spot.css: Animate the verison using a
class.
2022-10-26 10:04:48 +02:00
Alexandre Duret-Lutz
0a710eb995 declare all argp_program_doc as static
* bench/stutter/stutter_invariance_formulas.cc, bin/autcross.cc,
bin/autfilt.cc, bin/dstar2tgba.cc, bin/genaut.cc, bin/genltl.cc,
bin/ltl2tgba.cc, bin/ltl2tgta.cc, bin/ltlcross.cc, bin/ltldo.cc,
bin/ltlfilt.cc, bin/ltlsynt.cc, bin/randaut.cc, bin/randltl.cc,
bin/spot-x.cc, bin/spot.cc, tests/ltsmin/modelcheck.cc: Here.
2022-10-25 16:31:35 +02:00
Alexandre Duret-Lutz
65bc67f300 relabel_here: make sure free_bddpair is called
* spot/twaalgos/relabel.cc (relabel_here): This function has multiple
exit paths, and none of them were calling bdd_freepair.  Use a
unique_ptr to ensure that.
2022-10-25 11:53:05 +02:00