Commit graph

5478 commits

Author SHA1 Message Date
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
Florian Renkin
100fe3f00c to_parity: Correct the colors when we have parity pref. + true_clean
* spot/twaalgos/toparity.cc: Don't use the same color for every edges
when the condition is "true" or "false" after parity prefix.
2020-04-18 20:07:29 +02:00
Alexandre Duret-Lutz
ed5cccba8a python: fix to_parity default option handling
* python/spot/__init__.py (to_options): Do not have options
explicitely default to to_parity_options(), because that would be
instantiated only once.
2020-04-18 07:38:18 +02:00
Alexandre Duret-Lutz
fd0d752bc3 to_parity: only call reduce_parity() when prefix_parity is enabled
Calling reduce_parity() in to_parity() is confusing, because then
running to_parity() on one SCC does not necessarily produce the same
output as running to_parity() on the entire automaton.  However it is
necessary for the implementation of parity_prefix.  As a compromise,
disable reduce_parity() when parity_prefix is disabled, this way we
can use that to demonstrate how the algorithm works.

* spot/twaalgos/toparity.hh, spot/twaalgos/toparity.cc: Do not
call reduce_parity() when parity_prefix is disabled.
* tests/python/toparity.py: Adjust.
2020-04-17 22:04:32 +02:00
Alexandre Duret-Lutz
102ef04364 simplify_acc: loop over the simplifications
* spot/twaalgos/cleanacc.cc (simplify_acceptance_here): Run the
simplifications in a loop until the condition does not change anymore.
* tests/python/simplacc.py, tests/core/accsimpl.test,
tests/core/remfin.test, tests/python/merge.py,
tests/python/simplacc.py, tests/python/toparity.py: Update expected
results.
* tests/python/automata.ipynb: Update the failing example to a more
interesting one, matching the one in doc/org/autfilt.org.
2020-04-17 21:54:12 +02:00
Alexandre Duret-Lutz
b62e1bb13c simplify_acc: fix an infinite loop
* spot/twaalgos/cleanacc.cc (fuse_mark_here): Fix incorrect cancelling
of n-ary subterms, causing an invalid acceptance condition, and then
an infinite loop.
* tests/python/simplacc.py: Add test case.
2020-04-17 21:42:53 +02:00
Florian Renkin
68012e6a85 to_parity: Correct the expected number of states
* tests/python/toparity.py: here.
2020-04-17 16:47:02 +02:00
Florian Renkin
685d6d8ba0 to_parity: Add an option to force degeneralization
* spot/twaalgos/toparity.cc, spot/twaalgos/toparity.hh:
Don't try to run the algorithm without degeneralization
with the option force_degen.
2020-04-17 15:00:05 +02:00
Florian Renkin
527b62c5ff to_parity: Remove merge_states
* spot/twaalgos/toparity.cc: Remove merge_states.
* tests/python/automata.ipynb, tests/python/toparity.py: Update tests.
2020-04-17 14:59:42 +02:00
Florian Renkin
142f1afab2 unit_propagation: Add a test with multiple unit clauses
* tests/core/acc.cc, tests/core/acc.test: here.
2020-04-17 13:38:46 +02:00
Florian Renkin
927ea7046b unit_propagation: Correct a problem with multiple marks
* spot/twa/acc.cc: Don't create a conjunction of Inf with multiple marks
in unit_propagation.
2020-04-16 22:10:40 +02:00
Florian Renkin
8c48003943 to_parity: Use merge_states
* spot/twaalgos/toparity.cc: Use merge_states at the end
of to_parity.
* tests/python/toparity.py: Update tests.
2020-04-16 22:10:40 +02:00
Alexandre Duret-Lutz
875846f51f toparity: false transitions are not a problem anymore
* spot/twaalgos/toparity.cc: Do not remove false transitions.
* tests/python/toparity.py: Add a test case with false transitions.
2020-04-16 21:12:30 +02:00
Alexandre Duret-Lutz
1e86463205 update gnulib to 47bf2cf3184027c1eb9c1dfeea5c5b8b2d69710d
* lib/dosname.h, lib/glthread/lock.c, lib/glthread/lock.h,
lib/glthread/threadlib.c, lib/windows-mutex.c, lib/windows-mutex.h,
lib/windows-once.c, lib/windows-once.h, lib/windows-recmutex.c,
lib/windows-recmutex.h, lib/windows-rwlock.c, lib/windows-rwlock.h,
m4/host-cpu-c-abi.m4, m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4,
m4/lock.m4, m4/longlong.m4, m4/pthread_rwlock_rdlock.m4,
tools/config.rpath: Delete.
* lib/alloca.in.h, lib/argmatch.c, lib/argmatch.h, lib/arg-nonnull.h,
lib/argp-ba.c, lib/argp-eexst.c, lib/argp-fmtstream.c,
lib/argp-fmtstream.h, lib/argp-fs-xinl.c, lib/argp.h, lib/argp-help.c,
lib/argp-namefrob.h, lib/argp-parse.c, lib/argp-pin.c, lib/argp-pv.c,
lib/argp-pvh.c, lib/argp-xinl.c, lib/asnprintf.c, lib/basename-lgpl.c,
lib/c-ctype.h, lib/c++defs.h, lib/cdefs.h, lib/closeout.c,
lib/closeout.h, lib/close-stream.c, lib/c-strcasecmp.c,
lib/c-strcaseeq.h, lib/c-strcase.h, lib/c-strncasecmp.c,
lib/dirname.h, lib/dirname-lgpl.c, lib/errno.in.h, lib/error.c,
lib/error.h, lib/exitfail.c, lib/exitfail.h, lib/fcntl.in.h,
lib/filename.h, lib/float.c, lib/float+.h, lib/float.in.h,
lib/fpending.c, lib/fpending.h, lib/getopt1.c, lib/getopt.c,
lib/getopt-cdefs.in.h, lib/getopt-core.h, lib/getopt-ext.h,
lib/getopt.in.h, lib/getopt_int.h, lib/getopt-pfx-core.h,
lib/getopt-pfx-ext.h, lib/getprogname.c, lib/getprogname.h,
lib/gettext.h, lib/gettimeofday.c, lib/hard-locale.c,
lib/hard-locale.h, lib/intprops.h, lib/isatty.c, lib/itold.c,
lib/libc-config.h, lib/limits.in.h, lib/localcharset.c,
lib/localcharset.h, lib/localtime-buffer.c, lib/localtime-buffer.h,
lib/lstat.c, lib/Makefile.am, lib/malloca.c, lib/malloca.h,
lib/malloc.c, lib/mbrtowc.c, lib/mbsinit.c, lib/memchr.c,
lib/memchr.valgrind, lib/mempcpy.c, lib/minmax.h, lib/mkdir.c,
lib/mkstemp.c, lib/mkstemps.c, lib/msvc-inval.c, lib/msvc-inval.h,
lib/msvc-nothrow.c, lib/msvc-nothrow.h, lib/_Noreturn.h,
lib/pathmax.h, lib/printf-args.c, lib/printf-args.h,
lib/printf-parse.c, lib/printf-parse.h, lib/progname.c,
lib/progname.h, lib/quotearg.c, lib/quotearg.h, lib/quote.h,
lib/rawmemchr.c, lib/rawmemchr.valgrind, lib/secure_getenv.c,
lib/size_max.h, lib/sleep.c, lib/stat.c, lib/stat-time.h,
lib/stat-w32.c, lib/stat-w32.h, lib/stdalign.in.h, lib/stdbool.in.h,
lib/stddef.in.h, lib/stdint.in.h, lib/stdio-impl.h, lib/stdio.in.h,
lib/stdlib.in.h, lib/stpcpy.c, lib/strcasecmp.c, lib/strchrnul.c,
lib/strchrnul.valgrind, lib/streq.h, lib/strerror.c,
lib/strerror-override.c, lib/strerror-override.h, lib/string.in.h,
lib/strings.in.h, lib/stripslash.c, lib/strncasecmp.c, lib/strndup.c,
lib/strnlen.c, lib/strverscmp.c, lib/sysexits.in.h, lib/sys_stat.in.h,
lib/sys_time.in.h, lib/sys_types.in.h, lib/sys_wait.in.h,
lib/tempname.c, lib/tempname.h, lib/time.in.h, lib/unistd.in.h,
lib/vasnprintf.c, lib/vasnprintf.h, lib/verify.h, lib/vsnprintf.c,
lib/warn-on-use.h, lib/wchar.in.h, lib/wctype.in.h,
lib/windows-initguard.h, lib/xalloc-die.c, lib/xalloc.h,
lib/xalloc-oversized.h, lib/xmalloc.c, lib/xsize.h, m4/00gnulib.m4,
m4/absolute-header.m4, m4/alloca.m4, m4/argp.m4, m4/codeset.m4,
m4/dirname.m4, m4/double-slash-root.m4, m4/eealloc.m4, m4/errno_h.m4,
m4/error.m4, m4/exponentd.m4, m4/extensions.m4, m4/extern-inline.m4,
m4/fcntl_h.m4, m4/fcntl-o.m4, m4/float_h.m4, m4/fpending.m4,
m4/getopt.m4, m4/getprogname.m4, m4/gettimeofday.m4,
m4/gnulib-cache.m4, m4/gnulib-common.m4, m4/gnulib-comp.m4,
m4/gnulib-tool.m4, m4/include_next.m4, m4/__inline.m4, m4/intmax_t.m4,
m4/inttypes_h.m4, m4/isatty.m4, m4/largefile.m4, m4/limits-h.m4,
m4/localcharset.m4, m4/locale-fr.m4, m4/locale-ja.m4, m4/locale-zh.m4,
m4/localtime-buffer.m4, m4/lstat.m4, m4/malloca.m4, m4/malloc.m4,
m4/math_h.m4, m4/mbrtowc.m4, m4/mbsinit.m4, m4/mbstate_t.m4,
m4/memchr.m4, m4/mempcpy.m4, m4/minmax.m4, m4/mkdir.m4, m4/mkstemp.m4,
m4/mkstemps.m4, m4/mmap-anon.m4, m4/msvc-inval.m4, m4/msvc-nothrow.m4,
m4/multiarch.m4, m4/nocrash.m4, m4/off_t.m4, m4/pathmax.m4,
m4/printf.m4, m4/quotearg.m4, m4/quote.m4, m4/rawmemchr.m4,
m4/secure_getenv.m4, m4/size_max.m4, m4/sleep.m4, m4/ssize_t.m4,
m4/stat.m4, m4/stat-time.m4, m4/stdalign.m4, m4/stdbool.m4,
m4/stddef_h.m4, m4/std-gnu11.m4, m4/stdint_h.m4, m4/stdint.m4,
m4/stdio_h.m4, m4/stdlib_h.m4, m4/stpcpy.m4, m4/strcase.m4,
m4/strchrnul.m4, m4/strerror.m4, m4/string_h.m4, m4/strings_h.m4,
m4/strndup.m4, m4/strnlen.m4, m4/strverscmp.m4, m4/sysexits.m4,
m4/sys_socket_h.m4, m4/sys_stat_h.m4, m4/sys_time_h.m4,
m4/sys_types_h.m4, m4/sys_wait_h.m4, m4/tempname.m4, m4/threadlib.m4,
m4/time_h.m4, m4/unistd_h.m4, m4/vasnprintf.m4, m4/vsnprintf.m4,
m4/warn-on-use.m4, m4/wchar_h.m4, m4/wchar_t.m4, m4/wctype_h.m4,
m4/wint_t.m4, m4/xalloc.m4, m4/xsize.m4: Update.
* lib/inttypes.in.h, lib/lc-charset-dispatch.c,
lib/lc-charset-dispatch.h, lib/locale.in.h, lib/mbrtowc-impl.h,
lib/mbrtowc-impl-utf8.h, lib/mbtowc-lock.c, lib/mbtowc-lock.h,
lib/setlocale-lock.c, lib/setlocale_null.c, lib/setlocale_null.h,
m4/inttypes.m4, m4/locale_h.m4, m4/setlocale_null.m4,
m4/visibility.m4, m4/zzgnulib.m4: New files.
2020-04-16 21:12:30 +02:00
Alexandre Duret-Lutz
fe642bc9ad acc: make sure unit_propagate preserve the number of sets
* spot/twa/acc.hh: Here.
* tests/core/accsimpl.test, tests/core/ltl2tgba2.test: Add test cases.
2020-04-16 08:37:59 +02:00
Alexandre Duret-Lutz
d8506ded52 work around Doxygen limitation
* spot/twa/twa.hh: Undocument the deprecated version of
intersecting_run() to avoid an issue with Doxygen.  Reported by Juraj
Major.
2020-04-16 08:37:59 +02:00
Alexandre Duret-Lutz
8cea82f5c6 autcross: typo in --help
* bin/autcross.cc: Fix typo in description of --save-bogus.
Reported by Juraj Major.
2020-04-16 08:37:59 +02:00
Alexandre Duret-Lutz
52fbb09e55 org: more examples for autfilt
* doc/org/autfilt.org: Add examples for --simplify-acc and --parity.
2020-04-16 08:37:59 +02:00
Alexandre Duret-Lutz
801d629a20 * spot/twaalgos/postproc.cc: Improve to_parity() call. 2020-04-16 08:37:59 +02:00
Florian Renkin
d7ab8dbe13 to_parity: Correct error with automata without transition
* spot/twaalgos/toparity.cc: Check that an automaton is not
just a useless SCC.
2020-04-16 08:37:59 +02:00
Florian Renkin
d784094ab9 unit_propagation: Correct a segfault when we have true in the condition
* spot/twa/acc.cc: Check if we have a "true" condition
in unit_propagation.
2020-04-16 08:37:59 +02:00
Florian Renkin
ee3e09f8c9 to_parity: Correct order function
* spot/twaalgos/toparity.cc: Use a strict
comparison in group_to_vector.
* spot/twa/acc.cc: Use a strict comparison
in is_parity_max_equiv.
2020-04-16 08:37:59 +02:00
Alexandre Duret-Lutz
533640fa74 Fix glibcxxdebug build not using --enable-glibcxx-debug
* .gitlab-ci.yml (arch-gcc-glibcxxdebug): Pass configure flags to
distcheck.
2020-04-14 23:34:01 +02:00
Alexandre Duret-Lutz
306eca8ce1 fix invalid iterator handling, reported by -D_GLIBCXX_DEBUG
* spot/tl/unabbrev.cc, spot/twa/twagraph.cc,
spot/twaalgos/complement.cc: Here.  All of these caused
test suite failure with -D_GLIBCXX_DEBUG.
2020-04-14 23:24:13 +02:00
Florian Renkin
4d2922eafa to_parity: Improve change_transitions_destination and add doc
* spot/twaalgos/toparity.cc: Cancel a change of 0ba10976 and
add documentation to some functions.
2020-04-14 13:09:18 +02:00
Florian Renkin
0ba1097636 to_parity: Improve to_parity and update tests
* spot/twaalgos/toparity.cc: Use a better search of the
transitions when we search compatible states.
* spot/twaalgos/toparity.hh: Use less that 80 columns.
* tests/python/merge.py, tests/python/toparity.py: Update tests.
2020-04-12 19:44:58 +02:00
Florian Renkin
b4db34995f Move several functions from acc.hh to acc.h
* spot/twa/acc.hh: Remove colors_inf_conj and colors_fin_disj
(unused) and moved get_alone_mark (now find_unit_clause),
propagate_fin_inf (now unit_propagation) and has_parity_prefix
to acc.cc.
* spot/twa/acc.cc: Use a new implementation of unit_propagation
and find_unit_clause.
* spot/twaalgos/cleanacc.cc: Use the new name of
propagate_fin_inf.
2020-04-12 18:31:51 +02:00
Florian Renkin
630b8333fe Impove simplify_acceptance
* spot/twaalgos/cleanacc.cc: Use cleanup_acceptance if
propagate_fin_inf was useful.
* spot/twa/acc.hh: Avoid to reverse the order of the condition in
propagate_fin_inf.
* tests/core/accsimpl.test, tests/core/remfin.test,
tests/python/merge.py, tests/python/automata.ipynb: Update tests.
* tests/python/toparity.py: Update tests and add tests to check the
number of states.
2020-04-12 18:31:28 +02:00
Florian Renkin
a020607664 Correct an issue in toparity with parity prefix
* spot/twaalgos/toparity.cc: Use a lower value in the parity
prefix vector to avoid the creation of unwanted {0} marks.
2020-04-12 14:50:27 +02:00
Florian Renkin
13ede90210 * spot/twaalgos/toparity.hh: Add documentation for toparity options. 2020-04-12 14:50:27 +02:00
Florian Renkin
37897e89e8 Remove redundant Fin and Inf with simplify_acceptance
* spot/twa/acc.hh: Add simplification like
Fin(0)|(Inf(0) & Fin(1)) to Fin(0)|Fin(1).
* spot/twaalgos/cleanacc.cc: Use this simplification.
2020-04-12 14:34:55 +02:00
Florian Renkin
502778f83f toparity: Search a compatible state at the end of the algo
* spot/twaalgos/toparity.cc: Search existing state at
the end of the algorihm.
* spot/twaalgos/toparity.hh: Update documentation.
2020-04-12 14:34:55 +02:00
Alexandre Duret-Lutz
a1a5334d5e relabel_bse: improve handling of n-ary operators
* spot/tl/relabel.cc: Here.
* tests/core/ltlrel.test: Add test cases, and update existing ones.
* NEWS: Mention it.
2020-04-12 11:55:53 +02:00
Alexandre Duret-Lutz
33289f5166 relabel_bse: fix incorrect detection of common APs
Based on a report by Jean Kreber.

