Commit graph

74 commits

Author SHA1 Message Date
Alexandre Duret-Lutz
3d3e87948c twaalgos: add a match_states variant with a formula argument
This is related to issue #591, reported by Blake C. Rawlings.

* spot/twaalgos/ltl2tgba_fm.cc, spot/twaalgos/ltl2tgba_fm.hh
(ltl_to_tgba_fm): Add option to keep LTL labels.
* spot/twaalgos/matchstates.cc, spot/twaalgos/matchstates.hh
(match_states): Add variant with a formula as second argument.
* tests/python/matchstates.py: Test it.
* NEWS: Mention it.
* THANKS: Add reporter.
2024-08-30 22:18:09 +02:00
Alexandre Duret-Lutz
1b81ecb80c dualize: should not call cleanup_acceptance_here
Based on a report by Emmanuel Filiot, who was surprized that dualizing
Büchi did not always produce co-Büchi.

* spot/twaalgos/dualize.cc: Remove the call to
cleanup_acceptance_here.
* spot/twaalgos/dualize.hh: Improve documentation.
* NEWS: Mention the possible backward incompatible change.
* tests/core/dualize.test, tests/python/dualize.py,
tests/python/pdegen.py: Adjust test cases.
* spot/twaalgos/complement.cc (complement): Call
cleanup_acceptance_here when dualize() returns a smaller automaton.
* THANKS: Add Emmanuel.
2024-03-07 23:50:04 +01:00
Alexandre Duret-Lutz
60f046a574 add intersection checks between words and automata
Several people have asked for a way to check whether a word is
accepted by an automaton, including at least Jonah Romero and Scott
Buckley.  So it's time we have it.

* spot/twa/twa.hh, spot/twa/twa.cc,
spot/twaalgos/word.hh (intersects): Add the new variant.
* spot/twa/fwd.hh: Forward declare twa_word, so that
we can use it in twa.hh.
* spot/twaalgos/forq_contains.cc: Use the new intersection check.
* tests/python/word.ipynb, NEWS: Mention it.
* THANKS: Add Scott Buckley.
2024-03-07 21:31:20 +01:00
Alexandre Duret-Lutz
983964d037 strength: generalize is_safety_automaton to any type of automata
Reported by Samuel Judson.

* spot/twaalgos/strength.cc (is_safety_automaton): Reimplement it.
* spot/twaalgos/strength.hh (is_safety_automaton): Update
documentation.
* tests/python/safety.py: New file.
* tests/Makefile.am: Add it.
* NEWS: Mention this change.
* THANKS: Add Samuel.
2023-12-16 00:34:58 +01:00
Alexandre Duret-Lutz
5ed56c054b ltsmin: make it easier to find the README
Fixes #550, reported by Daniel Stan.

* tests/ltsmin/README: Move...
* README.ltsmin: ... here.
* Makefile.am (EXTRA_DIST): Add README.ltsmin.
* README: Mention README.ltsmin.
* spot/ltsmin/spins_interface.cc: Mention README.ltsmin in the error
message.
* tests/ltsmin/check.test, tests/ltsmin/check3.test: Adjust reference
to README.
* NEWS: Mention this fix.
* THANKS: Add Danial.
2023-11-15 17:23:47 +01:00
Alexandre Duret-Lutz
cbb981ffd5 python: add bindings for set of unsigned int
Requested by Marek Jankola.

* python/spot/impl.i: Add bindings for std::set<unsigned>.
* tests/python/powerset.py: New file.
* tests/Makefile.am: Add it.
* THANKS: Add Marek.
2023-09-08 12:05:06 +02:00
Alexandre Duret-Lutz
e2149fabf4 determinize: work around overflow in reachability matrix indices
Fixes #541, reported by David Dokoupil.

