Commit graph

6008 commits

Author SHA1 Message Date
Alexandre Duret-Lutz
b6df1f8f92 bitvect: add a foreach_set_index(callback) function
Related to #476, where that is needed.

* spot/misc/bitvect.hh: Here.
* tests/core/bitvect.cc, tests/core/bitvect.test: Add some tests.
2021-09-11 01:00:24 +02:00
Alexandre Duret-Lutz
850608a5fd zlktree: add a cheap unit-propagation
If the top-level has top unit-Inf, propagate it.  This was suggested
by Jan Strejček yesterday.

* spot/twaalgos/zlktree.cc (max_models): Here.
2021-09-08 17:12:14 +02:00
Alexandre Duret-Lutz
cb1f6b1239 acc: introduce inf_unit()
* spot/twa/acc.cc, spot/twa/acc.hh: Here.
* tests/python/setacc.py: Test it.
2021-09-08 17:12:05 +02:00
Alexandre Duret-Lutz
4ed5160fb8 zlktree: fix a bug
Reported by Florian.

* spot/twaalgos/zlktree.cc: Handle the case where the condition does
not cover all colors.
* tests/python/zlktree.py: New file.
* tests/Makefile.am: Add it.
2021-09-08 15:15:08 +02:00
Alexandre Duret-Lutz
ceec447617 * tests/python/zlktree.ipynb: Fix the steps through the example. 2021-09-07 13:54:43 +02:00
Alexandre Duret-Lutz
170d839c4b acd: remove redundant nodes
Reported by Florian Renkin.

* spot/twaalgos/zlktree.cc (acd::_build): Use a sorted list to remove
redundant children, has done in zielonka_tree.
* tests/python/zlktree.ipynb: Add Florian's test case.
* tests/python/toparity.py: Adjust, and revert some tests
uncommented by mistake in a previous patch.
2021-09-05 20:50:33 +02:00
Alexandre Duret-Lutz
d5b641a7dc build: use 'jupyter nbconvert' instead of 'ipython nbconvert'
The latter is deprecatd.

* configure.ac: Check for jupyter.
* tests/Makefile.am: Adjust.
* HACKING: Mention we need jupyter.
2021-09-04 22:08:20 +02:00
Alexandre Duret-Lutz
4d2ced1b07 * tests/Makefile.am: Fix location of zlktree.ipynb. 2021-09-04 20:54:50 +02:00
Alexandre Duret-Lutz
5c5790039b zlktree: cleanup the interface, and add interactive ACD
* tests/python/_zlktree.ipynb: Remove and replace by...
* tests/python/zlktree.ipynb: ... this more documented notebook.
* tests/Makefile.am: Adjust.
* doc/org/tut.org, NEWS: Mention zlktree.ipynb.
* spot/twaalgos/zlktree.hh, spot/twaalgos/zlktree.cc,
python/spot/__init__.py: Cleanup interface, and add support for
interactive display.
2021-09-04 12:48:57 +02:00
Alexandre Duret-Lutz
dc17762e14 * doc/org/oaut.org (dot2tex): Acknowledge the 2.11 release. 2021-09-03 22:38:24 +02:00
Alexandre Duret-Lutz
4855d3c877 dot: add an option to output id= attributes
This will be handy latter to develop widgets with interactive
highlighting of automata.

* spot/twaalgos/dot.cc: Implement it.
* bin/common_aoutput.cc, NEWS, doc/org/oaut.org,
doc/org/spot.css: Document it.
* tests/core/alternating.test, tests/core/readsave.test,
tests/core/sccdot.test: Test it.
2021-09-03 22:38:24 +02:00
Alexandre Duret-Lutz
d5bbeceeb2 * .gitlab-ci.yml (mingw-shared, mingw-static): Build from a tarball. 2021-09-01 17:57:25 +02:00
Alexandre Duret-Lutz
d4e3b0bed4 tests: fix a gcc-snapshot warning
* tests/core/ikwiad.cc: replace dynamic_pointer_cast by a
static_pointer_cast to get rid of a possible nullptr warning.
2021-09-01 14:02:46 +02:00
Alexandre Duret-Lutz
1de441e8e5 tests: work around issue #474
* tests/python/_autparserr.ipynb: Redirect stderr to /dev/null
for some commands.
2021-09-01 12:27:21 +02:00
Alexandre Duret-Lutz
86c22d98bc zlktree: remimplement zielonka_tree without BDDs
* spot/twaalgos/zlktree.cc (zielonka_tree): Find the models using a
recursive procedure on the acceptance condition, without conversion to
BDD.
* tests/python/_zlktree.ipynb: Adjust to a different order of nodes.
2021-09-01 12:00:53 +02:00
Alexandre Duret-Lutz
200ee0d204 style: better support if statement with initializer
* tests/sanity/style.test: Here.
2021-09-01 12:00:53 +02:00
Alexandre Duret-Lutz
49b5d570e7 zlktree: share bitvectors in ACD
Improve the memory usage of the acd class by sharing state-vectors and
edges-vectors.