* spot/tl/relabel.cc (cut_points): Really connect children of Boolean
operators using undirected edges, not directed ones.
* tests/core/ltlrel.test: Add test cases.
* NEWS: Mention the bug.
2020-04-11 23:50:07 +02:00
Alexandre Duret-Lutz
0b25820211 ignore false edges in emptiness checks and scc_info
Based on reports by Florian Renkin and Jens Kreber.

* spot/twaalgos/bfssteps.cc, spot/twaalgos/couvreurnew.cc,
spot/twaalgos/gtec/gtec.cc, spot/twaalgos/gv04.cc,
spot/twaalgos/magic.cc, spot/twaalgos/sccinfo.cc
spot/twaalgos/se05.cc, spot/twaalgos/tau03.cc: Ignore bddfalse edges.
* spot/twaalgos/gtec/gtec.hh: Remove debugging function.
* tests/core/neverclaimread.test: Adjust.
* tests/python/ecfalse.py: New test file.
* tests/Makefile.am: Add it.
* NEWS: Mention the bug.
2020-04-11 11:24:55 +02: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
a434778fba remove is_alternating() methods
Those were deprecated more than 3 years ago.

* spot/graph/graph.hh, spot/twa/twagraph.hh: Here.
* NEWS: Mention the change.
2020-04-05 14:12:45 +02:00
Alexandre Duret-Lutz
682ec77b0b toparity: take a const_twa_graph_ptr as input
* spot/twaalgos/toparity.hh (to_parity): Take a const TWA as input, as
in Spot 2.8.
* spot/twaalgos/toparity.cc: Adjust.
2020-04-05 14:12:45 +02:00
Alexandre Duret-Lutz
2b918d1c02 toparity: rename iar_old()/iar_maybe_old() to iar()/iar_maybe()
* spot/twaalgos/toparity.hh, spot/twaalgos/toparity.cc: Use the
original names, to minimize differences with spot 2.8.  Deprecate
them.
* tests/python/except.py: Adjust.
* NEWS: Mention the change.
2020-04-05 14:12:40 +02:00
Alexandre Duret-Lutz
0a95314dca to_parity: improve remove_false_transitions
* spot/twaalgos/toparity.hh (remove_false_transitions): Keep it
private.
* spot/twaalgos/toparity.cc (remove_false_transitions): Do not clone
automata without false transitions, simplify the loops, and preserve
all properties.
2020-04-04 16:06:51 +02:00