Commit graph

6789 commits

Author SHA1 Message Date
Alexandre Duret-Lutz
1a36ea6ce4 ltlsynt: fix usage for --dot's argument
* bin/ltlsynt.cc (dispatch_print_hoa): Pass the right argument to
print_dot.
* tests/core/ltlsynt.test: Test it.
* NEWS: Mention the bug.
2024-09-23 11:54:57 +02:00
Alexandre Duret-Lutz
514209e80f * configure.ac: Typo. 2024-09-23 11:54:51 +02:00
Alexandre Duret-Lutz
f5ab5678b5 python: improve support of spot-extra, and recent swig
I could not run "make check" in a copy of seminator 2.0 regenerated
with swig 4.0, because of changes in the way Swig imports its shared
libraries.

* python/spot/__init__.py: If sys.path contains "/spot-extra"
directory, add it to spot.__path__ as well.  This helps situations
where a plugin use libtool and the development tree has the shared
libraries in .../spot-extra/.libs/
2024-09-23 11:54:40 +02:00
Alexandre Duret-Lutz
cc0f6f1e0d game: fix solving "parity min" games with multi-colored edges
* spot/twaalgos/game.cc: If the original acceptance is "parity min",
use min_set(), not max_set(), to read edge priorities.
* tests/python/game.py: Add a test case.
* NEWS: Mention the bug.
2024-09-23 11:54:22 +02:00
Alexandre Duret-Lutz
97832af321 randltl: fix generation without unary operators
* spot/tl/randomltl.hh (has_unary_ops): New method.
* spot/tl/randomltl.cc: Avoid creating subformulas of even size
when we do not have unary operators.
* tests/core/randpsl.test: Test it.
* NEWS: Mention it.
2024-09-23 11:53:41 +02:00
Alexandre Duret-Lutz
bdc63db9f0 ltlgrind: improve error message when formulas are missing
The error message, inherited from ltl2tgba, used to say "No formula to
translate", but "translate" isn't appropriate here.

* bin/common_finput.cc, bin/common_finput.hh (check_no_formula): Allow
"translate" to be changed.
* bin/ltlgrind.cc: Change it.
* tests/core/ltlgrind.test: Test it.
2024-09-23 11:52:43 +02:00
Alexandre Duret-Lutz
783efa2fe8 * doc/tl/tl.tex: Some typos. 2024-09-23 11:52:15 +02:00
Alexandre Duret-Lutz
e48506f548 improve some comments
* spot/twaalgos/complement.hh, spot/twaalgos/complement.cc: Here.
2024-09-23 11:51:59 +02:00
Alexandre Duret-Lutz
e13deeb143 * .gitlab-ci.yml (publish-stable): Add scp for LRE's dload host. 2024-09-23 11:49:26 +02:00
Alexandre Duret-Lutz
b9cb4022cf gen: rename pps-arbiter's APs
* bin/genltl.cc, spot/gen/formulas.cc: Adjust the name of the AP
produced by pps-arbiter.
* NEWS: Mention the change.
2024-09-19 18:45:44 +02:00
Alexandre Duret-Lutz
40a45eff22 * doc/org/ltlmix.org: Typos. 2024-09-19 18:45:44 +02:00
Alexandre Duret-Lutz
7b0e15a7fb implement maximum cardinality search
* spot/twaalgos/mcs.cc, spot/twaalgos/mcs.hh: New files.
* spot/twaalgos/Makefile.am: Add them.
* python/spot/impl.i: Include mcs.hh.
* bin/autfilt.cc: Add --mcs option.
* NEWS: Mention it.
* doc/spot.bib: Add reference.
* tests/core/mcs.test: New file.
* tests/Makefile.am: Add it.
2024-09-19 18:45:34 +02:00
Alexandre Duret-Lutz
77a17881a3 defrag_states: allow a permutation of state numbers
* spot/misc/permute.hh: New file.
* spot/misc/Makefile.am: Add it.
* spot/graph/graph.hh, spot/twa/twagraph.cc,
spot/twaalgos/randomize.cc: Use the new permute_vector() function.
* spot/twa/twagraph.hh: Update documentation.
* NEWS: Update.
2024-09-18 13:59:51 +02:00
Alexandre Duret-Lutz
4ccdcb4a5b tests: rewrite the syntimpl test
* tests/core/syntimpl.cc: Rewrite to test multiple formulas at once,
and test them with three different implication checks.
* tests/core/syntimpl.test: Adjust the test to execute syntimpl only
once.
2024-09-18 13:59:51 +02:00
Alexandre Duret-Lutz
99a622059c synthesis: fix handling of deadstates
* spot/twaalgos/synthesis.cc: Remove a debuging print
from the semisym code, and add an additional case
in the fullysym code.
* tests/core/ltlsynt.test: Add a some test case,
and remove some bashism.
2024-09-12 14:00:08 +02:00
Alexandre Duret-Lutz
90fb7b1cd9 * doc/org/ltlmix.org: Fix example. 2024-09-11 11:38:12 +02:00
Alexandre Duret-Lutz
1724d2b14c ltlsynt: -q should also hide status and AIG output
* bin/ltlsynt.cc: Honnor -q properly.
* doc/org/ltlsynt.org, tests/core/ltlsynt.test: Adjust.
* NEWS: Mention this bug.
2024-09-10 12:29:23 +02:00
Alexandre Duret-Lutz
950b205b63 ltlsynt: have --csv exclude the formula column by default
* bin/ltlsynt.cc: Add the --csv-with-formula option.
* doc/org/ltlsynt.org, tests/core/ltlsynt2.test, NEWS: Adjust.
2024-09-10 12:29:23 +02:00
Alexandre Duret-Lutz
5488cb75c6 ltlsynt: overhaul CSV output
Previous output was not very usable in presence of decomposed
specifications.  We now keep track of the number of parts, and also
prefix the columns names with "max_" or "sum_" to indicate how their
statistics are updated in presence of multiple part.  Other missing
statistics, like the size of the translated automaton, or maximal
number of colors seen in a game, have been added.