* spot/twaalgos/zlktree.cc, spot/twaalgos/zlktree.hh: Share the
vectors during the construction, and adjust the dot output to take
this into account.
2021-08-31 13:33:49 +02:00
Alexandre Duret-Lutz
26f2179805 zlktree: implement ACD and its transform
A quick and dirty implementation of the Alternating Cycle
Decomposition of the casares.21.icalp paper.

* spot/twaalgos/genem.cc, spot/twaalgos/genem.hh
(maximal_accepting_loops_for_scc): New function.
* spot/twaalgos/sccinfo.cc,
spot/twaalgos/sccinfo.hh (scc_and_mark_filter): Add a possibility to
specify a mask of transition to filter.
* spot/twaalgos/zlktree.hh, spot/twaalgos/zlktree.cc (acd): New class.
(acd_transform): New function.
* python/spot/__init__.py: Add SVG rendering for acd.
* tests/python/_zlktree.ipynb: Play with acd and acd_transform.
* tests/python/toparity.py: Add more tests to compare the
sizes of acd_transform and to_parity.
* NEWS: Mention this new feature.
2021-08-30 10:27:06 +02:00
Alexandre Duret-Lutz
8c5bb6c2eb zlktree: add a paritization based on zielonka trees
* spot/twaalgos/zlktree.hh,
spot/twaalgos/zlktree.cc (zielonka_tree_transform): New function.
* tests/python/_zlktree.ipynb: Test it on three examples.
2021-08-30 10:27:06 +02:00
Alexandre Duret-Lutz
c924c63255 Merge branch 'master' into next 2021-08-10 17:43:20 +02:00
Alexandre Duret-Lutz
3c7a2c9b4a Bump version to 2.9.8.dev
* NEWS, configure.ac: Here.
2021-08-10 17:38:54 +02:00
Alexandre Duret-Lutz
db0440f1fe Release Spot 2.9.8
* NEWS, configure.ac, doc/org/setup.org: Bump version to 2.9.8.
2021-08-10 17:37:00 +02:00
Alexandre Duret-Lutz
87022c23c6 * NEWS: Update for 2.9.8. 2021-08-10 13:39:49 +02:00
Alexandre Duret-Lutz
d8a75518e4 twa: fix intersecting_run on weak automata
Fixes #471, reported by Cambridge Yang.

* spot/twa/twa.cc (intersecting_run): Disable the product
optimization for weak automata.
* tests/python/471.py: New file.
* tests/Makefile.am: Add it.
* NEWS: Mention the bug.
2021-08-10 13:39:49 +02:00
Alexandre Duret-Lutz
c34192a77c twa_run: reduce now diagnoses rejecting runs
Part of #471.

* spot/twaalgos/emptiness.cc: Throw an exception if
the cycle is rejecting.
* spot/twaalgos/emptiness.hh: Document this behavior.
* tests/python/except.py: Test it.
2021-08-10 13:39:49 +02:00
Alexandre Duret-Lutz
eb3474d82b fix a gcc-snapshot -Wnoexcept diagnostic
* spot/misc/hash.hh (ptr_hash): Add noexcept on constructor to please
gcc-snapshot.
2021-08-10 13:39:49 +02:00
Alexandre Duret-Lutz
c0c76904da bitset: fix implementation of operator-()
This fixes #469.

* spot/misc/bitset.hh (bitset::operator-): Rewrite.
I cannot follow the logic of the old implementation.
* tests/python/setacc.py: Add a test case, inspired from #469.
2021-08-10 13:39:49 +02:00
Alexandre Duret-Lutz
bb7426c0b9 org: we have a conda-forge package
* doc/org/install.org: Add conda instructions.
2021-08-10 13:39:45 +02:00
Alexandre Duret-Lutz
487bbb63de work around a null pointer dereference error
This fixes #462.

