Commit graph

5767 commits

Author SHA1 Message Date
Etienne Renault
f04074bd6d sanity: replace tabulars by spaces
* spot/ltsmin/ltsmin.cc,
spot/mc/ec.hh, spot/mc/intersect.hh,
spot/mc/reachability.hh, spot/mc/unionfind.cc,
spot/mc/utils.hh, spot/twacube/cube.cc,
spot/twacube/twacube.cc,
spot/twacube/twacube.hh,
spot/twacube_algos/convert.cc,
spot/twacube_algos/convert.hh,
tests/core/bricks.cc,
tests/core/cube.cc,
tests/core/twacube.cc,
tests/ltsmin/modelcheck.cc: here.
2020-06-03 10:33:53 +02:00
Etienne Renault
681c2b2011 ltsmin: use FastConcurrent map
* spot/ltsmin/ltsmin.cc: here.
2020-06-03 10:33:53 +02:00
Etienne Renault
01f66642f1 bricks: fix clang warnings
* bricks/brick-hash.h, bricks/brick-shmem.h: here.
2020-06-03 10:33:53 +02:00
Etienne Renault
458f506336 bricks: add bricks for concurrent hashmap
* Makefile.am, README, bricks/brick-assert.h,
bricks/brick-bitlevel.h, bricks/brick-hash.h,
bricks/brick-hashset.h, bricks/brick-shmem.h,
bricks/brick-types.h, configure.ac,
debian/copyright, debian/libspot-dev.install,
m4/bricks.m4, tests/Makefile.am,
tests/core/.gitignore, tests/core/bricks.cc: here.
2020-06-03 10:33:53 +02:00
Etienne Renault
4337abc5a6 modelcheck: rewrite and use argp
* tests/Makefile.am, tests/ltsmin/check.test,
tests/ltsmin/finite.test, tests/ltsmin/finite2.test,
tests/ltsmin/kripke.test, tests/ltsmin/modelcheck.cc: here.
2020-06-03 10:33:53 +02:00
Etienne Renault
b4bbf50794 ltsmin: prodcuce kripkecube
Warning! this patch introduces redundancy (or difference)
between wether you ask for a kripkecube or a kripke.

* spot/ltsmin/ltsmin.cc, spot/ltsmin/ltsmin.hh: here.
2020-06-03 10:33:53 +02:00
Etienne Renault
8e593611f6 convert: kripke and product towards twa
* spot/mc/Makefile.am, spot/mc/utils.hh: here.
2020-06-03 10:33:53 +02:00
Etienne Renault
3bafe693ef ec: Renault et al LPAR'13 emptiness check
In order to reuse the computation of the
intersection between kripke and twa efficiently,
we use template inheritance through the
"mixin templates" technique.

