Commit graph

5723 commits

Author SHA1 Message Date
Alexandre Duret-Lutz
1c5468a93a simplify: fix handling of keep_top_xor
Under that option, !(a ^ b) was converted
to (!a <=> !b) instead of simply (a <=> b).

* spot/tl/simplify.cc (equiv_or_xor): Improve
rewriting.
* tests/core/ltl2tgba2.test, tests/python/simstate.py: Adjust test
cases.
2020-07-22 17:02:22 +02:00
Alexandre Duret-Lutz
1784671ca1 Merge branch 'master' into next 2020-07-22 08:13:26 +02:00
Alexandre Duret-Lutz
2ce84f7889 * configure.ac, NEWS: Bump version to 2.9.3.dev. 2020-07-22 08:12:01 +02:00
Alexandre Duret-Lutz
0b6a7998af Release Spot 2.9.3
* configure.ac, NEWS, doc/org/setup.org: Set version to 2.9.3.
2020-07-22 08:09:56 +02:00
Alexandre Duret-Lutz
cc498e7080 org: run a spell checker on the documentation
* doc/org/autcross.org, doc/org/autfilt.org, doc/org/citing.org,
doc/org/compile.org, doc/org/concepts.org, doc/org/csv.org,
doc/org/dstar2tgba.org, doc/org/genaut.org, doc/org/genltl.org,
doc/org/hierarchy.org, doc/org/hoa.org, doc/org/index.org,
doc/org/install.org, doc/org/ltl2tgba.org, doc/org/ltl2tgta.org,
doc/org/ltlcross.org, doc/org/ltlfilt.org, doc/org/ltlgrind.org,
doc/org/ltlsynt.org, doc/org/oaut.org, doc/org/randaut.org,
doc/org/randltl.org, doc/org/satmin.org, doc/org/tut.org,
doc/org/tut01.org, doc/org/tut02.org, doc/org/tut03.org,
doc/org/tut04.org, doc/org/tut10.org, doc/org/tut11.org,
doc/org/tut12.org, doc/org/tut20.org, doc/org/tut21.org,
doc/org/tut22.org, doc/org/tut23.org, doc/org/tut24.org,
doc/org/tut30.org, doc/org/tut31.org, doc/org/tut50.org,
doc/org/tut51.org, doc/org/tut52.org, doc/org/tut90.org,
doc/org/upgrade2.org: Run ispell-buffer on all these.
* bin/autfilt.cc, python/spot/__init__.py: Fix typos in
help texts noticed while spell-checking the org files.
2020-07-21 22:21:58 +02:00
Alexandre Duret-Lutz
0342161b20 org: fix python execution with in-tree source and Swig4
* doc/org/.dir-locals.el.in, doc/org/init.el.in: Set the
SPOT_UNINSTALLED envvar, as we already do in the test suite.
2020-07-21 22:20:21 +02:00
Alexandre Duret-Lutz
d5f488647b ltlcross: completely fix #420
Reported by Salomon Sickert.