* spot/twaalgos/determinize.cc: Disable use_simulation when the input
has more than 2^16 SCCs..  Also rework the reachability
matrix to store only its lower half triangle.
* spot/twaalgos/determinize.hh, NEWS: Mention the limitation of
use_simulation.
* THANKS: Add David.
2023-09-05 09:12:15 +02:00
Alexandre Duret-Lutz
69d9b78a55 mention the bug fixed in BuDDy
* NEWS: Explain the bug fixed in previous patch and reported in
issue #535.
* THANKS: Add Guillermo.
2023-08-01 09:19:03 +02: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
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
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
da356f1142 substitute @LIBSPOT_PTHREAD@ in spot/libspot.pc
Fixes #520, reported by Fangyi Zhou.

* spot/Makefile.am (libspot.pc): Substitute @LIBSPOT_PTHREAD@.
* THANKS: Add Fangyi Zhou.
2022-10-11 15:37:34 +02:00
Alexandre Duret-Lutz
288b1c7958 contains: generalize second argument to a twa
This was triggered by a question from Pierre Ganty on the mailing
list.

* spot/twaalgos/contains.hh, spot/twaalgos/contains.cc (contains):
Generalize second argument to const_twa_ptr instead of
const_twa_graph_ptr.
* NEWS: Mention this.
* tests/python/ltsmin-pml.ipynb: Show that it work.
* THANKS: Mention Pierre.
2022-06-22 23:43:07 +02:00
Alexandre Duret-Lutz
3b809c0a14 Fix compilation on MacOS X
Patch by Shachar Itzhaky.

* spot/parseaut/scanaut.ll, spot/parsetl/scantl.ll: Include
libc-config.h instead of config.h.
* NEWS: Mention the fix.
* THANKS: Add Shachar.
2022-05-17 09:35:09 +02:00
Alexandre Duret-Lutz
013c879b41 twagraph: improve copy of kripke_graph
Fix #505, Reported by Edmond Irani Liu.

* spot/twa/twagraph.cc (copy): Deal with kripke_graph in a better way.
* spot/twaalgos/hoa.cc: Do not force the use of named-states since
when the input is a kripke_graph.
* tests/python/kripke.py: Adjust test cases.
* NEWS: Mention the change.
* THANKS: Add Edmund.
2022-05-09 13:42:20 +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
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
a8cfcd2cc2 python: fix a memory leak in all added __iter__ methods
Reported by Yechuan Xia

* python/spot/impl.i: Add %newobject to all __iter__ methods.
* NEWS: Mention the list of affected methods.
* THANKS: Update.
2022-01-31 10:20:42 +01:00
Alexandre Duret-Lutz
fc92c88cdb sccinfo: fix accepting run computation
* spot/twaalgos/sccinfo.cc (scc_info::get_accepting_run): Ignore edges
whose colors are not part of the colors gathered in the SCC up to
deciding acceptance.
* tests/python/genem.py: New test case, reported by Clément Tamines.
* THANKS: Add him.
* NEWS: Mention the bug.
2022-01-14 15:46:53 +01:00
Alexandre Duret-Lutz
0b048e1c05 twagraph: improve doc
Based on report by Michaël Cadilhac.

* spot/graph/graph.hh, spot/twa/twagraph.hh (defrag_state): Clarify
that only unreachable states are meant to be removed.
* spot/twa/twagraph.hh (merge_edges): Typo in comment.  Fixes #454.
* THANKS: Add Michaël.
2021-02-18 22:19:03 +01:00
Alexandre Duret-Lutz
eeaed5592f fix ignored aborter in WDBA-minimization
Fixes #443, reported by Roei Nahum.  (However the fix
only works for the development version, where wdba-det-max
was introduced to work around that kind of problem.)

