Commit graph

6618 commits

Author SHA1 Message Date
Alexandre Duret-Lutz
6eff384fca forq: remove the relevance test
Looks like the comparison operator between std::set<std::pair<state,
bool>> and std::set<state> had a few issue.  This is part of an
optimization that Pierre Ganty prefers to see removed, so I'm just
removing that code.

For reference, changing the removed operator<= to the following
also seem to fix all tests.

  static bool operator<=(std::set<std::pair<state, bool>> const& f,
                         state_set const& set)
  {
    auto first1 = set.begin(), last1 = set.end();
    auto first2 = f.begin(), last2 = f.end();
    for (; first2 != last2; ++first1)
      if (first1 == last1 || first2->first < *first1)
        {
          return false;
        }
      else if (first2->first == *first1)
        {
          ++first2;
          // Some states of f may appear twice because of the attached
          // Boolean.
          if (first2 != last2 && first2->first == *first1)
            ++first2;
        }
    return true;
  }

* spot/twaalgos/forq_contains.cc: Remove relevance-based optimization.
2023-09-15 10:51:00 +02:00
Alexandre Duret-Lutz
05d7622f8f forq: make it easier to select contains's version
* spot/twaalgos/contains.hh, spot/twaalgos/contains.cc
(containment_select_version): New function.
(contains): Use it.
* spot/twa/twa.cc (exclusive_word): Likewise.
* bin/autfilt.cc (--included-in): Adjust to use forq depending
on containement_select_version.
* bin/man/spot-x.x: Adjust documentation of
CONTAINMENT_SELECT_VERSION.
* tests/core/included.test, tests/python/forq_contains.py: Add more
tests.
* NEWS: Mention the new feature.
2023-09-15 10:51:00 +02:00
Alexandre Duret-Lutz
ca4e6c4b48 forq: swap arguments of contains_forq
* spot/twaalgos/forq_contains.hh,
spot/twaalgos/forq_contains.cc (contains_forq): Swap arguments so
they follow the same order as contains().
* tests/python/forq_contains.py: Adjust.
2023-09-15 10:50:52 +02:00
Alexandre Duret-Lutz
3861c04581 forq: fix Buchi acceptance test
* spot/twa/twa.cc: Here.
* spot/twaalgos/forq_contains.cc: And there.  Also simplify the
handling code by simply throwing the exception when the error is
detected.
2023-09-13 15:48:17 +02:00
Alexandre Duret-Lutz
28a6471efb forq: fix bib entry and bind the doxygen doc to a group
* doc/spot.bib: Reformat the FORQ reference in the style of the
rest of the bibliographic file.
* spot/twaalgos/forq_contains.hh: Adjust, and add missing \ingroup.
2023-09-13 15:48:17 +02:00
Jonah Romero
ad22eb3e65 add enviroment variables for FORQ algorithm
* AUTHORS: added Jonah Romero
* bin/man/spot-x.x: Added the enviroment variables,
                    SPOT_EXCLUSIVE_WORD and SPOT_CONTAINMENT_CHECK
* doc/spot.bib: Added paper citation for FORQ inclusion algorithm
* spot/twa/twa.cc: Modified exclusive_word to also use FORQ
* spot/twaalgos/contains.cc: Modified contains to also use FORQ
2023-09-13 15:48:17 +02:00
Jonah Romero
d1c5b2efdf implement a FORQ-based inclusion check for SBAs
* spot/twaalgos/forq_contains.cc, spot/twaalgos/forq_contains.hh: New
files.
* spot/twaalgos/Makefile.am, python/spot/impl.i: Add them.
* tests/python/forq_contains.py: New file.
* tests/Makefile.am: Add it.
2023-09-13 15:48:17 +02:00
Jonah Romero
c2832cabfc split: add a new split_edge variant
* spot/twaalgos/split.cc, spot/twaalgos/split.hh: Here.
* tests/python/splitedge.py: New file.
* tests/Makefile.am: Add it.
2023-09-13 15:48:17 +02:00
Alexandre Duret-Lutz
d96796121a replace sprintf by snprintf
This was reported by Pierre Ganty, who said that sprintf is reported
as deprecated on MacOS 13.5.2 (22G91).

