Commit graph

554 commits

Author SHA1 Message Date
Alexandre Duret-Lutz
9b18729721 stutter: detect stutter-invariance at the state level
* spot/twaalgos/stutter.cc, spot/twaalgos/stutter.hh: Implement
stutter-invariance detection at the state level.
* python/spot/impl.i: Instantiate std::vector<bool>
* tests/python/stutter-inv-states.ipynb: New file.
* tests/Makefile.am, doc/org/tut.org: Add it.
2017-10-11 15:01:29 +02:00
Alexandre Duret-Lutz
b4963a7a6c genaut: fix ks_nca
* spot/gen/automata.cc (ks_nca): The output is complete.
* tests/core/genaut.test: Add test.
* NEWS: Mention the bug.
2017-10-11 14:36:33 +02:00
Alexandre Duret-Lutz
33af116fb8 ltldo: add support for -n
Fixes #287.

* bin/ltldo.cc: Implement it.
* tests/core/ltldo.test: Test it.
* NEWS: Mention the new feature.
2017-10-05 17:17:57 +02:00
Alexandre Duret-Lutz
f0dc9d44c9 tests: speed up two slow tests
These were the most expansive tests, each taking more than 5min.
This should bring them back below 1min.

* tests/core/parity.test: Do not run through valgrind.
* tests/python/toweak.py: Remove one very long case.
2017-09-29 11:06:15 +02:00
Alexandre Duret-Lutz
900b344c9a degen: detect superfluous SCCs and remove them
Suggested by Maximilien Colange.

* spot/twaalgos/degen.cc: If the output has more SCC than the input,
detect useless SCCs and remove them.
* spot/twaalgos/postproc.cc, spot/twaalgos/postproc.hh,
spot/twaalgos/degen.hh: Add support for a degen-remscc option.
* bin/spot-x.cc, NEWS: Document it.
* tests/core/degenscc.test: New file.
* tests/Makefile.am: Add it.
* tests/core/det.test: Lower some expected size (yay!).
2017-09-29 11:06:01 +02:00
Alexandre Duret-Lutz
ce5e3b654f simulation: incorrect setting of non-deterministic property
Fixes #286.

* spot/twaalgos/simulation.cc: Only set the deterministic
property, not the non-deterministic one.
* tests/core/ltl2tgba.test: Add test case.
* NEWS: Mention the issue.
2017-09-28 20:47:47 +02:00
Thibaud Michaud
a13a4e7d23 remove universal transitions on the fly
* spot/twaalgos/alternation.cc, spot/twaalgos/alternation.hh: Implement
remove_univ_otf.
* tests/python/alternating.py: Test it.
* python/spot/impl.i: Bindings.
* NEWS: Document it.
2017-09-27 19:30:42 +02:00
Alexandre Duret-Lutz
a2cbf0af3a sanity: also check the 80-column limit in bin
* tests/sanity/80columns.test: Check bin sources.
* bin/ltlsynt.cc: Fix it.
2017-09-26 21:46:42 +02:00
Alexandre Duret-Lutz
69daf9c261 bin: make sure that all options are in a named section
This also fixes some empty lines and unsorted options
that appeared in some tools.

* tests/sanity/bin.test: Ensure this is done.
* bin/README: Add a new paragraph about this.
* bin/autcross.cc, bin/ltlcross.cc: Move the
output options in their own section.
* bin/common_color.cc: Assume color options are
in group -15.
* bin/common_finput.cc, bin/common_finput.hh:
Add a headless variant.
* bin/genltl.cc, bin/ltlfilt.cc, bin/ltlgrind.cc,
bin/randaut.cc, bin/randltl.cc:  Do not force the
children groups, so that the options are correctly sorted.
* bin/ltlsynt.cc: Add missing groups.
2017-09-26 21:28:16 +02:00
Alexandre Duret-Lutz
002e6ed96b formula: fix building of {a->c[*]}
Fixes #285, reported by Florian Perlié-Long.