* bin/ltlcross.cc: Also call determinize_unknown_acceptance() for
positive automata.
* tests/core/ltlcross3.test: Add another test case.
* NEWS: Mention the fix.
2020-07-21 22:20:04 +02:00
Alexandre Duret-Lutz
f3b8bf8e56 org: run a spell checker on the documentation
* doc/org/autcross.org, doc/org/autfilt.org, doc/org/citing.org,
doc/org/compile.org, doc/org/concepts.org, doc/org/csv.org,
doc/org/dstar2tgba.org, doc/org/genaut.org, doc/org/genltl.org,
doc/org/hierarchy.org, doc/org/hoa.org, doc/org/index.org,
doc/org/install.org, doc/org/ltl2tgba.org, doc/org/ltl2tgta.org,
doc/org/ltlcross.org, doc/org/ltlfilt.org, doc/org/ltlgrind.org,
doc/org/ltlsynt.org, doc/org/oaut.org, doc/org/randaut.org,
doc/org/randltl.org, doc/org/satmin.org, doc/org/tut.org,
doc/org/tut01.org, doc/org/tut02.org, doc/org/tut03.org,
doc/org/tut04.org, doc/org/tut10.org, doc/org/tut11.org,
doc/org/tut12.org, doc/org/tut20.org, doc/org/tut21.org,
doc/org/tut22.org, doc/org/tut23.org, doc/org/tut24.org,
doc/org/tut30.org, doc/org/tut31.org, doc/org/tut50.org,
doc/org/tut51.org, doc/org/tut52.org, doc/org/tut90.org,
doc/org/upgrade2.org: Run ispell-buffer on all these.
* bin/autfilt.cc, python/spot/__init__.py: Fix typos in
help texts noticed while spell-checking the org files.
2020-07-21 22:18:03 +02:00
Alexandre Duret-Lutz
0fbc83e9c2 org: fix python execution with in-tree source and Swig4
* doc/org/.dir-locals.el.in, doc/org/init.el.in: Set the
SPOT_UNINSTALLED envvar, as we already do in the test suite.
2020-07-21 22:18:03 +02:00
Alexandre Duret-Lutz
457e130e24 ltlcross: completely fix #420
Reported by Salomon Sickert.

* bin/ltlcross.cc: Also call determinize_unknown_acceptance() for
positive automata.
* tests/core/ltlcross3.test: Add another test case.
* NEWS: Mention the fix.
2020-07-21 22:18:00 +02:00
Alexandre Duret-Lutz
1a0c8a44ba Merge branch 'master' into next 2020-07-21 08:28:13 +02:00
Alexandre Duret-Lutz
d61d6570ac * NEWS, configure.ac: Bump version to 2.9.2.dev. 2020-07-21 08:24:52 +02:00
Alexandre Duret-Lutz
66a6fbdcb1 Release Spot 2.9.2
* configure.ac, NEWS, doc/org/setup.org: Set version to 2.9.2.
2020-07-21 08:22:06 +02:00
Alexandre Duret-Lutz
ac5a261aa5 ltlcross: fix cross-checks for automata using Fin acceptance
Fixes #420 reported by Salomon Sickert.

* bin/ltlcross.cc: Call determine_unknown_acceptance().
* spot/twaalgos/sccinfo.cc, spot/twaalgos/sccinfo.hh: Document
that one_accepting_scc()==-1 can mean "don't know", and update
determine_unknown_acceptance() to set one_acc_scc_.
* tests/core/ltlcross3.test: Add test case.
* NEWS: Mention the fixes.
2020-07-20 15:47:39 +02:00
Alexandre Duret-Lutz
c7774ebb55 C++20: fix warnings reported by g++ 10.1
* spot/tl/formula.hh (formula::operator bool): Mark as noexcept.
* bin/common_trans.hh, bin/common_trans.cc: Use std::atomic instead of
volatile.
2020-07-20 15:47:39 +02:00
Alexandre Duret-Lutz
df39000d8e * doc/org/setup.org: Fix release date. 2020-07-20 14:33:04 +02:00
Alexandre Duret-Lutz
33b28c8151 ltlcross: fix cross-checks for automata using Fin acceptance
Fixes #420 reported by Salomon Sickert.