* spot/Makefile.am, spot/mc/Makefile.am,
spot/mc/ec.hh, spot/mc/unionfind.cc,
spot/mc/unionfind.hh: here.
2020-06-03 10:33:53 +02:00
Etienne Renault
87de88c80c intersection: for kripke and twacube
* spot/mc/Makefile.am, spot/mc/intersect.hh: here.
2020-06-03 10:33:53 +02:00
Etienne Renault
94492ffa14 reachability: sequential reachability for kripkecube
* README, configure.ac, spot/mc/Makefile.am,
spot/mc/reachability.hh: here.
2020-06-03 10:33:53 +02:00
Etienne Renault
748068a6d0 kripke: define kripkecube structure
* spot/kripke/kripke.hh: here.
2020-06-03 10:33:53 +02:00
Etienne Renault
b87693bcc3 convert: twacube to twa translation
* spot/twacube_algos/convert.cc, spot/twacube_algos/convert.hh,
tests/core/twacube.cc, tests/core/twacube.test: here.
2020-06-03 10:33:53 +02:00
Etienne Renault
aceb37ab50 convert: twa to twacube translation
* spot/twacube/Makefile.am, spot/twacube/twacube.cc,
spot/twacube/twacube.hh, spot/twacube_algos/convert.cc,
spot/twacube_algos/convert.hh, tests/Makefile.am,
tests/core/.gitignore, tests/core/twacube.cc,
tests/core/twacube.test: here.
2020-06-03 10:33:53 +02:00
Etienne Renault
8d57700d6a convert: BDD to cube conversions
* README, configure.ac, spot/Makefile.am,
spot/twacube_algos/Makefile.am, spot/twacube_algos/convert.cc
spot/twacube_algos/convert.hh, tests/core/cube.cc,
tests/core/cube.test: here.
2020-06-03 10:33:53 +02:00
Etienne Renault
7c3fdd6b97 Introduce cube data structure
* README, configure.ac, spot/Makefile.am,
spot/twacube/Makefile.am, spot/twacube/cube.cc,
spot/twacube/cube.hh, tests/Makefile.am,
tests/core/.gitignore, tests/core/cube.cc,
tests/core/cube.test: here.
2020-06-03 10:33:53 +02:00
Alexandre Duret-Lutz
b7abe6f4b4 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-06-01 11:00:25 +02:00
Alexandre Duret-Lutz
8e9e706003 * tests/sanity/80columns.test: Force LC_ALL. 2020-05-30 14:29:20 +02:00
Alexandre Duret-Lutz
d76236a03f sccinfo: fix doc
* spot/twaalgos/sccinfo.hh (scc_info_options::NONE): Fix doxygen doc.
2020-05-29 17:14:17 +02:00
Alexandre Duret-Lutz
9150a2e54b twa: get rid of set_num_sets_()
* spot/twa/twa.hh (set_num_sets_): Remove, and adjust all uses.
This fixes #414.
2020-05-25 10:51:44 +02:00
Alexandre Duret-Lutz
f6cf8e4d8a 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-05-24 22:16:48 +02:00
Florian Renkin
0413ecfbb8 ltlsynt: Change default options
* bin/ltlsynt.cc: Change default options.
* tests/core/ltlsynt.test: Add test.
2020-05-24 20:16:43 +02:00
Florian Renkin
494471a50b 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-05-24 19:57:30 +02:00
Florian Renkin
3fd5f38248 ltlsynt: Add -x option for translation
* bin/ltlsynt.cc: ltlsynt can use extra options for translator.
2020-05-24 19:57:30 +02:00
Alexandre Duret-Lutz
1752b18f14 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-05-24 16:35:07 +02:00
Alexandre Duret-Lutz
a395309f4b ltlsynt: add --algo=ps
* bin/ltlsynt.cc: Implement this.
* tests/core/ltlsynt.test: Add a test case.
* NEWS: Mention it.
2020-05-24 09:52:38 +02:00
Alexandre Duret-Lutz
49188715cd 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-05-23 12:00:56 +02:00
Alexandre Duret-Lutz
6074202b9b 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-05-23 11:56:16 +02:00
Alexandre Duret-Lutz
260a141b1c 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-05-22 20:53:57 +02:00
Alexandre Duret-Lutz
645935f796 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-05-22 20:53:48 +02:00
Alexandre Duret-Lutz
a0767e3c1e 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-05-21 23:48:21 +02:00
Alexandre Duret-Lutz
579ff63817 * doc/org/satmin.org: Remove extra newlines (fixes #410). 2020-05-18 20:49:47 +02:00
Alexandre Duret-Lutz
208d0f7885 stats: speed up the computation of transitions
Juraj Major reported a case with 32 APs where ltlcross would take
forever to gather statistics.  It turns out that for each edge,
twa_sub_statistics was enumerating all compatible assignments of 32
APs.  This uses bdd_satcountset() instead, and also store the result
in a long long to avoid overflows.

* spot/twaalgos/stats.cc (twa_sub_statistics): Improve the code for
counting transitions.
* bin/common_aoutput.hh, bin/ltlcross.cc, spot/twaalgos/stats.hh:
Store transition counts are long long.
* tests/core/readsave.test: Add test case.
* NEWS: Mention the bug.
2020-05-18 20:49:47 +02:00
Alexandre Duret-Lutz
da96a509e9 [buddy] avoid cache errors in bdd_satcount() and friends
* src/bddop.c (bdd_satcount, bdd_satcountln): If the number of
declared variables changed since we last used it, reset misccache.
Otherwise, bdd_satcount() and friends might return incorrect results
after the number of variable is changed.  These is needed for the next
patch in Spot to pass all tests.
(misccache_varnum): New global variable to track that.
(bdd_satcountset): Make sure that bdd_satcountset(bddtrue, bddtrue)
return 1.0 and not 0.0.
2020-05-18 20:49:14 +02:00
Alexandre Duret-Lutz
66aa6d0883 ltlsynt: make sure the previous Xor optimization actually works
* spot/tl/simplify.hh, spot/tl/simplify.cc,
spot/twaalgos/translate.cc: Update the tl_simplification
options after all preferences have been given.
* bin/ltlsynt.cc: Display the size of the translation output.
* tests/core/ltlsynt.test: Add test case.
2020-05-16 19:22:28 +02:00
Alexandre Duret-Lutz
6bfa9793d6 translate: improve handling of Xor and Equiv at top-level for -G -D
* spot/tl/formula.hh: Add variant of formula::is that support 4
arguments.
* spot/tl/simplify.hh, spot/tl/simplify.cc: Add option keep_top_xor
to preserve Xor and Equiv at the top-level.
* spot/twaalgos/translate.cc: Adjust ltl-split to deal with Xor and
Equiv for the -D -G case.
* NEWS: Mention that.
* tests/core/ltl2tgba2.test: Add test case.
* tests/python/simstate.py: Adjust expected result.
2020-05-16 18:19:26 +02:00
Alexandre Duret-Lutz
3ab2dd17a7 product: add product_xor() and product_xnor()
* spot/twaalgos/product.cc, spot/twaalgos/product.hh: Add those
functions.
* tests/python/_product_weak.ipynb, tests/python/except.py: Test them.
* NEWS: Mention them.
2020-05-16 17:55:36 +02:00
Alexandre Duret-Lutz
a78137f9d4 * NEWS, configure.ac: Bump version to 2.9.0.dev. 2020-04-30 09:03:48 +02:00
Alexandre Duret-Lutz
eeb5713a30 release Spot 2.9
* configure.ac, doc/org/setup.org, NEWS: Set version to 2.9.
2020-04-30 09:00:35 +02:00
Alexandre Duret-Lutz
ce2529b27b * doc/org/oaut.org: Refresh some examples; remove unecessary output. 2020-04-30 08:44:23 +02:00
Alexandre Duret-Lutz
118df55bc3 [buddy] workaround newer clang warning
It seems clang now warn about fallthrough case statements in C, but
ignore any /* fall through */ comment if that comes from a macro.

* src/bddop.c: Use the fallthrough attribute if available.
2020-04-30 08:14:50 +02:00
Alexandre Duret-Lutz
82d69241f1 ltlsynt: add a --csv=FILENAME option
* bin/ltlsynt.cc: Add a --csv option to record the
duration of the various phases.
* tests/core/ltlsynt.test: Test the new option.
* NEWS: Mention it.
2020-04-30 08:14:50 +02:00
Alexandre Duret-Lutz
a7051b32c8 dot: fix #393
* spot/twaalgos/dot.cc: Add support for option 'E', and default to
rectangle nodes for large labels.
* bin/common_aoutput.cc, NEWS: Document it.
* tests/core/alternating.test, tests/core/dstar.test,
tests/core/readsave.test, tests/core/sccdot.test,
tests/core/tgbagraph.test, tests/python/_product_weak.ipynb,
tests/python/alternation.ipynb, tests/python/atva16-fig2b.ipynb,
tests/python/automata.ipynb, tests/python/decompose.ipynb,
tests/python/gen.ipynb, tests/python/highlighting.ipynb,
tests/python/ltsmin-dve.ipynb, tests/python/ltsmin-pml.ipynb,
tests/python/parity.ipynb, tests/python/pdegen.py,
tests/python/satmin.ipynb, tests/python/stutter-inv.ipynb: Adjust all
test cases.
2020-04-29 21:14:36 +02:00
Alexandre Duret-Lutz
3ea63e9a75 dot: fix #392
* spot/twaalgos/dot.cc: Add tooltips to "..." states and edges.
* tests/core/readsave.test: Test this.
* tests/python/highlighting.ipynb: Adjust.
2020-04-29 12:28:17 +02:00
Alexandre Duret-Lutz
6706042019 postproc: fix issue #402
* spot/twaalgos/postproc.cc, spot/twaalgos/postproc.hh,
spot/twaalgos/translate.cc: Introduce a gen-reduce-parity option and
use it on sub-automata built by ltl-split.
* bin/spot-x.cc: Document it.
* tests/core/ltl2tgba2.test: Add test case reported by Juraj Major.
2020-04-25 20:08:45 +02:00
Alexandre Duret-Lutz
fe340ae8db ltlsynt: fix lar.old implementation
* bin/ltlsynt.cc: Make sure to_parity_old() receive a deterministic
automaton, for correctness.   Also call reduce_parity() afterward,
to match what was done in 2.8.7.
* tests/core/ltlsynt.test: Include lar.old in the comparison of all
results to make sure it give the same result as the other 3
algorithms.
2020-04-25 16:29:03 +02:00
Alexandre Duret-Lutz
a6da6ed95a ltlsynt: add option to call to_parity_old
* bin/ltlsynt.cc: Add support for --algo=lar.old
* NEWS: Mention it.
2020-04-20 14:48:23 +02:00
Alexandre Duret-Lutz
192ca91087 * .gitlab-ci.yml (raspbian): Add /wip/ exception. 2020-04-19 14:35:51 +02:00
Alexandre Duret-Lutz
cc12d514be avoid mark_t::count() when possible
count() may be implemented using a loop, so using it touch
check count() == 1 or count() > 1 is not advisable.

* spot/twa/acc.hh (mark_t::is_singleton, mark_t::has_many): Introduce
these two methods to replace count()==1 and count()>1
* spot/twa/acc.cc, spot/twaalgos/cleanacc.cc,
spot/twaalgos/determinize.cc, spot/twaalgos/dtwasat.cc,
spot/twaalgos/iscolored.cc, spot/twaalgos/remfin.cc,
spot/twaalgos/toparity.cc: Adjust usage.
2020-04-19 09:11:16 +02:00
Alexandre Duret-Lutz
c0e1b3e52a cleanacc: keep acceptance order when removing complementary colors
* spot/twaalgos/cleanacc.cc (remove_compl_rec): Rewrite to preserve
the original order of the acceptance condition while rewriting it.
* tests/core/sccdot.test, tests/python/merge.py,
tests/python/simplacc.py, tests/python/toparity.py: Adjust test cases.
2020-04-18 23:02:11 +02:00
Florian Renkin
262b24e6d7 unit_propagation: Correct result when multiple colors are possible
* spot/twa/acc.cc: Here.
* tests/core/acc.cc, tests/core/acc.test, tests/core/remfin.test:
Update tests.
2020-04-18 22:11:21 +02:00