* spot/twaalgos/synthesis.hh (bench_var): Rename, augment, and
document each statistsic.
* spot/twaalgos/mealy_machine.cc, spot/twaalgos/synthesis.cc,
bin/ltlsynt.cc: Adjust to the new naming scheme.
* doc/org/ltlsynt.org: Show a CSV file, and document its columns.
* tests/core/ltlsynt-pgame.test, tests/core/ltlsynt2.test,
tests/core/ltlsynt.test: Adjust test cases.
* NEWS: Mention the backward incompatible change.
2024-09-10 12:29:14 +02:00
Alexandre Duret-Lutz
b729aa3f30 ltlsynt: fix a few issues with --csv
Some columns were superfluous, other had inconsistent names, and some
times where not tracked.

* spot/twaalgos/synthesis.cc: Improve tracking of times and verbose
messages.
* bin/ltlsynt.cc (print_csv): Adjust CSV columns.
* tests/core/ltlsynt.test, tests/core/ltlsynt2.test,
tests/core/ltlsynt-pgame.test: Adjust expected CSV and verbose
messages.
* doc/org/ltlsynt.org: Give some example.
2024-09-05 08:41:30 +02:00
Alexandre Duret-Lutz
a22a05b8ec ltlsynt: implement --csv-without-formula
* bin/ltlsynt.cc: Implement that new option.
* tests/core/ltlsynt2.test: Test it.
* NEWS: Mention the change.
2024-09-05 08:41:30 +02:00
Alexandre Duret-Lutz
6e5592fe6a ltlsynt: save source filename with --csv
* bin/ltlsynt.cc (print_csv): Make filename mandatory, and add a
"was_game" argument.
(process_formula, process_aut_file): Adjust calls.
* tests/core/ltlsynt2.test: Adjust test cases.
2024-09-05 00:18:12 +02:00
Alexandre Duret-Lutz
45cb9caa0e game: avoid a spurious g++14 warning
* spot/twaalgos/game.cc, spot/twaalgos/game.hh (get_state_winners):
Declare a non-const version as well to avoid a "possibly dangling
reference" error in code show by tut40.org.
2024-09-05 00:18:04 +02:00
Alexandre Duret-Lutz
e6ebbdf65f ltlfilt, ltlsynt, ltlmix: add a --part-file option
* bin/common_ioap.cc, bin/common_ioap.hh (read_part_file): New
function.
* bin/ltlfilt.cc, bin/ltlmix.cc, bin/ltlsynt.cc: Use it.
* doc/org/ltlfilt.org, doc/org/ltlmix.org, doc/org/ltlsynt.org:
Mention that new option, and improve the links to its description
in ltlsynt.org.
* NEWS: Mention the new option.
* tests/core/ltlfilt.test, tests/core/ltlmix.test,
tests/core/ltlsynt.test: Adjust test cases.
2024-09-04 16:09:31 +02:00
Alexandre Duret-Lutz
388d005635 fix spurious g++-14 warning
* spot/twaalgos/mealy_machine.cc (mm_sat_prob_t<true>::get_sol): Here.
2024-09-02 17:28:28 +02:00
Alexandre Duret-Lutz
a8a0a1973e ltlsynt: fix usage for --dot's argument
* bin/ltlsynt.cc (dispatch_print_hoa): Pass the right argument to
print_dot.
* tests/core/ltlsynt.test: Test it.
* NEWS: Mention the bug.
2024-09-02 17:26:42 +02:00
Alexandre Duret-Lutz
8eec295e23 * configure.ac: Typo. 2024-09-02 13:54:36 +02:00
Alexandre Duret-Lutz
c9911962d4 python: improve support of spot-extra, and recent swig
I could not run "make check" in a copy of seminator 2.0 regenerated
with swig 4.0, because of changes in the way Swig imports its shared
libraries.