* bin/ltlcross.cc: Call determine_unknown_acceptance().
* spot/twaalgos/sccinfo.cc, spot/twaalgos/sccinfo.hh: Document
that one_accepting_scc()==-1 can mean "don't know", and update
determine_unknown_acceptance() to set one_acc_scc_.
* tests/core/ltlcross3.test: Add test case.
* NEWS: Mention the fixes.
2020-07-20 13:38:47 +02:00
Etienne Renault
4db6a342da Fixes #419
* configure.ac: Here.
2020-07-17 14:34:47 +02:00
Alexandre Duret-Lutz
9daa4e60a4 formula: make operator bool explicit
* spot/tl/formula.hh (formula::operator bool): Make it explicit.  When
compiling in C++20 mode with g++ 10.1, this bool operator was used
instead of the comparison operators while looking up a
std::pair<formula,formula> in a hash map, causing many test suite
failures.  This problem does not occur with clang++ 10.0, so it
might just be a bug in g++ 10.1.  But having explicit operator bool
is good practice anyway.
2020-07-17 11:39:55 +02:00
Alexandre Duret-Lutz
a8959ecf81 C++20: work around g++ 10.1 bug #95242
With GCC 10.1 all comparisons that default to the <=> C++20 comparison
operator emit a spurious zero-as-null-pointer-constant warning, which
is an error in our configuration.  This is due to an implementation
choice in the libstdc++ library, so it also causes warning from
clang++ 10.0 when using the same libstdc++ library.  A fix for GCC
PR95242 was committed in g++ (not in libstdc++), so while g++ 10.2
might be fixed, clang++ will need a similar fix.

I've seen those failures on Arch linux with gcc 10.1.0-2 and clang
10.0.0-3.  On Debian sid, g++ 10.1.0-4 seems to already include the
fix.

* m4/gccwarn.m4: Include a string comparison in the test code so that
-Wzero-as-null-pointer-constant is not enabled if it would produce
warnings on such statements.
2020-07-16 22:16:23 +02:00
Alexandre Duret-Lutz
368acaad28 C++20: fix warnings reported by g++ 10.1
* spot/tl/formula.hh (formula::operator bool): Mark as noexcept.
* bin/common_trans.hh, bin/common_trans.cc: Use std::atomic instead of
volatile.
2020-07-16 22:16:11 +02:00
Alexandre Duret-Lutz
a7ff5b4eed [buddy] build in C++17 mode by default
* configure.ac: Activate C++17, and replace --enable-c++17 by
--enable-c++20.
2020-07-16 12:14:47 +02:00
Alexandre Duret-Lutz
4f23097619 build in C++17 mode by default
* configure.ac: Activate C++17, and replace --enable-c++17 by
--enable-c++20.
* NEWS: Mention the news.
* .gitlab-ci.yml: Use C++20 for the former C++17 builds.
* HACKING, README, doc/org/compile.org, doc/org/concepts.org,
doc/org/index.org, doc/org/install.org, doc/org/tut.org,
doc/org/upgrade2.org, spot/misc/escape.hh: Adjust mentions
of C++14.
2020-07-16 12:12:21 +02:00
Alexandre Duret-Lutz
a770727ee8 * doc/org/setup.org: Fix release date. 2020-07-16 10:33:33 +02:00
Alexandre Duret-Lutz
1513a9d996 Merge branch 'master' into next 2020-07-15 14:06:23 +02:00
Alexandre Duret-Lutz
cf1550c352 * NEWS, configure.ac: Bump version to 2.9.1.dev. 2020-07-15 13:43:15 +02:00
Alexandre Duret-Lutz
6205664297 Release Spot 2.9.1
* configure.ac, NEWS, doc/org/setup.org: Set version to 2.9.1.
2020-07-15 13:40:59 +02:00
Alexandre Duret-Lutz
94c189b29d remfin: simplify, thanks to previous patch
* spot/twaalgos/remfin.cc: Get rid of for_each_edge since edges_of()
and inner_edges_of() are now honoring the filters.
2020-07-15 12:25:13 +02:00
Alexandre Duret-Lutz
b214fd75d6 scc_info: honor filters in edges_of() and inner_edges_of()
* spot/twaalgos/sccinfo.hh: Honor filters in edges_of() and
inner_edges_of().
* tests/core/sccif.test: Adjust expected output.
* NEWS: Mention the bug.
2020-07-15 11:31:56 +02:00
Alexandre Duret-Lutz
1fa048fe8a ltlcross: diagnose complementations requiring too many colors
Fixes #411 reported by Frantiček Blahoudek.