* spot/twaalgos/minimize.cc: Avoid aborter being implicitly
converted to Boolean.
* tests/core/ltl2tgba2.test: Add test case.
* THANKS: Add Roei Nahum.
2020-12-08 12:03:30 +01:00
Alexandre Duret-Lutz
67fa19cb08 relabel: generalize 9365f8de1 to remove more false edges
* spot/twaalgos/relabel.cc: Detect false edges as they are created,
even as the result of multiple renamings.
* tests/core/ltl2tgba2.test: More test cases, reported by Jens Kreber.
* NEWS: Mention the bug.
* THANKS: Add Jens.
2020-04-10 10:52:40 +02:00
Alexandre Duret-Lutz
d2ba554507 tmpfile: improve error message
* spot/misc/tmpfile.cc: Display strerror(errno) plus some suggestions
that depend on the error.  Based on a report from Shengping Shaw.
* THANKS: Add reporter.
* tests/core/ltlcross5.test: New file.
* tests/Makefile.am: Add it.
2019-12-15 17:44:54 +01:00
Alexandre Duret-Lutz
be389c5c25 introduce op::strong_X
This was prompted by reports by Andrew Wells and Yong Li.

* NEWS, doc/tl/tl.tex: Document the changes.
* THANKS: Add Andrew.
* bin/ltlfilt.cc: Match --ltl before --from-ltlf if needed.
* spot/parsetl/parsedecl.hh, spot/parsetl/parsetl.yy,
spot/parsetl/scantl.ll: Parse X[!].
* spot/tl/formula.cc, spot/tl/formula.hh: Declare the new operator.
* spot/tl/ltlf.cc: Adjust to handle op::X and op::strong_X correctly.
* spot/tl/dot.cc, spot/tl/mark.cc, spot/tl/mutation.cc,
spot/tl/print.cc, spot/tl/simplify.cc, spot/tl/snf.cc,
spot/tl/unabbrev.cc, spot/twa/formula2bdd.cc,
spot/twaalgos/ltl2taa.cc, spot/twaalgos/ltl2tgba_fm.cc,
tests/core/ltlgrind.test, tests/core/rand.test,
tests/core/sugar.test, tests/python/randltl.ipynb: Adjust.
* tests/core/ltlfilt.test, tests/core/sugar.test,
tests/core/utf8.test: More tests.
2019-09-23 17:01:28 +02:00
Alexandre Duret-Lutz
57e6208e1e Update instructions for divine-ltsmin installation
* tests/ltsmin/README: Here.
* THANKS: Reported by Jiraphapa Jiravaraphan.
2019-06-04 13:58:19 +02:00
Alexandre Duret-Lutz
7d6bfe545f remprop: reset no-terminal property
Reported by Yong Li.

* spot/twaalgos/remprop.cc: Here.
* tests/python/removeap.py: New test case.
* tests/Makefile.am: Add it.
* NEWS: Document the issue.
* THANKS: Add Yong Li.
2019-06-04 13:58:19 +02:00
Alexandre Duret-Lutz
ba89cb5db5 * THANKS: Add Victor Khomenko. 2019-04-26 23:01:43 +02:00
Alexandre Duret-Lutz
7e3232e3a3 org: explain how to build automata with state-based acceptance
* doc/org/tut22.org: Here.  Suggested by Yannick Molinghen.
* THANKS: Add him.
2019-04-03 10:48:04 +02:00
Alexandre Duret-Lutz
1d0db88073 org: suggest python-dev for installing Python headers
* doc/org/install.org: Mention python-dev and libpython3-dev.
Suggested by Tereza Šťastná.
* THANKS: Add her.
2019-04-02 23:18:27 +02:00
Alexandre Duret-Lutz
f26dd904ff python: better support for explicit Kripke
Part of issue #376, reported by Hashim Ali.

* python/spot/impl.i: Add bindings for kripke_graph.
* python/spot/__init__.py (automaton): Add a want_kripke option.
* spot/kripke/kripkegraph.hh: Honnor the "state-names" property
when displaying states.
* spot/twaalgos/hoa.cc: Preserve names of Kripke states.
* tests/python/ltsmin-dve.ipynb: Illustrate all the above.
* NEWS: Mention those changes.
* THANKS: Add Hashim.
2019-02-13 17:47:53 +01:00
Alexandre Duret-Lutz
188d210521 python: suggest installing GraphViz when dot is not found
This fixes an issue mentioned in #375.