* NEWS: Mention the issue.
* spot/tl/formula.cc: Fix it.
* tests/core/kind.test: Document it.
* THANKS: Add Florian.
2017-09-26 17:32:54 +02:00
Alexandre Duret-Lutz
f81fb31136 streett_to_generalized_buchi: fix incorrect algorithm
Fixes #284, reported by Juraj Major.

* spot/twaalgos/totgba.cc: Fix the algorithm.
* spot/twa/acc.hh: More doc for future generations.
* tests/core/scc.test: More test cases.
* NEWS: Mention the issues.
2017-09-26 17:22:56 +02:00
Alexandre Duret-Lutz
210046e8cd tests: avoid some superfluous calls to remove_alternation()
* tests/python/toweak.py: Here.
2017-09-26 10:39:47 +02:00
Maximilien Colange
2697fcddbf Fix a bug in scc_info, and clarify documentation
* spot/twaalgos/sccinfo.hh, spot/twaalgos/sccinfo.cc: Implement it
* tests/python/sccinfo.py: Test it
* NEWS: Document the fix
2017-09-25 15:28:33 +02:00
Thibaud Michaud
d6ae7af5f5 ltlsynt: translate winning strategy to AIGER
* bin/ltlsynt.cc: Here.
* doc/org/ltlsynt.org: Document it.
* tests/core/ltlsynt.test: Test it.
2017-09-25 12:23:47 +02:00
Laurent XU
7a11842613 parity: add spot::parity_product_or()
parity_product_or constructs the sum of two parity automata and it keeps
the parity.

* spot/twaalgos/parity.cc, spot/twaalgos/parity.hh: Here.
* tests/core/parity.cc: Add tests here.
2017-09-25 12:10:14 +02:00
Laurent XU
b92320cc33 parity: add spot::parity_product()
Compute the synchronized product of two parity automata, this product
keeps the parity acceptance.

* spot/twaalgos/parity.cc, spot/twaalgos/parity.hh: Here
* tests/core/parity.cc: Add tests for spot::parity_product()
2017-09-25 12:10:14 +02:00
Laurent XU
3e650f18d9 parity: add spot::cleanup_parity_acceptance()
Merge the acceptance sets of a parity acceptance with the same priority
level to simplify this acceptance.

* spot/twaalgos/parity.cc, spot/twaalgos/parity.hh: Here
* tests/core/parity.cc: Add tests for spot::cleanup_parity_acceptance()
2017-09-25 12:10:14 +02:00
Laurent XU
0bf0a99d6d parity: add spot::colorize_parity()
These functions colorize automata with parity acceptance. They output
parity automata.

* spot/twaalgos/parity.cc, spot/twaalgos/parity.hh: Here
* tests/core/parity.cc: Add tests for spot::colorize_parity()
* tests/python/parity.ipynb: Add documentation about
spot::colorize_parity()
2017-09-25 12:10:14 +02:00
Laurent XU
27982fb80f parity: add spot::change_parity()
This function changes the parity acceptance of an automaton.

* spot/twaalgos/parity.cc, spot/twaalgos/parity.hh: Here
* python/spot/impl.i: Add spot/twaalgos/parity.hh
* spot/twaalgos/Makefile.am: Add spot/twaalgos/parity.{cc,hh}
* tests/core/parity.cc, tests/core/parity.test: Add
spot::change_parity() tests
* tests/python/parity.ipynb: Add documentation about
spot::change_parity()
* tests/Makefile.am: Add tests/core/parity.{cc,hh} and
tests/python/parity.ipynb
* doc/org/tut.org: Add the html page of tests/python/parity.ipynb
2017-09-25 12:10:14 +02:00
Alexandre Duret-Lutz
5e5a69488e twa_graph: do not order BDDs by IDs in merge_edges()
Fixes #282.