* bin/ltlcross.cc: Catch the issue.
* tests/core/ltlcross6.test: New file.
* tests/Makefile.am: Add it.
* NEWS: Mention it.
2020-07-14 22:39:44 +02:00
Alexandre Duret-Lutz
f2403c91dc run: fix reduce on automata with Fin
Reported by Florian Renkin.

* spot/twaalgos/emptiness.cc (reduce): If the automaton uses Fin
acceptance, check the reduced cycle and revert to the original cycle
if necessary.
* tests/python/intrun.py: New file.
* tests/Makefile.am: Add it.
* spot/twaalgos/emptiness.hh: Improve documentation.
2020-07-13 16:30:29 +02:00
Alexandre Duret-Lutz
9caba8bfe8 genem: replace one recursive call by a loop
* spot/twaalgos/genem.cc: In the spot29 implementation for the generic
case, when Fin(fo)=true and Fin(fo)=false have to be tested
separately, the second test can be done by a loop instead of a
recursion, to avoid unnecessary processing of the acceptance
condition.  Suggested by Jan Strejček.
2020-07-13 16:30:29 +02:00
Alexandre Duret-Lutz
a3769dfd81 address a new g++-10 warnings
* spot/twa/twa.hh (set_named_prop): Declare the lambda as noexcept.
* spot/twaalgos/couvreurnew.cc (acss_states): Likewise.
2020-07-13 16:30:29 +02:00
Alexandre Duret-Lutz
e20bae6609 swig: search for swig4.0
* configure.ac: Use swig4.0 when available.
* HACKING: Update.
2020-07-13 16:30:29 +02:00
Alexandre Duret-Lutz
4cfa253830 ltldo: improve error messages
Use ltldo:... instead of error:... and warning:... and also improve
the diagnostic displayed after a translation failure to mention the
tool and formula.

Incidentally, this fixes a spurious test case failure observed by
Philipp Schlehuber on CentOS7.7 where glibc 2.17 is installed.  With
this system, when posix_spawn() starts a binary that does not exist,
it returns success and let the child die with exit code 127.  On more
recent glibc, posix_spawn() manages to return execve()'s errno, as if
the child had not been created.  We handle those two different ways to
fail, but before this patch one used to print "error:..." and the
other "ltldo:...".

* bin/ltldo.cc: Display the program_name in error message.  Display
the command name and formula on translation failure.
* tests/core/ltldo.test: Adjust test case.
* NEWS: Mention the fix.
2020-07-13 16:30:29 +02:00
Alexandre Duret-Lutz
3368b4b99f * tests/sanity/80columns.test: Force LC_ALL. 2020-07-13 16:30:29 +02:00
Alexandre Duret-Lutz
f16bc8a58b sccinfo: fix doc
* spot/twaalgos/sccinfo.hh (scc_info_options::NONE): Fix doxygen doc.
2020-07-13 16:30:29 +02:00
Alexandre Duret-Lutz
9e075e7312 twa: get rid of set_num_sets_()
* spot/twa/twa.hh (set_num_sets_): Remove, and adjust all uses.
This fixes #414.
2020-07-13 16:30:29 +02:00
Alexandre Duret-Lutz
37d0b0d045 ltlsynt: use wdba-minimize=2 and ba-simul=0
* bin/ltlsynt.cc: Here.
* tests/core/ltlsynt.test: Add extra test case.
* NEWS: Mention ltlsynt -x and related defaults.
2020-07-13 16:30:29 +02:00
Florian Renkin
56c8d690ba ltlsynt: Change default options
* bin/ltlsynt.cc: Change default options.
* tests/core/ltlsynt.test: Add test.
2020-07-13 16:30:29 +02:00
Florian Renkin
8ac24acbf8 ltlsynt: Add more elements in csv
* bin/ltlsynt.cc: Add the number of states of the dpa
and of the parity game in the csv.
2020-07-13 16:30:29 +02:00
Florian Renkin
7c09f64c49 ltlsynt: Add -x option for translation
* bin/ltlsynt.cc: ltlsynt can use extra options for translator.
2020-07-13 16:30:29 +02:00
Alexandre Duret-Lutz
e06f8a3ece work around diagnostic changes in Bison 3.6
Bison <3.6 used to complain about "$undefined", while Bison >=3.6 now
write "invalid token".