* python/spot/aux.py (str_to_svg): Catch a missing 'dot' and instruct
the user to install GraphViz.
* THANKS: Add reporter.
2019-01-25 23:16:46 +01:00
Alexandre Duret-Lutz
ff960ee313 * THANKS: Add the reporter of #372. 2019-01-23 11:05:36 +01:00
Alexandre Duret-Lutz
365fde8364 org: typo
* doc/org/concepts.org: Typo reported by Paul Guénézan.
* THANKS: Add him.
2019-01-07 11:26:45 +01:00
Alexandre Duret-Lutz
6cfdf02c5a Fix Alpine Linux builds
Reported by Maxime Bouton.

* spot/misc/tmpfile.cc: Include stdlib.h, not cstdlib, so
that our replacement secure_getenv() is found.
* THANKS: Add Maxime.
2018-11-10 12:48:11 +01:00
Alexandre Duret-Lutz
250e121a60 print_dot: add xlabel to colored states if too many colors in use
Based on a report from Andreas Tollkötter.

* spot/twaalgos/dot.cc (highlight_states_show_num_): New option,
turned on implicitly when more than 8 colors are used.
* tests/core/highlightstate.test: Test it.
* NEWS: Mention it.
* THANKS: Add Andreas.
2018-09-25 14:04:11 +02:00
Alexandre Duret-Lutz
55dfbc8206 fix --disable-doxygen and --disable-c++17
Reported by Yuri Victorovich.

* configure.ac (enable_doxygen, enable_c++17): Use $enableval instead
of "yes".
* THANKS: Add Yuri.
2018-08-11 17:33:53 +02:00
Alexandre Duret-Lutz
568a6180f1 is_unambiguous: fix false negatives
Reported by Simon Jantsch and David Müller.

* tests/core/unambig.test: Test the issue.
* spot/twaalgos/isunamb.cc: Fix it.
* NEWS: Mention it.
* THANKS: Add Simon.
2018-04-09 10:22:49 +02:00
Alexandre Duret-Lutz
69a3e8486e stutter: fix closure() on Fin-acceptance
From a report by Anton Pirogov.

* NEWS: Mention the bug.
* spot/twaalgos/stutter.cc: Fix it.
* tests/core/stutter-tgba.test: Test it.
* THANKS: Add Anton.
2018-03-23 18:51:00 +01:00
Alexandre Duret-Lutz
183ec1fb4e ltlcross, autcross, ltldo: support --fail-on-timeout
Suggested by Tobias Meggendorfer.  Fixes #294.

* bin/autcross.cc, bin/ltlcross.cc, bin/ltldo.cc: Add the option.
* tests/core/autcross3.test, tests/core/ltlcross3.test,
tests/core/ltldo.test: Test it.
* tests/Makefile.am: Add autcross3.test.
* NEWS, doc/org/autcross.org, doc/org/ltlcross.org, doc/org/ltldo.org:
Mention the option.
* THANKS: Add Tobias.
2017-10-15 12:22:15 +02:00
Alexandre Duret-Lutz
002e6ed96b formula: fix building of {a->c[*]}
Fixes #285, reported by Florian Perlié-Long.

* NEWS: Mention the issue.
* spot/tl/formula.cc: Fix it.
* tests/core/kind.test: Document it.
* THANKS: Add Florian.
2017-09-26 17:32:54 +02:00
Alexandre Duret-Lutz
646c5170ed simplify: some new simplification rules
For #263, reported by Mikuláš Klokočka.

G(a & Xe1 & F(b & e2)) = G(a & e1 & Fb & e2)
F(a | Xu1 | G(b | u2)) = F(a | u1 | Gb | u2)