* spot/twa/acc.cc, spot/twaalgos/aiger.cc: Here.
2023-09-13 15:39:36 +02:00
Alexandre Duret-Lutz
7149521f48 relabel_bse: rework to simplify more patterns
Rework the way we compute and use cut-points to catch more patterns we
can rewrite.  Also Use BDDs to check if a Boolean sub-expression is
false or true.   Fixes issue #540.

* spot/tl/relabel.hh: Update documentation
* spot/tl/relabel.cc (relabel_bse): Rework.
* tests/core/ltlfilt.test: Add more test cases.
* tests/python/_mealy.ipynb: Update.
* NEWS: Mention the change.
2023-09-13 11:31:49 +02:00
Alexandre Duret-Lutz
cbb981ffd5 python: add bindings for set of unsigned int
Requested by Marek Jankola.

* python/spot/impl.i: Add bindings for std::set<unsigned>.
* tests/python/powerset.py: New file.
* tests/Makefile.am: Add it.
* THANKS: Add Marek.
2023-09-08 12:05:06 +02:00
Alexandre Duret-Lutz
538afeb73b * spot/twaalgos/aiger.hh: Add missing include. 2023-09-08 11:37:47 +02:00
Alexandre Duret-Lutz
e2149fabf4 determinize: work around overflow in reachability matrix indices
Fixes #541, reported by David Dokoupil.

* spot/twaalgos/determinize.cc: Disable use_simulation when the input
has more than 2^16 SCCs..  Also rework the reachability
matrix to store only its lower half triangle.
* spot/twaalgos/determinize.hh, NEWS: Mention the limitation of
use_simulation.
* THANKS: Add David.
2023-09-05 09:12:15 +02:00
Alexandre Duret-Lutz
110b052b7d translate: add a new relabel-overlap option
Fixes issue #536.  Also a part of issue #500.

* spot/twaalgos/translate.hh, spot/twaalgos/translate.cc: Implement
this new option.
* bin/spot-x.cc, NEWS: Mention it.
* tests/core/ltl2tgba2.test: Add the test case from issue #536.
2023-08-30 16:49:28 +02:00
Alexandre Duret-Lutz
18478e663f relabel: introduce an overlapping relabeling version
Related to issue #500 and issue #536.

* spot/tl/relabel.hh (relabel_overlapping_bse): New function.
* spot/tl/relabel.cc: Implement it.
* bin/ltlfilt.cc: Add a --relabel-overlapping-bool option.
* tests/core/ltlfilt.test: Test it.
* NEWS: Mention it.
2023-08-30 16:49:19 +02:00
Alexandre Duret-Lutz
14347cdc52 * tests/sanity/style.test: Don't use egrep. 2023-08-03 11:49:08 +02:00
Alexandre Duret-Lutz
93ded57e52 Merge branch 'master' into next 2023-08-01 14:26:35 +02:00
Alexandre Duret-Lutz
41751b80a1 * NEWS, configure.ac: Bump version to 2.11.6.dev. 2023-08-01 14:22:32 +02:00
Alexandre Duret-Lutz
f4b397a2bf Release Spot 2.11.6
* NEWS, configure.ac, doc/org/setup.org: Update version.
2023-08-01 12:19:47 +02:00
Alexandre Duret-Lutz
bb95705d52 mention the bug fixed in BuDDy
* NEWS: Explain the bug fixed in previous patch and reported in
issue #535.
* THANKS: Add Guillermo.
2023-08-01 11:12:49 +02:00
Alexandre Duret-Lutz
e37bc9e1ae [buddy] fix cache index of bdd_forall
Fix a 20 year old typo that caused a bug reported by Guillermo Perez.

