Commit graph

6651 commits

Author SHA1 Message Date
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
Alexandre Duret-Lutz
6a7ef4db3f postprocess: call restrict_dead_end_edges_here()
Related to issue #587.

* spot/twaalgos/postproc.cc, spot/twaalgos/postproc.hh: Add
support for option "rde".
* bin/spot-x.cc, NEWS: Mention it.
* tests/core/deadends.test, tests/core/ltl2tgba2.test,
tests/python/atva16-fig2a.ipynb, tests/python/deadends.py: Adjust test
cases to reflect the improvement.
* tests/core/ltlsynt.test: Also adjust this test case, which is the
only one worsened.  Some extra gates are generated when translating
GFa<->GFb with --algo=ds or --algo=sd.  Issue #588 would be one way to
fix that.
2024-07-19 17:07:39 +02:00
Alexandre Duret-Lutz
31511e042a twaalgos: implement restrict_dead_end_edges_here()
Discussed in issue #587.

* spot/twaalgos/deadends.cc, spot/twaalgos/deadends.hh: New files.
* spot/twaalgos/Makefile.am, python/spot/impl.i: Add them.
* tests/core/deadends.test, tests/python/deadends.py: New files.
* tests/Makefile.am: Add them.
* spot/twa/acc.cc, spot/twa/acc.hh (keep_one_inf_per_branch): New
method.
* bin/autfilt.cc: Learn option --restrict-dead-end-edges.
* NEWS: Mention it.
2024-07-19 17:07:39 +02:00
Alexandre Duret-Lutz
f03e32619a improve some comments
* spot/twaalgos/complement.hh, spot/twaalgos/complement.cc: Here.
2024-07-19 17:07:38 +02:00
Philipp Schlehuber
5ddac258e1 Introduce new ways to split an automaton
The explicit way of splitting suffers if there are
too many input APs, two new ways of splitting
are introduced as well as a heuristic to chose
between them.

* NEWS: update
* spot/twaalgos/synthesis.cc,
spot/twaalgos/synthesis.hh: New fonctions
* bin/ltlsynt.cc: Add corresponding option
* tests/core/gamehoa.test,
tests/core/ltlsynt.test,
tests/python/_partitioned_relabel.ipynb,
tests/python/_synthesis.ipynb,
tests/python/game.py,
tests/python/split.py,
tests/python/synthesis.py: Adjusting and adding test
2024-07-18 10:13:14 +02:00
Florian Renkin
2274308cad reduce_mealy_here: do not reduce when size is 1
* spot/twaalgos/mealy_machine.cc: here
2024-07-18 10:12:29 +02:00
Alexandre Duret-Lutz
c7c18db6db work around GCC bug 108860
GCC 12/13/14 can emit spurious warnings for something
as innocent as vec.insert(vec.begin(), 12)...
Reported by Antoine Martin and Quentin Rataud.

* m4/gccwarn.m4: Test the above code and disable GCC's
-Wnull-dereference warning if necessary.
2024-06-27 15:39:15 +02:00
Alexandre Duret-Lutz
fdb09f787e * spot.spec.in: Update URL and description. 2024-05-20 16:15:57 +02:00
Alexandre Duret-Lutz
6420bde5fd debian: drop ipython3-notebook dependency
* debian/control: Remove the ipython3-notebook alternate
build-depends, as this package was removed from Debian in 2016.  Add
gdb ad build-depends, in attempt to fix some OSB builds.
2024-05-20 16:11:18 +02:00
Alexandre Duret-Lutz
799db05111 * doc/org/tut25.org: Fix typos in the example. 2024-05-16 22:40:52 +02:00
Alexandre Duret-Lutz
c44e03c791 * NEWS, configure.ac: Bump version to 2.12.0.dev. 2024-05-16 13:15:55 +02:00
Alexandre Duret-Lutz
532b57d0df Release spot 2.12
* NEWS, configure.ac, doc/org/setup.org: Bump version to 2.12.
2024-05-16 13:15:19 +02:00
Alexandre Duret-Lutz
913e807d66 stats: fix rounding issues
Fixes #582.

* spot/twaalgos/stats.cc: Add 0.5 to the result of bdd_satcountset()
before truncating it.
* NEWS: Mention the bug.
2024-05-16 13:14:03 +02:00
Alexandre Duret-Lutz
2bd2abd4c9 pdegen & toparity: minor refactor
* spot/twaalgos/degen.hh (is_partially_degeneralizable): Pass the
forbid vector by reference, and document it.  I hope that not passing
forbid by copy will get rid of a spurious "potential nullptr" warning
by gcc on Arch Linux.
* spot/twaalgos/degen.cc: Adjust, and refactor the code a bit.
* spot/twaalgos/toparity.cc: Likewise.
2024-05-14 10:41:18 +02:00
Alexandre Duret-Lutz
ed91f59bbd tl: new PSL trivial simplifications
Always rewrite {[*]}[]->0 as 0, and {[*]}<>->1 = 1.  Fixes #572.