* spot/misc/bddlt.hh (bdd_less_than_stable): New function.
* spot/twa/twagraph.cc (merge_edges): Use it.
* tests/core/genltl.test: Adjust, and add an extra test
for the behavior of #282.
* tests/core/complement.test, tests/core/degenid.test,
tests/core/ltldo.test, tests/core/prodor.test,
tests/core/readsave.test, tests/core/sbacc.test,
tests/python/atva16-fig2a.ipynb, tests/python/automata.ipynb,
tests/python/decompose.ipynb, tests/python/dualize.py,
tests/python/highlighting.ipynb, tests/python/piperead.ipynb,
tests/python/product.ipynb, tests/python/simstate.py,
tests/python/tra2tba.py: Adjust all expected outputs.
* NEWS: Mention the bug.
2017-09-24 16:47:49 +02:00
Maximilien Colange
1689c08e09 genltl: add a new family from SYNTCOMP'2017
* bin/genltl.cc, spot/gen/formulas.cc, spot/gen/formulas.hh: Implement
  it.
* tests/core/genltl.test: Test it.
* NEWS: Document it.
2017-09-22 10:35:24 +02:00
Alexandre GBAGUIDI AISSE
f2616069be twaalgos/cobuchi: Add dnf_to_nca() method
* NEWS: Update.
* spot/twaalgos/cobuchi.hh: Declare dnf_to_nca().
* spot/twaalgos/cobuchi.cc: Implement it.
* tests/core/dca.test: Add tests.
2017-09-19 17:37:00 +01:00
Alexandre GBAGUIDI AISSE
50e99cdca7 twaalgos/totgba: Add dnf_to_streett() method
* NEWS: Update.
* spot/twaalgos/totgba.hh: Declare dnf_to_streett().
* spot/twaalgos/totgba.cc: Implement dnf_to_streett().
* bin/autfilt.cc: Add --dnf-to-streett cmd line option.
* tests/core/dnfstreett.test: Add test.
* tests/Makefile.am: Add test file.
2017-09-19 17:37:00 +01:00
Alexandre GBAGUIDI AISSE
cf18c06940 twaalgos/cobuchi: Add nsa_to_nca()
* NEWS: Update.
* spot/twaalgos/cobuchi.hh: Declare to_dca() and nsa_to_nca().
* spot/twaalgos/cobuchi.cc: Implement them.
* python/spot/impl.i: Include new file for python bindings.
* spot/twaalgos/Makefile.am: Add new file.
* bin/autfilt.cc: Add --dca command line option. This option does not
return a deterministic automaton yet, but it will.
* tests/core/dca.test: Add tests for Büchi automata.
* tests/python/dca.py: Add a python script that builds a nondet. Streett
automaton.
* tests/python/dca.test: Add tests for Streett automata.
* tests/Makefile.am: Add all tests.
2017-09-19 17:37:00 +01:00
Alexandre Duret-Lutz
7eb50bc1f8 genltl: add 4 new families from Müller & Sickert (GandALF'17)
* spot/gen/formulas.cc, spot/gen/formulas.hh, bin/genltl.cc:
Implement them.
* NEWS, bin/man/genltl.x: Document them.
* tests/core/genltl.test: Add some tests.
2017-09-15 22:32:04 +02:00
Alexandre Duret-Lutz
86e61089ea * tests/core/dot2tex.test: Work around dot2tex 2.9.0. 2017-09-06 11:10:22 +02:00
Clément Gillard
ad3588420c fix typos and indentation
* bin/autfilt.cc, python/spot/__init__.py, spot/twa/twa.hh,
spot/twa/twaproduct.cc, spot/twaalgos/couvreurnew.cc,
tests/python/bugdet.py: Here.
2017-09-05 13:23:01 +02:00
Alexandre Duret-Lutz
bc626788af dot: make 'x' compatible with 'b'/'r'/'R'
* spot/twaalgos/dot.cc: Implement.
* doc/org/oaut.org: Illustrate.
* tests/core/dot2tex.test: Add some limited tests.
2017-09-05 07:45:11 +02:00
Alexandre Duret-Lutz
e452e09ff7 bin: make --stats and --format synonyms
* bin/common_output.cc: Make --stats an alias of --format.
* bin/common_aoutput.cc: Make --format an alias of --stats.
* tests/core/acc2.test, tests/core/format.test: Test these aliases.
* NEWS: Mention this.
2017-09-04 17:42:13 +02:00
Alexandre Duret-Lutz
e7df182a30 gen: rename KS_COBUCHI to KS_NCA for consistency
* spot/gen/automata.cc, spot/gen/automata.hh, bin/genaut.cc: Rename
the enum, function, and command-line option.
* tests/core/genaut.test, tests/python/gen.ipynb, tests/python/gen.py:
Adjust test cases.
* doc/org/genaut.org: Adjust doc.
2017-09-03 15:47:27 +02:00
Alexandre Duret-Lutz
6cd6802ace simplify: rewrite GF(a & Fb) as G(Fa & Fb)
This addresses part of #35, and is just a generalization of the rules
from 646c5170 for #263 (hence, no new documentation).

* spot/tl/simplify.cc: Implement this.
* tests/core/reduccmp.test: Add test cases.
* tests/core/stutter-tgba.test: Adjust to expect smaller automata.
2017-09-02 20:02:20 +02:00
Alexandre Duret-Lutz
e8527d5ae9 Improve simplification of expr[*0..1]
Fixes #108.

* spot/tl/simplify.cc: Implement the reduction.
* doc/tl/tl.tex, NEWS: Document it.
* tests/core/reduccmp.test: Test it.
2017-09-02 16:35:18 +02:00
Alexandre Duret-Lutz
190d4cfaf1 ltl2tgba_fm: implement a small optimization
Fixes #277.

* spot/twaalgos/ltl2tgba_fm.cc: Improve the translation of f U g
when f is universal.  Suggested by Maximilien Colange.
* tests/core/ltl2tgba.test: Test it.
2017-09-02 14:48:52 +02:00
Alexandre Duret-Lutz
42abcf8559 genltl: add --gxf-and and --fxg-or
As suggested in #263.

* spot/gen/formulas.cc, spot/gen/formulas.hh, bin/genltl.cc: Implement
these options.
* tests/core/genltl.test: Use them.
* NEWS: Mention them.
2017-09-02 11:51:54 +02:00
Alexandre Duret-Lutz
646c5170ed simplify: some new simplification rules
For #263, reported by Mikuláš Klokočka.

G(a & Xe1 & F(b & e2)) = G(a & e1 & Fb & e2)
F(a | Xu1 | G(b | u2)) = F(a | u1 | Gb | u2)

* spot/tl/simplify.cc: Implement the rules.
* doc/tl/tl.tex, NEWS: Document them.
* tests/core/reduccmp.test, tests/core/eventuniv.test: Add test cases.
* tests/core/det.test, tests/core/ltl2tgba2.test: Adjust to expect
smaller automata.
* THANKS: Add Mikuláš.
2017-09-02 11:27:04 +02:00
Alexandre Duret-Lutz
f7ba490898 streett_to_generalize_buchi: fix handling of SCCs without Fin
The generalization to Streett-like of 7b5b8f34 was incomplete for this
case.  Thanks to František Blahoudek for reporting the bug.
Fixes #279.

* spot/twaalgos/totgba.cc (streett_to_generalized_buchi): Here.
* tests/core/remfin.test: Add more tests.
2017-09-01 22:09:49 +02: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
b242122ce8 dot: add option 'A' to disable 'a'
This way in 2.5 we can make 'a' the default, and tell people to use
SPOT_DOTDEFAULT=A if they want the old behavior in both 2.4 and 2.5.

* spot/twaalgos/dot.cc: Implement the option.
* NEWS, bin/common_aoutput.cc: Mention it.
* tests/core/readsave.test: Test it.
2017-08-30 16:15:53 +02:00
Alexandre Duret-Lutz
205294c2c2 dot: display Rabin-like and Streett-like acceptances
* spot/twaalgos/dot.cc (print_acceptance_for_human): Add Rabin-like
and Streett-like checks.
* tests/core/sccdot.test, tests/python/decompose.ipynb,
tests/python/randaut.ipynb, tests/core/alternating.test: Adjust.
2017-08-30 16:15:48 +02:00
Maximilien Colange
f58f61b302 Improve tests of spot.dualize()
* tests/python/dualize.py: test that an automaton and its dual have
  complementary languages.
2017-08-29 11:57:06 +02:00
Maximilien Colange
1b2f2a79c1 Fix a bug in spot.complete()
spot.complete() could complete an empty co-Büchi automaton into an
automaton accepting everything.

* NEWS: Document it
* spot/twaalgos/complete.cc: Fix it
* tests/core/complete.test, tests/core/prodor.test: Test it
2017-08-28 17:55:32 +02:00
Alexandre Duret-Lutz
b7d54c8b90 mention autcross in arch.tex
* doc/org/arch.tex: Add autcross.
* tests/sanity/bin.test: Make sure all binaries appear in arch.tex.
2017-08-17 15:21:59 +02:00
Alexandre Duret-Lutz
1cc45b2413 dot: display acceptance names
* spot/twaalgos/dot.cc: Display common acceptance names.
* NEWS: Mention the change.
* doc/org/oaut.org: Adjust text.
* tests/core/alternating.test, tests/core/readsave.test,
tests/python/_altscc.ipynb, tests/python/alternation.ipynb,
tests/python/atva16-fig2a.ipynb, tests/python/atva16-fig2b.ipynb,
tests/python/automata.ipynb, tests/python/decompose.ipynb,
tests/python/gen.ipynb, tests/python/highlighting.ipynb,
tests/python/product.ipynb, tests/python/randaut.ipynb: Adjust test
cases.
2017-08-17 15:21:59 +02:00
Alexandre Duret-Lutz
f8ef06acc6 acc: fix operator| and operator&
Bug introduced in abe2c08b, visible in tests/python/product.ipynb,
and tests/python/acc_cond.ipynb.

* spot/twa/acc.hh: fix operator| and operator&.
* tests/python/acc_cond.ipynb: Adjust test case.
2017-08-17 15:21:59 +02:00
Thomas Medioni
4b5606e742 to_weak_alternating(): fixes a bug on generalized co-Büchi automata
Fixes #278. Also adds a test ensuring non-regression.

* spot/twaalgos/toweak.cc: Fixes the bug.
* tests/python/toweak.py: Add a test case.
2017-08-17 13:07:20 +02:00
Alexandre Duret-Lutz
df04c715cf remove_fin: fix incorrect state-based output
* spot/twaalgos/remfin.cc: If no Inf set is used, set sbacc early so
that it is used in the algorithm.
* tests/core/remfin.test: Add more tests.
* NEWS: Mention the bug.
2017-08-09 18:25:36 +02:00
Thomas Medioni
30a68d288b Fix typo automatons -> automata
* NEWS, spot/twaalgos/dualize.cc, spot/twaalgos/dualize.hh,
  spot/twaalgos/langmap.cc, spot/twaalgos/sum.hh,
  tests/python/streett_totgba.py: Fixes typo.
2017-08-09 15:51:23 +02:00
Alexandre Duret-Lutz
59c0f08278 * tests/core/optba.test: Use set -x. 2017-08-08 15:00:33 +02:00
Alexandre Duret-Lutz
1cf5778faa stats: allow counting complete SCCs
* bin/common_aoutput.cc, NEWS: Update documentation.
* spot/twaalgos/stats.cc: Honor c and C.
* tests/core/alternating.test: Test it.
2017-08-04 17:01:03 +02:00
Alexandre Duret-Lutz
223b0c6a9e is_weak_scc and friend: make them work for alternating automata
* spot/twaalgos/isweakscc.cc, spot/twaalgos/isweakscc.hh,
spot/twaalgos/mask.cc, spot/twaalgos/mask.hh: Adjust to
work with alternating automata.
* spot/twaalgos/sccinfo.cc, spot/twaalgos/sccinfo.hh
(determine_unknown_acceptance): Do not complain about
not supporting alternating automata if there is not
indeterminate acceptance.
* spot/twaalgos/stats.cc: Fix a bug were %[iw]c was
read as %[iww]c.
* tests/core/alternating.test: Test is_inherently_weak_scc() and
is_weak_scc().
* python/spot/impl.i: Add missing python bindings
for isweakscc.hh.
2017-08-04 15:12:27 +02:00