* tests/core/parseaut.test, tests/core/parseerr.test,
tests/core/sugar.test: Adjust expected diagnostics to match Bison pre
and post 3.6.
2020-07-13 16:30:29 +02:00
Alexandre Duret-Lutz
16540869d4 ltlsynt: add --algo=ps
* bin/ltlsynt.cc: Implement this.
* tests/core/ltlsynt.test: Add a test case.
* NEWS: Mention it.
2020-07-13 16:30:29 +02:00
Alexandre Duret-Lutz
b434ac7f8a simplify_acc: perform unit-propagation earlier
Closes #405.   This shows no difference on the test suite,
but that is thanks to the previous patch: without it, an
example in automata.ipynb would have an extra edge.

* spot/twaalgos/cleanacc.cc (simplify_acceptance): Call
unit_propagation() before simplify_complementary_marks_here() and
fuse_marks_here(), because that is simpler to perform.
2020-07-13 16:30:29 +02:00
Alexandre Duret-Lutz
b762f54228 remfin: do not clone transitions that are accepting in main
* spot/twaalgos/remfin.cc (default_strategy): Detect transitions
from the main copy that are completely accepting and that do not
need to be repeated in the clones.
* tests/python/remfin.py: Add a test case.
* tests/core/ltl2dstar4.test: Improve expected results.
* NEWS: Mention the change.
2020-07-13 16:30:29 +02:00
Alexandre Duret-Lutz
c005041e53 improve fuse_marks_here by detecting more patterns
This remove some restrictions that prevented fuse_marks_here from
simplifying certain patterns, as noted in the first comment of
issue #405.

* spot/twaalgos/cleanacc.cc (find_interm_rec, find_fusable): Remove
some unnecessary restrictions to singleton marks, and replace the hack
put one non-singleton mark at the beginning of the singleton list by a
sort.
* tests/python/simplacc.py: Add two test cases.
* tests/python/automata.ipynb, tests/core/remfin.test: Improve
expected results.
* NEWS: Mention the bug.
2020-07-13 16:30:29 +02:00
Alexandre Duret-Lutz
ce695e67f9 fixpool: allocate a new chunk on creation
Allocate the first chunk when the fixpool is created.  This avoid a
undefined behavior reported in issue #413 without requiring an extra
comparison in allocate().

* spot/misc/fixpool.hh, spot/misc/fixpool.cc (new_chunk_): New method
extracted from allocate().  Use it in the constructor as well.
* NEWS: Mention the bug.
2020-07-13 16:30:29 +02:00
Alexandre Duret-Lutz
64aee87d76 postproc: option to wdba-minimize only when sure
Fixes #15.

* spot/twaalgos/minimize.hh, spot/twaalgos/minimize.cc
(minimize_obligation_garanteed_to_work): New function.
* spot/twaalgos/postproc.hh, spot/twaalgos/postproc.cc: Use it if
wdba-minimize=1.  Handle new default for wdba-minimize.
* NEWS, bin/spot-x.cc: Document those changes.
* tests/core/ltl2tgba2.test: Add some test cases.
* tests/core/genltl.test: Improve expected results.
2020-07-13 16:30:29 +02:00
Alexandre Duret-Lutz
8744751ec0 * doc/org/satmin.org: Remove extra newlines (fixes #410). 2020-07-13 16:30:29 +02:00