* spot/tl/simplify.cc: Implement the rules.
* doc/tl/tl.tex, NEWS: Document them.
* tests/core/reduccmp.test, tests/core/eventuniv.test: Add test cases.
* tests/core/det.test, tests/core/ltl2tgba2.test: Adjust to expect
smaller automata.
* THANKS: Add Mikuláš.
2017-09-02 11:27:04 +02:00
Alexandre Duret-Lutz
d2e9515c10 skip divine tests when divine does not understand compile --help
Fixes #235, reported by Henrich Lauko.

* python/spot/ltsmin.i: Catch CalledProcessError.
* NEWS: Mention the bug.
* THANKS: Add Henrich.
2017-02-28 17:02:06 +01:00
Alexandre Duret-Lutz
7574d6d1e2 debian: distribute static libraries
Suggested by Jeroen Meijer.

* debian/rules: Enable static libraries.
* debian/libbddx-dev.install, debian/libspot-dev.install: Distribute
them.
* THANKS: Add Jeroen.
* NEWS: Mention the change.
2017-01-14 09:29:32 +01:00
Alexandre Duret-Lutz
413eab1d32 ltlf: ensure alive holds initially
Reported by Shufang Zhu.

* spot/tl/ltlf.cc, spot/tl/ltlf.hh: Fix the transltion
and update the comments.
* tests/core/ltlfilt.test: Adjust test cases.
* NEWS: Mention the fix.
* THANKS: Add Shufang Zhu.
2016-12-09 21:37:15 +01:00
Alexandre Duret-Lutz
dd706d7847 twa: do not set prop_state_acc in set_acceptance
Reported by Juraj Major.

* spot/twa/twa.hh: check num_sets() in prop_state_acc() so we do not
have to set it in set_acceptance(), causing trouble if set_acceptance()
is called multiple times.
* tests/python/setacc.py: New test case.
* tests/Makefile.am: Add it.
* THANKS: Add Juraj.
* NEWS: Mention the bug.
2016-11-11 15:20:56 +01:00
Alexandre Duret-Lutz
d919b78c89 simulation: do not purge unreachable states when recording implications
This fixes the incorrect output of tgba_determinize() reported yesterday
by Reuben Rowe.

* spot/twaalgos/simulation.cc: Do not purge unreachable states when
recording implications.
* tests/python/bugdet.py: New test case.
* tests/Makefile.am: Add it.
* THANKS: Add Reuben.
* NEWS: Mention the bug.
2016-11-01 09:29:55 +01:00
Alexandre Duret-Lutz
421a9a1b12 relabel: do not unregister old AP that are also new
Reported by Ayrat Khalimov against the trans.html page when using
ltl3ba.

* spot/twaalgos/relabel.cc: Here.
* tests/core/ltl3dra.test: Test it.
* NEWS: Mention it.
* THANKS: Add Ayrat.
2016-07-07 15:57:14 +02:00
Amaury Fauchille
1c82444376 autfilt: add new option --accept-word
Suggested by Matthias Heizmann. Fixes #109.

* NEWS: notify the new option
* THANKS: add Matthias Heizmann
* bin/autfilt.cc: add new option --accept-word=WORD which filters
automata that accept WORD
* doc/org/autfilt.org: add an example of the new option
* tests/Makefile.am: add core/acc_word.test to the list of test files
* tests/core/acc_word.test: test some uses of the new option
2016-03-07 22:19:25 +01:00
Alexandre Duret-Lutz
1ca4204ccd Remove obsolete ACLOCAL_AMFLAGS definition.
Fixes #138, reported by Valentin Iovene.

* Makefile.am: Here.
* THANKS: Add Valentin.
2016-02-03 16:51:24 +01:00
Alexandre Duret-Lutz
cd8e53de09 is_unambiguous: fix detection of empty languages
* src/tests/unambig.test: New test case.  Reported by Ming-Hsien Tsai.
* src/twaalgos/sccfilter.cc: Always create an initial state.
* src/twaalgos/isunamb.cc: Speed up on empty languages.
* NEWS, THANKS: Update.
2015-10-20 08:06:31 +02:00