* python/spot/__init__.py: If sys.path contains "/spot-extra"
directory, add it to spot.__path__ as well.  This helps situations
where a plugin use libtool and the development tree has the shared
libraries in .../spot-extra/.libs/
2024-09-02 13:50:36 +02:00
Alexandre Duret-Lutz
89a06772b8 game: fix solving "parity min" games with multi-colored edges
* spot/twaalgos/game.cc: If the original acceptance is "parity min",
use min_set(), not max_set(), to read edge priorities.
* tests/python/game.py: Add a test case.
* NEWS: Mention the bug.
2024-08-30 22:18:20 +02:00
Alexandre Duret-Lutz
c5d991e55c autfilt: add a --track-formula option
Fixes #591.

* spot/twaalgos/matchstates.cc,
spot/twaalgos/matchstates.hh (match_states_decorate): New function.
* bin/autfilt.cc: Add a --track-formula option.
* tests/core/trackf.test: New file.
* tests/Makefile.am: Test it.
* NEWS: Mention it.
2024-08-30 22:18:20 +02:00
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
5f1d00b858 twaalgos: introduce match_states(a,b)
This is a useful part for issue #591.

* spot/twaalgos/matchstates.cc, spot/twaalgos/matchstates.hh: New
files.
* spot/twaalgos/Makefile.am: Add them.
* python/spot/impl.i: Add python bindings.
* tests/python/matchstates.py: New file.
* tests/Makefile.am: Add it.
* NEWS: Mention this new function.
2024-08-30 22:17:51 +02:00
Alexandre Duret-Lutz
b549e8e8c1 * doc/org/ltlmix.org: Fix several typos. 2024-08-27 00:28:35 +02:00
Alexandre Duret-Lutz
3e90265ce7 org: add example of ltlmix used on synthesis specifications
* doc/org/ltlmix.org: Here.
2024-08-26 21:57:20 +02:00
Alexandre Duret-Lutz
c6f4b18655 genltl: add --lily-patterns
* spot/gen/formulas.cc, spot/gen/formulas.hh, bin/genltl.cc: Implement
support for --lily-pattern.
* doc/spot.bib, bin/man/genltl.x: Add references.
* NEWS: Mention it.
* tests/core/ltlsynt.test: Use these formulas.
* tests/core/genltl.test: Adjust.
2024-08-26 21:56:59 +02:00
Alexandre Duret-Lutz
844fb887d9 ltlmix: add support for the I/O variants
* bin/ltlmix.cc: Add options --ins, --outs, as well as the
two-argument form of -A/-P.
* bin/common_ioap.hh, bin/common_ioap.cc (is_output): New function.
* spot/tl/apcollect.cc, spot/tl/apcollect.hh (create_atomic_prop_set):
Allow the prefix string to be changed.
* spot/tl/randomltl.cc, spot/tl/randomltl.hh: Add support for an I/O
version with two set of atomic proposition, and a predicate to decide
if the original proposition was input or output.
* tests/core/ltlmix.test: More tests.
2024-08-26 11:42:09 +02:00
Alexandre Duret-Lutz
6fa42c90b8 ltlfilt: add support for --relabel=io, --ins, and --outs
* bin/common_ioap.cc, bin/common_ioap.hh (relabel_io): New function.
* bin/ltlfilt.cc: Implement the above options.
* doc/org/ltlfilt.org, NEWS: Illustrate them.
* tests/core/ltlfilt.test: Add some quick tests.
2024-08-25 18:16:50 +02:00
Alexandre Duret-Lutz
bea1713f4e ltlsynt: extract In/Out AP processing in separate file
We'd like to reuse the --ins/--outs matching in ltlfilt
as well, so let's put that code in a common file.