* spot/twaalgos/gfguarantee.cc (do_g_f_terminal_inplace): Replace the
redirect_src vector by a unique_ptr<unsigned[]>.  Not only does this
remove the false positive diagnostic, but it also removes the unneeded
default initialization of the elements of that vector.
2021-08-10 13:27:45 +02:00
Alexandre Duret-Lutz
77545824eb ltlfilt: fix a typo in the --help text
* bin/ltlfilt.cc: Here.
2021-08-10 13:26:55 +02:00
Alexandre Duret-Lutz
773939bebe typos: coma -> comma
* ChangeLog.1, tests/core/autcross3.test, tests/core/ltl3ba.test,
tests/core/ltl3dra.test, tests/core/ltlcross3.test,
tests/core/ltlsynt.test, tests/sanity/style.test: Here.
2021-08-10 13:26:12 +02:00
Alexandre Duret-Lutz
2e14eb0c02 [buddy] typo coma -> comma
* ChangeLog.1: Here.
2021-08-10 13:25:28 +02:00
Alexandre Duret-Lutz
eeccd5804d * spot/graph/graph.hh (chain_edges_): Typo in doc. 2021-08-10 13:24:55 +02:00
Alexandre Duret-Lutz
c58e6f22ac mealy: work around spurious nullptr warning
* spot/twaalgos/mealy_machine.cc (mm_sat_prob_t<true>::get_sol): Call
SPOT_ASSUME to hint that res.data() is not null.
2021-08-02 09:28:14 +02:00
Alexandre Duret-Lutz
3614cf34a8 use bdd_have_common_assignment in more places
* spot/twaalgos/gfguarantee.cc, spot/twaalgos/isdet.cc: Use it.
2021-07-30 12:06:23 +02:00
Alexandre Duret-Lutz
a6aa799a17 adjust for BuDDy change
* spot/twaalgos/mealy_machine.cc, python/buddy.i: Rename
bdd_has_common_assignement to bdd_have_common_assignment.
2021-07-30 12:01:19 +02:00
Alexandre Duret-Lutz
dfd168b048 [buddy] fix bdd_has_common_assignement
* src/bddop.c, src/bddx.h (bdd_has_common_assignement): Rename as...
(bdd_have_common_assignment): ... this, and fix level comparisons.
Also add a cache.
2021-07-30 11:35:10 +02:00
Alexandre Duret-Lutz
af511707c0 introduce a zielonka_tree class
* spot/twaalgos/zlktree.cc, spot/twaalgos/zlktree.hh: New files.
* spot/twaalgos/Makefile.am: Add them.
* tests/python/_zlktree.ipynb: New file.
* tests/Makefile.am: Add it.
* python/spot/__init__.py, python/spot/impl.i: Add bindings for it.
* doc/spot.bib (casares.21.icalp): New entry.
* NEWS: Mention this.
2021-07-30 11:00:25 +02:00
Alexandre Duret-Lutz
803f647dde acc: make the to_bdd() method public
* spot/twa/acc.cc, spot/twa/acc.hh (acc_code::to_bdd): New method
that calls the private to_bdd_rec() function.
2021-07-30 11:00:25 +02:00
philipp
31d6dc33e7 Improving efficiency of unsplit_2step
* spot/twaalgos/synthesis.cc: Here
2021-07-29 09:50:26 +02:00
Florian Renkin
9669806cd0 Adding signature based minimization of mealy machines
* spot/twaalgos/mealy_machine.cc: Here
* tests/python/mealy.py: Adding tests
2021-07-29 09:50:26 +02:00
philipp
3da41aa9a1 Improving hash performance for pairs of integral types
* spot/misc/hash.hh: Here
2021-07-29 09:50:26 +02:00
philipp
f4776efb63 Adding sat-based minimization for mealy machines
* spot/twaalgos/mealy_machine.hh,
spot/twaalgos/mealy_machine.cc: Here
* spot/twaalgos/Makefile.am: Here
* tests/python/mealy.py: Added tests
* tests/Makefile.am: Adding mealy.py
* python/spot/impl.i: Here
2021-07-29 09:49:45 +02:00
philipp
e8f5865fb8 Add setter and getter for synthesis-outputs
* spot/twaalgos/game.cc, spot/twaalgos/game.hh: Here
2021-07-27 16:45:44 +02:00
philipp
08113e0e04 Adding bdd_has_common_assignement
* python/buddy.i: Here
2021-07-27 16:45:44 +02:00
philipp
92239d8242 [buddy] Adding bdd_has_common_assignement
bdd_has_common_assignement determines if two bdds a and b
have (at least) one common assignement.
That is it will return true iff bdd_and(a, b) != bddfalse.

* src/bddx.h: Here
* src/bddop.c: Here
2021-07-27 16:45:44 +02:00
Alexandre Duret-Lutz
31e87aac11 mc: add missing <atomic> includes
* spot/mc/lpar13.hh, spot/mc/mc_instanciator.hh: Here.
2021-07-26 11:43:17 +02:00
Alexandre Duret-Lutz
4570c735f3 merge_states: don't call defrag_states if unnecessary
* spot/twa/twagraph.cc (merge_states): Return the number
of removed states, and use that to decide if defrag_states
is needed.
* spot/twa/twagraph.hh, NEWS: Document that.
* tests/core/tgbagraph.test, tests/core/twagraph.cc: Adjust test case.
2021-07-26 11:43:17 +02:00
Alexandre Duret-Lutz
d019ea61fe python: make sere twa::acc() survives its automaton
Fixes #468.

* python/spot/__init__.py: Add wrapper around twa::acc() and
twa::get_acceptance() to store the automaton into the acceptance
proxy, therefore ensuring that the automaton survives that proxy.
* tests/python/setacc.py: Test it.
2021-07-12 15:27:07 +02:00
Alexandre Duret-Lutz
b767411a82 twa_graph: work around swig-3 calling the wrong make_twa_graph copy
* spot/twa/twagraph.cc (copy): Redirect to the faster make_twa_graph
when possible.
2021-07-08 17:38:40 +02:00