* src/bddop.c (bdd_forall, bdd_forallcomp): Fix the cache index.
2023-08-01 11:12:49 +02:00
Alexandre Duret-Lutz
de7d5a956f * .gitlab-ci.yml: temporary disable raspbian. 2023-08-01 11:12:49 +02:00
Alexandre Duret-Lutz
44d9e34e32 improve coverage of LaTeX/utf8 printers for SERE
* bin/common_output.cc, bin/common_output.hh,
bin/randltl.cc: Adjust so that running "randltl -S" use
the SERE flavor of the spot/latex/utf8 formula printers.
* tests/core/latex.test, tests/core/utf8.test,
tests/python/ltlparse.py: Add more test cases.
2023-08-01 11:12:49 +02:00
Alexandre Duret-Lutz
15857385a5 bin: cover more tmpfile failure when running as root
* tests/core/ltlcross5.test: reorganize to test missing directory
before permission issues, as the latter cannot be run as root.
2023-08-01 10:51:33 +02:00
Alexandre Duret-Lutz
3d412fbb78 tests: add some test to cover autcross' univ-edges removal
* tests/core/ltl3ba.test: Here.
2023-08-01 10:51:33 +02:00
Alexandre Duret-Lutz
531252119c aiger: order the inputs of binary AND gates
* spot/twaalgos/aiger.cc: Here.
* tests/core/ltlsynt.test: Adjust, and add test case for aiger=optim.
2023-08-01 10:51:33 +02:00
Alexandre Duret-Lutz
e548bf0a8e acc: remove some dead functions
* spot/twa/acc.hh, spot/twa/acc.cc (has_parity_prefix,
is_parity_max_equiv): Remove.
* spot/twa/acc.hh, spot/twa/twagraph.cc,
spot/twa/twagraph.hh (apply_permutation): Remove.
2023-08-01 10:51:33 +02:00
Alexandre Duret-Lutz
69b9ffef9a bin: fix handling for --output & --format with LTL outputs
* bin/common_output.cc: Set the output stream for LTL formats.
2023-08-01 10:51:33 +02:00
Alexandre Duret-Lutz
8065759fbd * HACKING: Mention the svgo version we use. 2023-08-01 10:51:33 +02:00
Alexandre Duret-Lutz
090dcf17eb work around spurious GCC 13 warnings
* spot/graph/graph.hh (new_univ_dests): Add an overload taking
a temporary vector.
* spot/twa/twagraph.cc (defrag_states): Use it.
* tests/core/parity.cc: Remove some temporary variables.
2023-08-01 10:51:33 +02:00
Alexandre Duret-Lutz
bd1809f758 bin: handle thousands of output files
Fixes #534.  Test case is only on next branch.

* bin/common_file.hh, bin/common_file.cc: Make it possible
to reopen a closed file.
* bin/common_output.cc, bin/common_aoutput.cc: Add a heuristic
to decide when to close files.
* NEWS: Mention the issue.
2023-08-01 10:51:33 +02:00
Alexandre Duret-Lutz
adca03a30a * tests/core/ltlcross4.test: Work around recent Pandas change. 2023-08-01 10:51:33 +02:00
Alexandre Duret-Lutz
47674c0d2f fix spurious failure of ltlcross4.test
Reported by Yuri Victorovich.

