Commit graph

6275 commits

Author SHA1 Message Date
Philipp Schlehuber-Caissier
99bf152673 propagate_marks_here can break state-acc prop
* spot/twaalgos/degen.cc: Fix
* tests/python/pdegen.py: Test
2022-06-29 14:02:36 +02:00
Philipp Schlehuber-Caissier
ddbdcd39cb Adept ltlsynt pgame to new solver
* bin/ltlsynt.cc: Remove change/colorize_parity, check alternating
2022-06-29 13:19:57 +02:00
Philipp Schlehuber-Caissier
6bc1dd0467 Use new zielonka for synthesis
Remove all now unnecessary colorize_parity and
change_parity calls.

* spot/twaalgos/synthesis.cc: Change here
* spot/twaalgos/game.cc: Adjust pg-print
* tests/core/ltlsynt.test,
  tests/python/_mealy.ipynb,
  tests/python/games.ipynb,
  tests/python/synthesis.ipynb,
  tests/python/synthesis.py: Adjust tests
2022-06-27 09:29:46 +02:00
philipp
9124484719 Modifying Zielonka
* spot/twaalgos/game.cc: solve_parity_game now works for any of
the four parity types and partially colored graphs.
 Also removing unnescessary steps from Zielonka.
h: Update
* tests/python/game.py: Update and additional tests
* tests/python/except.py: Remove outdated exception
2022-06-27 09:29:36 +02:00
Alexandre Duret-Lutz
9222e9713b parseaut: fix handling of [ outside HOA
Fixes #509.

* spot/parseaut/scanaut.ll: Reset ->str whenever a [ is read,
so that we do not attempt to clear ->str while reading garbage.
* NEWS: Mention the bug.
* tests/core/parseaut.test: Test it.
2022-06-23 17:19:09 +02:00
Alexandre Duret-Lutz
b4279d3a12 dot: quote identifiers containing a minus
* spot/twaalgos/dot.cc: Quote identifiers containing a minus.
* tests/core/alternating.test: Add test case.
* NEWS: Mention the bug.
2022-06-23 16:19:50 +02:00
Alexandre Duret-Lutz
166a26417c graph: fix creation of universal edge
* spot/graph/graph.hh: Use a temporary array to store the destination
vector if the passed range belong to the dests_ vector.  Otherwise the
passed begin/end risk being invalidated when dests_ is reallocated.
* NEWS: Mention the bug.
2022-06-23 15:52:24 +02:00
Alexandre Duret-Lutz
288b1c7958 contains: generalize second argument to a twa
This was triggered by a question from Pierre Ganty on the mailing
list.

* spot/twaalgos/contains.hh, spot/twaalgos/contains.cc (contains):
Generalize second argument to const_twa_ptr instead of
const_twa_graph_ptr.
* NEWS: Mention this.
* tests/python/ltsmin-pml.ipynb: Show that it work.
* THANKS: Mention Pierre.
2022-06-22 23:43:07 +02:00
Alexandre Duret-Lutz
be28365db4 ltlsynt: add --from-pgame option to read parity games
* bin/common_file.cc, bin/common_file.hh (output_file): Add a
force_append option.
* bin/ltlsynt.cc: Implement the --from-pgame option, and
fix suppot for --csv when multiple inputs are processed.
* NEWS: Mention the new option.
* tests/core/syfco.test: Add a test case.
* tests/core/ltlsynt-pgame.test: New file.
* tests/Makefile.am: Add it.
2022-06-22 23:20:20 +02:00
Alexandre Duret-Lutz
04d718ab9c ltlsynt: support multiple --tlsf options
* bin/common_finput.cc, bin/common_finput.hh: Add support for
process_tlsf_file.
* bin/ltlsynt.cc: Implement it.
* tests/core/syfco.test: Adjust test case.
2022-06-22 19:37:41 +02:00
Alexandre Duret-Lutz
df685433f4 bin: separate process_file() for aut and ltl
* bin/common_finput.cc, bin/common_finput.hh,
bin/common_hoaread.hh (process_file): Split into...
(process_ltl_file, process_aut_filt): ... these, as we will need both
in ltlsynt.
2022-06-22 19:37:41 +02:00
Alexandre Duret-Lutz
8161a8c531 tests: workaround test not failing if the Spot support more colors
* configure.ac (MAX_ACCSETS): Add AC_SUBST.
* tests/run.in: Define MAX_ACCSETS.
* tests/core/prodchain.test: Test MAX_ACCSETS.
2022-06-21 14:24:08 +02:00
Alexandre Duret-Lutz
23908f3d2f Add a --enable-pthread option to activate experimental threading code
* NEWS, README, doc/org/compile.org: Mention the option and
its effect on compilation requirements.
* configure.ac: Add the --enable-pthread option, and ENABLE_PTHREAD
macro.
* doc/org/g++wrap.in, spot/Makefile.am, spot/libspot.pc.in: Compile
with -pthread conditionally.
* spot/graph/graph.hh, spot/twa/twagraph.cc: Adjust the code to not
use thread-local variables, and let the pthread code be optional.
* .gitlab-ci.yml: Activate --enable-pthread in two configurations.
2022-06-21 09:56:13 +02:00
Alexandre Duret-Lutz
721d5695ec add a newer version of the generic emptiness check
As discussed with Jan Strejček.

* spot/twa/acc.cc, spot/twa/acc.hh (fin_unit_one_split): New function.
(fin_one_extract): Return the simplified acceptance condition as an
optimization.
* python/spot/impl.i: Bind this new function.
* tests/python/acc.py: New file, to test it.
* tests/Makefile.am: Add acc.py.
* spot/twaalgos/genem.cc, spot/twaalgos/genem.hh: Implement the
spot211 variant of the emptiness check.
* tests/python/genem.py: Test it.
* tests/python/acc_cond.ipynb: Adjust test for fin_one_extract.
2022-06-17 09:54:42 +02:00
Florian Renkin
aca6bd9042 synthesis: Deletion of an incorrect case in the bypass
With a formula like G(b1) & (GFi <-> GF(b1)), a direct strategy was
created while it is unrealizable.

* spot/twaalgos/synthesis.cc: here.
* tests/core/ltlsynt.test: add tests
2022-05-31 13:56:20 +02:00
Philipp Schlehuber-Caissier
d8cc0c5acb Introduce a faster merge_states
merge_states is now hash-based, uses the new edge-sorting with
src first and can be executed in parallel.

* spot/twa/twagraph.cc: Here
* tests/python/mergedge.py: Test
2022-05-24 16:58:07 +02:00
Philipp Schlehuber-Caissier
71c2a7b1a6 Add a new function to sort edges
sort_edge_srcfirst_ will sort the edge with respect
to the src state, then sort each sub list with respect
to the given predicate, possibly in parallel.

* spot/graph/graph.hh: Here
2022-05-24 16:58:07 +02:00
Philipp Schlehuber-Caissier
e064726b64 Introducing a global variable to define the number of threads
* NEWS: Announce
* spot/Makefile.am: Add pthread to use threads
* spot/misc/common.cc,
  spot/misc/common.hh: Add variable + getter/setter
* spot/misc/Makefile.am: Add common.cc
2022-05-24 16:58:07 +02:00
Alexandre Duret-Lutz
b11208440b zlktree: use a cache in the construction of zielonka_tree
This largely speeds up the computation for conditions
like "Rabin n" sharing a lot of subtrees.

Also implement options to stop the construction if the shape is wrong.

* spot/twaalgos/zlktree.cc, spot/twaalgos/zlktree.hh: Implement the
cache and the options.
* tests/python/zlktree.ipynb, tests/python/zlktree.py: New tests.
2022-05-20 17:07:26 +02:00
Alexandre Duret-Lutz
f784e40548 complete: do not force Büchi on universal automata
* spot/twaalgos/complete.hh: Adjust documentation.
* spot/twaalgos/complete.cc: If the acceptance condition is a
tautology, delay the forcing of Büchi acceptance until we are sure it
is needed.
* NEWS: Mention the change.
2022-05-20 14:51:48 +02:00
Alexandre Duret-Lutz
3b8e11322b Merge branch 'master' into next 2022-05-18 09:03:40 +02:00
Alexandre Duret-Lutz
457839df36 * NEWS, configure.ac: Bump version to 2.10.6. 2022-05-18 08:52:33 +02:00
Alexandre Duret-Lutz
e0de77d8a4 Release Spot 2.10.6
* NEWS, configure.ac, doc/org/setup.org: Set version to 2.10.6.
2022-05-18 08:52:33 +02:00
Alexandre Duret-Lutz
a6639e56cb more noexcept to pleace GCC
* spot/bricks/brick-hashset (Row): Add noexcept.
* bin/autcross.cc (out_statistics): Likewise.
* bin/ltlcross.cc (statistics): Likewise.
2022-05-18 08:52:33 +02:00
Alexandre Duret-Lutz
99d030f5e1 GCC 12 warns too much about <regex>
See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105562

* m4/gccwarn.m4: Compile a small regex and add
-Wno-maybe-uninitialized if needed.
2022-05-18 08:52:33 +02:00
Alexandre Duret-Lutz
10bc253dd8 work around spurious gcc 12 "potentially null dereference"
The issue seems to be inside std::vector's copy constructor, but it
highlighted places in Spot were we could avoid this copy.

* spot/twaalgos/ltl2taa.cc: Avoid some copies of std::vector<formula>.
2022-05-18 08:52:33 +02:00
Alexandre Duret-Lutz
eecb9af21e Fix a clang++15 warning
* spot/parseaut/parseaut.yy: Move the try-block inside the code of the
constructors, so that they can refer to non-static members.
2022-05-18 08:52:33 +02:00
Alexandre Duret-Lutz
8a628d96bc fix warnings from clang-15
* spot/twa/acc.cc (acc_cond::acc_code::symmetries): Fix weird loop.
* spot/twaalgos/aiger.cc (aig::circ_step): Replace & by &&.
2022-05-18 08:52:33 +02:00
Alexandre Duret-Lutz
b5f8e3c75d [buddy] remove some unused variables
* src/reorder.c (reorder_win2ite): Do not set c=1.
2022-05-18 08:52:33 +02:00
Alexandre Duret-Lutz
c609f4cb4b * spot/twa/bdddict.hh (bdd_info): Add noexcept, suggested by gcc 12. 2022-05-18 08:52:33 +02:00
Alexandre Duret-Lutz
cb5bc38f35 bin: reset column specification between files
* bin/common_finput.cc (job_processor::process_file): Reset
col_to_read.
* tests/core/ltlfilt.test: Test it.
* NEWS: Mention the bug.
2022-05-18 08:52:33 +02:00
Alexandre Duret-Lutz
f14b0bb4bd Fix compilation on MacOS X
Patch by Shachar Itzhaky.

* spot/parseaut/scanaut.ll, spot/parsetl/scantl.ll: Include
libc-config.h instead of config.h.
* NEWS: Mention the fix.
* THANKS: Add Shachar.
2022-05-18 08:52:33 +02:00
Alexandre Duret-Lutz
78d7224026 twagraph: improve copy of kripke_graph
Fix #505, Reported by Edmond Irani Liu.

* spot/twa/twagraph.cc (copy): Deal with kripke_graph in a better way.
* spot/twaalgos/hoa.cc: Do not force the use of named-states since
when the input is a kripke_graph.
* tests/python/kripke.py: Adjust test cases.
* NEWS: Mention the change.
* THANKS: Add Edmund.
2022-05-18 08:52:33 +02:00
Alexandre Duret-Lutz
506442450e parsetl: remove a superfluous diagnostic on some erroneous input
* tests/core/neverclaimread.test: Adjust and remove FIXME.
* spot/parsetl/parsetl.yy (try_recursive_parse): Return false
on empty string.
2022-05-18 07:07:52 +02:00
Alexandre Duret-Lutz
9ae2e9c03d Fix link to parity game example
Reported by Florian Renkin.

* doc/org/index.org: Here.
2022-05-18 07:07:26 +02:00
Alexandre Duret-Lutz
2a4e68bfae more noexcept to pleace GCC
* spot/bricks/brick-hashset (Row): Add noexcept.
* bin/autcross.cc (out_statistics): Likewise.
* bin/ltlcross.cc (statistics): Likewise.
2022-05-17 22:06:59 +02:00
Alexandre Duret-Lutz
a23b30abdc GCC 12 warns too much about <regex>
See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105562

* m4/gccwarn.m4: Compile a small regex and add
-Wno-maybe-uninitialized if needed.
2022-05-17 17:01:48 +02:00
Alexandre Duret-Lutz
e4f8226c62 work around spurious gcc 12 "potentially null dereference"
The issue seems to be inside std::vector's copy constructor, but it
highlighted places in Spot were we could avoid this copy.

* spot/twaalgos/ltl2taa.cc: Avoid some copies of std::vector<formula>.
2022-05-17 15:25:17 +02:00
Alexandre Duret-Lutz
e8f496bb6c Fix a clang++15 warning
* spot/parseaut/parseaut.yy: Move the try-block inside the code of the
constructors, so that they can refer to non-static members.
2022-05-17 12:01:11 +02:00
Alexandre Duret-Lutz
3a234e24ae fix warnings from clang-15
* spot/twa/acc.cc (acc_cond::acc_code::symmetries): Fix weird loop.
* spot/twaalgos/aiger.cc (aig::circ_step): Replace & by &&.
2022-05-17 11:43:55 +02:00
Alexandre Duret-Lutz
5dab2ede41 [buddy] remove some unused variables
* src/reorder.c (reorder_win2ite): Do not set c=1.
2022-05-17 11:37:52 +02:00
Alexandre Duret-Lutz
4bb58f457b * spot/twa/bdddict.hh (bdd_info): Add noexcept, suggested by gcc 12. 2022-05-17 11:17:37 +02:00
Alexandre Duret-Lutz
d35f7bd37c bin: reset column specification between files
* bin/common_finput.cc (job_processor::process_file): Reset
col_to_read.
* tests/core/ltlfilt.test: Test it.
* NEWS: Mention the bug.
2022-05-17 11:11:23 +02:00
Alexandre Duret-Lutz
d697f57a97 bin: introduce a non-binary job_type
This will later help improve the handling of different input types of
ltlsynt.

* bin/common_finput.hh (job_type): New enum.
(job::type): Use it.
* bin/autcross.cc, bin/autfilt.cc, bin/common_finput.cc,
bin/dstar2tgba.cc, bin/ltl2tgba.cc, bin/ltl2tgta.cc, bin/ltlcross.cc,
bin/ltldo.cc, bin/ltlfilt.cc, bin/ltlgrind.cc, bin/ltlsynt.cc: Adjust
to use the job_type enum instead of a boolean.
2022-05-17 10:49:06 +02:00
Alexandre Duret-Lutz
3b809c0a14 Fix compilation on MacOS X
Patch by Shachar Itzhaky.

* spot/parseaut/scanaut.ll, spot/parsetl/scantl.ll: Include
libc-config.h instead of config.h.
* NEWS: Mention the fix.
* THANKS: Add Shachar.
2022-05-17 09:35:09 +02:00
Alexandre Duret-Lutz
013c879b41 twagraph: improve copy of kripke_graph
Fix #505, Reported by Edmond Irani Liu.

* spot/twa/twagraph.cc (copy): Deal with kripke_graph in a better way.
* spot/twaalgos/hoa.cc: Do not force the use of named-states since
when the input is a kripke_graph.
* tests/python/kripke.py: Adjust test cases.
* NEWS: Mention the change.
* THANKS: Add Edmund.
2022-05-09 13:42:20 +02:00
Alexandre Duret-Lutz
ef9267a58e parsetl: remove a superfluous diagnostic on some erroneous input
* tests/core/neverclaimread.test: Adjust and remove FIXME.
* spot/parsetl/parsetl.yy (try_recursive_parse): Return false
on empty string.
2022-05-06 13:58:52 +02:00
Alexandre Duret-Lutz
4a2bdd6e86 Fix link to parity game example
Reported by Florian Renkin.

* doc/org/index.org: Here.
2022-05-04 17:40:17 +02:00
Alexandre Duret-Lutz
73e148446c Merge branch 'master' into next 2022-05-03 09:05:26 +02:00
Alexandre Duret-Lutz
56666e0db5 * NEWS, configure.ac: Bump version to 2.10.5.dev. 2022-05-03 09:01:03 +02:00