* bin/common_ioap.cc, bin/common_ioap.hh: New files.
* bin/ltlsynt.cc: Extracted from here.
* bin/Makefile.am: Add them.
2024-08-24 22:15:15 +02:00
Alexandre Duret-Lutz
2390a89986 ltlmix: learn option -R for random conjuncts
* bin/ltlmix.cc: Implement this option.
* doc/org/ltlmix.org: Illustrate it.
* tests/core/ltlmix.test: Add a test.
2024-08-23 21:54:52 +02:00
Alexandre Duret-Lutz
c8b8ac60be bin: new ltlmix tool
Fixes #400.

* spot/tl/randomltl.cc, spot/tl/randomltl.hh: Adjust to accept
a set of formula to replace the atomic propositions.
* bin/ltlmix.cc: New file.
* bin/Makefile.am: Add it.
* bin/man/ltlmix.x: New file.
* bin/man/Makefile.am: Add it.
* doc/org/ltlmix.org: New file.
* doc/Makefile.am: Add it.
* bin/man/genltl.x, bin/man/randltl.x, bin/man/spot.x, bin/spot.cc,
doc/org/arch.tex, doc/org/concepts.org, doc/org/tools.org, NEWS: Mention
ltlmix.
* tests/core/ltlmix.test: New file.
* tests/Makefile.am: Add it.
2024-08-23 21:46:05 +02:00
Alexandre Duret-Lutz
baf2778c9a randltl: fix generation without unary operators
* spot/tl/randomltl.hh (has_unary_ops): New method.
* spot/tl/randomltl.cc: Avoid creating subformulas of even size
when we do not have unary operators.
* tests/core/randpsl.test: Test it.
* NEWS: Mention it.
2024-08-23 21:45:47 +02:00
Alexandre Duret-Lutz
436e5a2d7f ltlgrind: improve error message when formulas are missing
The error message, inherited from ltl2tgba, used to say "No formula to
translate", but "translate" isn't appropriate here.

* bin/common_finput.cc, bin/common_finput.hh (check_no_formula): Allow
"translate" to be changed.
* bin/ltlgrind.cc: Change it.
* tests/core/ltlgrind.test: Test it.
2024-08-23 21:45:47 +02:00
Alexandre Duret-Lutz
3693bbab08 synthesis: rewrite a C++20 construct into C++17
It is illegal to capture the element of a structured binding
in C++17, GCC 15 will complain about it.

* spot/twaalgos/synthesis.cc: Move the illegal structured binding
inside the lambda.
2024-08-20 16:52:27 +02:00
Alexandre Duret-Lutz
a0a6ec6794 * doc/tl/tl.tex: Some typos. 2024-08-20 10:35:31 +02:00
Alexandre Duret-Lutz
44efc96595 formula: add a missing trivial rewriting in SERE
We should have [*0]|f ≡ f when f is a SERE that already accept the
empty word.  Fixes issue #454.

* spot/tl/formula.cc: Implement the rewriting.
* tests/core/reduccmp.test: Add a test case.
* doc/tl/tl.tex, NEWS: Document it.
2024-08-20 10:35:31 +02:00
Alexandre Duret-Lutz
bcdfe44c44 ltlfilt: add support for --to-delta2
* bin/ltlfilt.cc: Implement this option.
* tests/core/delta2.test: New file.
* tests/Makefile.am: Add it.
* NEWS: Mention it.
2024-08-20 10:35:31 +02:00
Alexandre Duret-Lutz
41abe3f831 tl: implement to_delta2()
* spot/tl/delta2.cc, spot/tl/delta2.hh: New files.
* spot/tl/Makefile.am: Add them.
* python/spot/impl.i: Include delta2.hh.
* tests/python/delta2.py: New file.
* tests/Makefile.am: Add it.
* NEWS: Mention the change.
2024-08-20 10:35:31 +02:00
Alexandre Duret-Lutz
5bc4d12bba ltlfilt: support --pi1 --sigma1 --delta1 --pi2 --sigma2
* bin/ltlfilt.cc: Implement those option.
* tests/core/hierarchy.test: Add a quick test.
* NEWS: Mention it.
2024-08-20 10:35:30 +02:00
Alexandre Duret-Lutz
7901a37747 formula: track Δ₁, Σ₂, Π₂, and Δ₂ membership
* spot/tl/formula.hh, spot/tl/formula.cc: Update the properties
and track them.
* tests/core/kind.test: Augment the test case.
* doc/tl/tl.tex, doc/spot.bib, NEWS: Document these new classes.
2024-08-20 10:35:30 +02:00
Alexandre Duret-Lutz
0c52c49079 doc: fix documentation of P and R classes
* doc/tl/tl.tex: Remove four incorrect production rules in the grammar
for φ_P and φ_R, and fix two.
2024-07-19 17:07:39 +02:00