Commit graph

12 commits

Author SHA1 Message Date
Alexandre Duret-Lutz
67b5d2aa9a fix several algorithms that incorrectly preserved !weak
This massive set of changes was triggered by issue #546.
In addition to the better handling of !weak, this also adds some
weak properties in a few places.

* spot/twaalgos/product.cc (product_aux): Throw some exception
if an automaton with t or f acceptance has the !weak property.  This
is a cheap sanity check to help detect algorithms that incorrectly
assumed !weak input would necessarily become !weak output.
* spot/twaalgos/hoa.cc (print_hoa): Likewise, also do not assume
that terminal implies very-weak.
* spot/parseaut/parseaut.yy: Add several diagnostics for similar
cases.  E.g., a one-state automaton cannot be declared as !very-weak.
* tests/core/parseaut.test: Check those new diagnostics.
* spot/twa/twa.cc (twa::intersecting_run): Temporary remove the weak
property by setting it to maybe, not to false.
* spot/twaalgos/minimize.cc, spot/twaalgos/parity.cc,
spot/twaalgos/sccfilter.cc, spot/twaalgos/simulation.cc: Account for
the fact that these algorithm may in fact improve the weakness.
* spot/twaalgos/strength.cc: Only look at colors used by the
acceptance condition when deciding weakness.
* spot/twaalgos/synthesis.cc: Declare the strategy as weak.
* bin/randaut.cc: Add weak to automata with t/f acceptance.
* spot/kripke/kripke.hh: Make kripke structures as weak.
* tests/core/acc_word.test, tests/core/alternating.test,
tests/core/complement.test, tests/core/complete.test,
tests/core/ltlsynt.test, tests/core/randomize.test,
tests/core/readsave.test, tests/core/remfin.test,
tests/core/sccsimpl.test, tests/core/strength.test,
tests/core/wdba2.test, tests/ltsmin/kripke.test,
tests/python/automata-io.ipynb, tests/python/automata.ipynb,
tests/python/dbranch.py, tests/python/highlighting.ipynb,
tests/python/kripke.py, tests/python/ltsmin-dve.ipynb,
tests/python/mealy.py, tests/python/simstate.py: Adjust all these test
cases.
* NEWS: Mention the fixes.
2023-11-10 23:38:25 +01:00
Alexandre Duret-Lutz
890423936f dot: improve output to work around GraphViz bug
The related GraphViz issue is
https://gitlab.com/graphviz/graphviz/-/issues/2179

* spot/twaalgos/dot.cc: Avoid initial newline in title.
* NEWS: Mention the bug.
* tests/core/det.test, tests/core/dstar.test,
tests/core/neverclaimread.test, tests/python/automata-io.ipynb: Adjust
test cases.
2022-01-11 22:19:20 +01:00
Alexandre Duret-Lutz
9d7e6386e4 python: reduce automata width to prevent overflows with Jupyter
* python/spot/__init__.py (setup): Reduce the default maximal width of
automata so that Jupyter output does not add an horizontal scroll bar
for a few pixels.
* tests/python/automata-io.ipynb: Adjust.
2020-09-17 11:21:06 +02:00
Alexandre Duret-Lutz
6cec43294d dot: name the digraph
* spot/twaalgos/dot.cc: Here.
* NEWS: Mention the change.
* tests/core/alternating.test, tests/core/det.test,
tests/core/dstar.test, tests/core/monitor.test,
tests/core/neverclaimread.test, tests/core/readsave.test,
tests/core/sccdot.test, tests/core/tgbagraph.test,
tests/python/_altscc.ipynb, tests/python/_autparserr.ipynb,
tests/python/alternation.ipynb, tests/python/atva16-fig2a.ipynb,
tests/python/atva16-fig2b.ipynb, tests/python/automata-io.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/product.ipynb,
tests/python/randaut.ipynb, tests/python/satmin.ipynb,
tests/python/stutter-inv.ipynb, tests/python/testingaut.ipynb,
tests/python/word.ipynb: Adjust test cases.
2018-04-07 18:58:58 +02:00
Alexandre Duret-Lutz
2a308182db dot: make "a" the default
Fixes #319.

* spot/twaalgos/dot.cc: Enable "a" by default.
* bin/common_aoutput.cc, NEWS: Document it.
* doc/org/autfilt.org, doc/org/concepts.org, doc/org/dstar2tgba.org,
doc/org/hierarchy.org, doc/org/ltl2tgba.org, doc/org/oaut.org,
doc/org/randaut.org, doc/org/satmin.org, doc/org/tut23.org,
doc/org/tut24.org, doc/org/tut30.org, doc/org/tut31.org: Adjust or
simplify the documentation.
* tests/core/det.test, tests/core/dstar.test, tests/core/monitor.test,
tests/core/neverclaimread.test, tests/core/readsave.test,
tests/core/tgbagraph.test, tests/core/wdba.test,
tests/python/_autparserr.ipynb, tests/python/automata-io.ipynb,
tests/python/automata.ipynb, tests/python/highlighting.ipynb
tests/python/ltsmin-dve.ipynb, tests/python/ltsmin-pml.ipynb,
tests/python/product.ipynb, tests/python/testingaut.ipynb,
tests/python/word.ipynb: Adjust test cases.
2018-03-10 23:23:51 +01:00
Alexandre Duret-Lutz
6bad8aebdd python: remove error recovery checks from the public notebooks
* tests/python/_autparserr.ipynb: New files, containing error
checking code from automata-io.ipynb and piperead.ipynb.
* tests/python/automata-io.ipynb: Remove error checks, and pipe
examples from piperead.ipynb.
* tests/python/piperead.ipynb: Delete.
* tests/python/word.ipynb: Move error checking code...
* tests/python/_word.ipynb: ... in this new file.
* doc/org/tut.org, tests/Makefile.am: Adjust.
2018-01-07 16:22:46 +01:00
Alexandre Duret-Lutz
58e64e752c python: upgrade notebook format to v4
Fixes #311.