* spot/tl/formula.cc: Implement them.
* doc/tl/tl.tex, NEWS: Document them.
* tests/core/equals.test: Test those.
2024-05-13 22:15:15 +02:00
Alexandre Duret-Lutz
a826a4ae6f * tests/python/formulas.ipynb: Improve SONF example (fixes #578). 2024-05-06 21:01:37 +02:00
Alexandre Duret-Lutz
c5c3e905ae python: workaround different help() output in Python 3.12
Python 3.12 introduced some subtle changes in the way doc strings are
displayed by help().  This was causing spurious errors in the
following test.

* tests/python/formulas.ipynb: Use print(x.__doc__) instead of
help(x).
2024-05-03 16:32:16 +02:00
Alexandre Duret-Lutz
e6362b785b python: use raw strings when appropriate
We had some incorrectly escaped strings that are now causing
SyntaxWarnings with Python 3.12

* bin/options.py, python/spot/aux_.py, python/spot/ltsmin.i,
python/spot/__init__.py: Here.
* NEWS: Mention the fix.
2024-05-03 10:47:43 +02:00
Alexandre Duret-Lutz
dbe31c72c8 Upgrade detection of Python include path for Python 3.12
Fixes #577.

* m4/pypath.m4: Python 3.12 removed distutils, so use sysconfig
instead.
* NEWS: Mention the bug.
2024-05-02 21:37:50 +02:00
Alexandre Duret-Lutz
be102e09d4 implement BA acceptance set reduction and enlargement
For issue #570.

* spot/twaalgos/cleanacc.hh,
spot/twaalgos/cleanacc.cc (reduce_buchi_acceptance_set_here,
enlarge_buchi_acceptance_set_here): New functions.
* bin/autfilt.cc: Add options --reduce-acceptance-set and
--enlarge-acceptance-set.
* tests/core/basetred.test: New file.
* tests/Makefile.am: Add it.
* NEWS: Mention it.
2024-04-25 23:27:30 +02:00
Alexandre Duret-Lutz
ab7f4f51c4 simulation: fix determinism check
Commit bda40a5f introduced a subtle bug where nm_minato was being
increased in more cases causing some non-deterministic automata to be
incorrectly tagged as deterministic automata.

Fixes issue #575, reported by Dávid Smolka.

* spot/twaalgos/simulation.cc (create_edges): Do not increment
nm_minato when dest is bddfalse.
* tests/core/568.test: Add Dávid's first test-case.
* tests/python/forq_contains.py: Add Dávid's second test-case.
2024-04-24 23:59:07 +02:00
Alexandre Duret-Lutz
ffddbd84d0 * NEWS: Fix some typos. 2024-04-19 10:20:49 +02:00
Alexandre Duret-Lutz
c5490428be * tests/sanity/style.test: Fix spurious failure. 2024-04-19 09:43:50 +02:00
Florian Renkin
2ffdd84942 Rename split_independant_formulas
split_independant_formulas is now split_independent_formulas

* spot/twaalgos/synthesis.hh, spot/twaalgos/synthesis.cc: change name.
* bin/ltlsynt.cc: update call
* NEWS: Mention it.
2024-04-16 17:02:52 +02:00
Florian Renkin
f57782686d Rename minimize_obligation_garanteed_to_work
minimize_obligation_garanteed_to_work is now
minimize_obligation_guaranteed_to_work

* spot/twaalgos/minimize.hh, spot/twaalgos/minimize.cc: change name.
* spot/twaalgos/postproc.cc: update call
* NEWS: Mention it.
2024-04-16 17:02:52 +02:00
Florian Renkin
96ff2225e3 Fix typos in doc, comments and messages
* bin/README, bin/common_conv.hh, bin/common_trans.cc,
    bin/ltlsynt.cc, bin/spot-x.cc, spot/gen/automata.hh,
    spot/graph/graph.hh, spot/ltsmin/ltsmin.hh,
    spot/ltsmin/spins_interface.hh, spot/ltsmin/spins_kripke.hh,
    spot/mc/bloemen.hh, spot/mc/bloemen_ec.hh, spot/mc/cndfs.hh,
    spot/mc/deadlock.hh, spot/mc/intersect.hh, spot/mc/lpar13.hh,
    spot/mc/mc_instanciator.hh, spot/misc/bareword.cc,
    spot/misc/fixpool.hh, spot/misc/formater.hh, spot/misc/minato.hh,
    spot/misc/satsolver.hh, spot/misc/timer.hh,
    spot/parseaut/public.hh, spot/priv/partitioned_relabel.cc,
    spot/priv/satcommon.hh, spot/ta/ta.hh, spot/ta/taexplicit.cc,
    spot/ta/taproduct.hh, spot/ta/tgta.hh, spot/taalgos/reachiter.hh,
    spot/taalgos/tgba2ta.hh, spot/tl/apcollect.cc,
    spot/tl/apcollect.hh, spot/tl/formula.cc, spot/tl/parse.hh,
    spot/tl/randomltl.hh, spot/tl/relabel.hh, spot/tl/simplify.cc,
    spot/twa/acc.hh, spot/twa/bddprint.hh, spot/twa/formula2bdd.cc,
    spot/twa/twa.hh, spot/twa/twagraph.cc, spot/twa/twagraph.hh,
    spot/twaalgos/aiger.cc, spot/twaalgos/aiger.hh,
    spot/twaalgos/alternation.hh,  spot/twaalgos/cleanacc.cc,
    spot/twaalgos/cobuchi.cc, spot/twaalgos/contains.cc,
    spot/twaalgos/couvreurnew.cc, spot/twaalgos/cycles.hh,
    spot/twaalgos/degen.cc, spot/twaalgos/degen.hh,
    spot/twaalgos/dot.hh, spot/twaalgos/dtbasat.cc,
    spot/twaalgos/dtwasat.cc, spot/twaalgos/dtwasat.hh,
    spot/twaalgos/dualize.cc, spot/twaalgos/emptiness.hh,
    spot/twaalgos/emptiness_stats.hh, spot/twaalgos/game.cc,
    spot/twaalgos/genem.hh, spot/twaalgos/hoa.hh,
    spot/twaalgos/langmap.hh, spot/twaalgos/ltl2tgba_fm.hh,
    spot/twaalgos/magic.cc, spot/twaalgos/magic.hh,
    spot/twaalgos/mask.hh, spot/twaalgos/mealy_machine.cc,
    spot/twaalgos/mealy_machine.hh,
    spot/twaalgos/minimize.hh, spot/twaalgos/parity.cc,
    spot/twaalgos/parity.hh, spot/twaalgos/postproc.cc,
    spot/twaalgos/product.hh, spot/twaalgos/reachiter.hh,
    spot/twaalgos/relabel.cc, spot/twaalgos/remfin.cc,
    spot/twaalgos/remfin.hh, spot/twaalgos/sccfilter.cc,
    spot/twaalgos/sccinfo.hh, spot/twaalgos/se05.cc,
    spot/twaalgos/se05.hh, spot/twaalgos/simulation.hh,
    spot/twaalgos/split.hh, spot/twaalgos/stats.hh,
    spot/twaalgos/synthesis.cc, spot/twaalgos/synthesis.hh,
    spot/twaalgos/tau03.hh, spot/twaalgos/tau03opt.hh,
    spot/twaalgos/toparity.hh, spot/twaalgos/totgba.hh,
    spot/twaalgos/translate.hh, spot/twaalgos/word.cc,
    spot/twaalgos/word.hh, spot/twaalgos/zlktree.cc,
    spot/twaalgos/zlktree.hh, spot/twacube/cube.hh,
    spot/twacube/twacube.hh, tests/core/cube.cc,
    tests/core/ltlsynt.test, tests/core/parity.cc,
    tests/core/safra.cc, tests/core/twagraph.cc: here
2024-04-16 17:01:31 +02:00
Alexandre Duret-Lutz
952e502480 * .gitlab-ci.yml: Use CI_JOB_ID instead of CI_PIPELINE_ID. 2024-04-10 21:58:47 +02:00
Alexandre Duret-Lutz
1a5b4f00f5 * spot/twaalgos/split.hh: Typo in comment. 2024-04-10 21:58:32 +02:00
Alexandre Duret-Lutz
9230614f8d ltlsynt implement polarity and gequiv after decomposition too
* bin/ltlsynt.cc: Also simplify subformulas using polarity and global
equivalence.  Add support for --polarity=before-decompose and
--global-equiv=before-decompose to restablish the previous behavior.
* spot/tl/apcollect.hh,
spot/tl/apcollect.cc (realizability_simplifier::merge_mapping): New
method.
* tests/core/ltlsynt.test: Add new test cases.
2024-04-05 12:42:43 +02:00
Alexandre Duret-Lutz
848d1a3901 man: fix several issues
The \f(CW macro to switch to "constant-width" does not seem to
honored when converting to html, and I've found some patch to
groff removing its use from their own man page.
https://lists.gnu.org/archive/html/groff-commit/2020-07/msg00015.html
Lets use \fC instead, as it seems to produce some <tt> in HTML.

Two manpages had URLs pointing to spot.lrde.epita.fr instead of
spot.lre.epita.fr.

Finally, spot-x.x had an incorrectly closed .EX block, that completly
broke the HTML conversion.

* bin/man/autcross.x, bin/man/ltl2tgba.x, bin/man/ltlcross.x,
bin/man/spot-x.x, bin/man/spot.x: Fix the aforementioned issues.
2024-04-03 23:05:12 +02:00
Alexandre Duret-Lutz
a17d8a0501 help2man: work around some utf8 issues
help2man used characters in the range 0x80,...,0x84 to mark special
sections/characters during its processing, but those bytes where also
occurring in other utf-8 characters breaking the output.  For instance
the character '₁' ( a subscript 1), is encoded as "0xE2 0x82 0x81" in
utf-8.

* tools/help2man: Tell perl that input and output should be assumed to
be utf-8.  Also use "private-use codepoints" for those special
characters to avoid any future conflict.
2024-04-03 17:47:18 +02:00
pierreganty
27a0137208 Small fixes in the man pages
* bin/man/dstar2tgba.x, bin/man/spot-x.x: Typos.
2024-04-03 16:05:17 +02:00
Alexandre Duret-Lutz
79b7cfea01 ltl2tgba_fm: simplify the ratexp_to_dfa interface
* spot/twaalgos/ltl2tgba_fm.cc (ratexp_to_dfa::succ): Rewrite using a
vector of (label,dest) as return type.
2024-04-03 15:27:21 +02:00
Alexandre Duret-Lutz
7ac570fa3f modernize some Python code
Since we now require Python 3.6, we can use f-strings instead of
format() to make the code more readable.

* doc/org/tut01.org, doc/org/tut02.org, doc/org/tut03.org,
doc/org/tut21.org, doc/org/tut24.org, doc/org/tut90.org,
python/spot/__init__.py, python/spot/jupyter.py, tests/python/acc.py,
tests/python/acc_cond.ipynb, tests/python/complement_semidet.py,
tests/python/decompose.ipynb, tests/python/formulas.ipynb,
tests/python/highlighting.ipynb, tests/python/ipnbdoctest.py,
tests/python/ltlf.py, tests/python/parity.ipynb,
tests/python/product.ipynb, tests/python/relabel.py,
tests/python/satmin.ipynb, tests/python/stutter-inv.ipynb,
tests/python/twagraph-internals.ipynb, tests/python/zlktree.ipynb: Use
f-strings.
2024-03-27 14:32:03 +01:00
Alexandre Duret-Lutz
df44f7a5c2 require python 3.6
* HACKING, NEWS, README, doc/org/install.org: Update.
* m4/pypath.m4, python/spot/__init__.py: Adjust requirements.
* python/spot/ltsmin.i: Don't use capture_output, this is a 3.7
option.
2024-03-27 14:31:32 +01:00
Alexandre Duret-Lutz
88f8af22c3 autfilt: add option --separate-edges
* bin/autfilt.cc: Implement it.
* tests/core/split.test: Test it.
* doc/org/tut25.org: Demonstrate it.
* NEWS: Mention it.
2024-03-25 20:25:24 +01:00
pierreganty
89f87795ca * doc/org/tut25.org: Minor corrections. 2024-03-25 20:25:24 +01:00
Alexandre Duret-Lutz
26ef5458eb determinize: speedup on automata with many AP and few labels
This uses the same trick as discussed in issue #566 and issue #568.

* spot/twaalgos/determinize.cc (safra_support): Use a basis
if it is smaller than 2^|support| for the current Safra state.
* tests/core/568.test: Add some tests.
* NEWS: Mention the optimization.
2024-03-25 20:25:24 +01:00
Alexandre Duret-Lutz
bda40a5f19 simulation: heuristically use a separated-label approach to rebuild
Closes issue #568.

* spot/twaalgos/simulation.cc (direct_simulation::build_result):
Implement an alternate loop based on edge_separator::basis to iterate
over a signature to build results.
* tests/core/568.test: New file.
* tests/Makefile.am: Add it.
* NEWS: Mention the optimization.
2024-03-25 20:25:24 +01:00