* tests/core/ltlcross4.test: Drop the 'formula' column before
computing aggregates.  It causes warnings in some Pandas versions, and
errors in others.
2023-08-01 10:51:33 +02:00
Florian Renkin
330b34e84d parity_type_to_parity: Add missing cases
* spot/twaalgos/toparity.cc: Correct some cases where the solution was
not detected.
* tests/python/toparity.py: Update tests.
2023-08-01 10:51:33 +02:00
Alexandre Duret-Lutz
75bd595d28 bitvect: work around incorrect warning from gcc
* spot/misc/bitvect.hh: Don't free the old ptr if realloc() returns
NULL, as this confuse GCC who warns that we are freeing something that
has already been freed.   Instead, let the ~bitvect() destructor
handle this.
2023-08-01 10:51:33 +02:00
Alexandre Duret-Lutz
9c6fa4921b debian: add missing build dependencies
* debian/control: Add Build-Depends on graphviz, jupyter-nbconvert,
doxygen.
2023-08-01 10:51:33 +02:00
Alexandre Duret-Lutz
2495004afd avoid a g++-12 warning about potential null pointer dereference
* spot/twaalgos/determinize.cc (sorted_nodes): Rewrite to
avoid reallocation of temporary vector.
2023-08-01 10:51:33 +02:00
Alexandre Duret-Lutz
16373cfb10 Work around spurious g++-12 warnings
* spot/twaalgos/ltl2tgba_fm.cc, spot/tl/formula.hh,
spot/twaalgos/translate.cc: Add SPOT_ASSUME in various places to help
g++.
2023-08-01 10:51:33 +02:00
Alexandre Duret-Lutz
69d9b78a55 mention the bug fixed in BuDDy
* NEWS: Explain the bug fixed in previous patch and reported in
issue #535.
* THANKS: Add Guillermo.
2023-08-01 09:19:03 +02:00
Alexandre Duret-Lutz
d58b7da562 [buddy] fix cache index of bdd_forall
Fix a 20 year old typo that caused a bug reported by Guillermo Perez.

* src/bddop.c (bdd_forall, bdd_forallcomp): Fix the cache index.
2023-07-31 21:07:07 +02:00
Alexandre Duret-Lutz
e3e50672b5 * .gitlab-ci.yml: temporary disable raspbian. 2023-07-28 16:20:18 +02:00
Alexandre Duret-Lutz
7358a26492 improve coverage of LaTeX/utf8 printers for SERE
* bin/common_output.cc, bin/common_output.hh,
bin/randltl.cc: Adjust so that running "randltl -S" use
the SERE flavor of the spot/latex/utf8 formula printers.
* tests/core/latex.test, tests/core/utf8.test,
tests/python/ltlparse.py: Add more test cases.
2023-07-27 16:30:35 +02:00
Alexandre Duret-Lutz
95e3bb815c bin: cover more tmpfile failure when running as root
* tests/core/ltlcross5.test: reorganize to test missing directory
before permission issues, as the latter cannot be run as root.
2023-07-27 16:30:35 +02:00
Alexandre Duret-Lutz
e1e9f960e6 tests: add some test to cover autcross' univ-edges removal
* tests/core/ltl3ba.test: Here.
2023-07-27 16:30:35 +02:00
Alexandre Duret-Lutz
95379c18cc aiger: order the inputs of binary AND gates
* spot/twaalgos/aiger.cc: Here.
* tests/core/ltlsynt.test: Adjust, and add test case for aiger=optim.
2023-07-27 16:30:35 +02:00
Alexandre Duret-Lutz
37325f1942 acc: remove some dead functions
* spot/twa/acc.hh, spot/twa/acc.cc (has_parity_prefix,
is_parity_max_equiv): Remove.
* spot/twa/acc.hh, spot/twa/twagraph.cc,
spot/twa/twagraph.hh (apply_permutation): Remove.
2023-07-27 16:30:35 +02:00
Alexandre Duret-Lutz
61e43edde8 bin: fix handling of -o '>>-' in the close/reopen path
* tests/core/serial.test: Add test case.
* bin/common_file.cc: Fix it.
2023-07-26 21:50:16 +02:00
Alexandre Duret-Lutz
0923f8efe2 bin: fix handling for --output & --format with LTL outputs
* bin/common_output.cc: Set the output stream for LTL formats.
* tests/core/serial.test: Add a test case about this issue that also
improve the covering of the previous patch about saving file
descriptors.
2023-07-26 21:33:36 +02:00
Alexandre Duret-Lutz
7f1a33cc61 * HACKING: Mention the svgo version we use. 2023-07-26 16:19:35 +02:00
Alexandre Duret-Lutz
06b1ecb50b work around spurious GCC 13 warnings
* spot/graph/graph.hh (new_univ_dests): Add an overload taking
a temporary vector.
* spot/twa/twagraph.cc (defrag_states): Use it.
* tests/core/parity.cc: Remove some temporary variables.
2023-07-26 16:19:23 +02:00