* tests/python/ipnbdoctest.py: Adjust to process the new format,
with a lot of inspiration from Vcsn's copy of this file.
* tests/python/_altscc.ipynb, tests/python/_aux.ipynb,
tests/python/acc_cond.ipynb, tests/python/accparse.ipynb,
tests/python/alternation.ipynb, tests/python/atva16-fig2a.ipynb,
tests/python/atva16-fig2b.ipynb, tests/python/automata-io.ipynb,
tests/python/automata.ipynb, tests/python/decompose.ipynb,
tests/python/formulas.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/piperead.ipynb, tests/python/product.ipynb,
tests/python/randaut.ipynb, tests/python/randltl.ipynb,
tests/python/stutter-inv.ipynb, tests/python/testingaut.ipynb,
tests/python/word.ipynb: Upgrade to the new format.
* NEWS: Mention the change.
2018-01-07 12:59:59 +01:00
Alexandre Duret-Lutz
fbb9e4374e dot: add x option for dot2tex
* spot/twa/acc.cc, spot/twa/acc.hh: Add a LaTeX output for acceptance
conditions.
* spot/twaalgos/dot.cc: Implement the 'x' option and refactor the code
a bit to limit duplication.
* tests/core/dot2tex.test: New test case (requires dot2tex).
* tests/Makefile.am: Add dot2tex.test.
* tests/core/alternating.test, tests/core/readsave.test,
tests/python/automata-io.ipynb: Adjust expected output.
* NEWS, doc/org/oaut.org: Mention the new option.
2017-08-31 19:50:08 +02:00
Alexandre Duret-Lutz
e041db6101 dot: extend the palette from 9 to 16 colors
Let's close #212 even if this does not cover the 32 sets.

* spot/twaalgos/dot.cc: Change the palette.
* doc/org/autfilt.org, NEWS: Adjust documentation.
* tests/core/alternating.test, tests/core/readsave.test,
tests/core/tgbagraph.test, tests/python/_altscc.ipynb,
tests/python/alternation.ipynb, tests/python/atva16-fig2a.ipynb,
tests/python/automata-io.ipynb, tests/python/automata.ipynb,
tests/python/decompose.ipynb, tests/python/gen.ipynb,
tests/python/highlighting.ipynb, tests/python/ltsmin-dve.ipynb,
tests/python/piperead.ipynb, tests/python/product.ipynb,
tests/python/randaut.ipynb, tests/python/word.ipynb: Adjust
test cases.
2017-08-03 14:32:11 +02:00
Alexandre Duret-Lutz
77b0b5b3fe dot: add option C(COLOR)
This fixes the output gliches visible in the previous patches,
where highlighting a state would remove its fill color.

* spot/twaalgos/dot.cc, spot/taalgos/dot.cc: Implement option C(COLOR).
* bin/common_aoutput.cc, doc/org/oaut.org: Document it.
* doc/org/.dir-locals.el.in, doc/org/init.el.in,
python/spot/__init__.py: Use it.
* tests/python/automata-io.ipynb, tests/python/automata.ipynb,
tests/python/highlighting.ipynb: Test it.
* tests/core/readsave.test: Adjust.
* NEWS: Mention recent changes.
2016-02-05 19:26:38 +01:00
Alexandre Duret-Lutz
215fcb799a Make spot.py a python package instead of a module
* python/spot.py, python/spot_impl.i: Rename as...
* python/spot/__init__.py, python/spot/impl.i: ... these.
* python/Makefile.am, tests/run.in: Adjust for new paths.
* tests/python/automata-io.ipynb, tests/python/automata.ipynb,
tests/python/decompose.ipynb, tests/python/piperead.ipynb,
tests/python/testingaut.ipynb: Adjust messages to refer to spot.impl
instead of spot_impl.
2016-01-26 19:20:26 +01:00
Alexandre Duret-Lutz
5cb94a1a3f Merge the core and python tests in the tests/ directory
* tests/: Rename as...
* tests/core/: ... this.
* python/tests/: Rename as...
* tests/python/: ... this.
* python/tests/run.in: Move as...
* tests/run.in: This, and adjust.
* tests/Makefile.am: Adjust to run both core and python tests.
* configure.ac, README, debian/python3-spot.examples, debian/rules,
doc/org/tut.org, python/Makefile.am, spot/ltsmin/Makefile.am,
spot/ltsmin/kripke.test, spot/sanity/ipynb.test: Adjust.
2016-01-04 16:02:30 +01:00
Renamed from python/tests/automata-io.ipynb (Browse further)