Commit graph

4503 commits

Author SHA1 Message Date
Laurent XU
cb7e43cb7d parity: remove history matrices in parity_product()
The history matrix of size n*m is replaced by couples of vectors with a
total size of n + m. These couples of vectors are simplified
representations of the history matrices, they ecnode the exact same
data. They are cached as well as the method to get the next history
matrix using the acc_sets and the current history matrix.

* spot/twaalgos/parity.cc: 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
Laurent XU
b7ef7c55d7 misc: add spot::is_colored()
This function checks whether an automaton is colored, an automaton
is said to be colored iff all the transitions belong to exactly one
acceptance set.

* spot/twaalgos/iscolored.cc, spot/twaalgos/iscolored.hh: Here.
* spot/twaalgos/Makefile.am: add spot/twaalgos/iscolored.{cc,hh}
* python/spot/impl.i: add spot/twaalgos/iscolored.hh
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
Alexandre Duret-Lutz
2bca21f7f8 postproc: fix a comment
* spot/twaalgos/postproc.cc: Here.
2017-09-24 16:09:29 +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
96974f7c97 bin/ltlfilt: Use is_persistence() and is_recurrence()
* bin/ltlfilt.cc: Use them.
2017-09-20 15:25:31 +01:00
Alexandre GBAGUIDI AISSE
c827f75c37 hierarchy: Add is_persistence() and make is_recurrence() use it
* NEWS: Update.
* bin/man/spot-x.x: Add environment variable.
* spot/tl/hierarchy.cc: Implement them.
* spot/tl/hierarchy.hh: Declare them.
2017-09-20 15:25:31 +01:00
Alexandre GBAGUIDI AISSE
e59274b609 hierarchy: Make is_recurrence() public
* NEWS: Declare it.
* spot/tl/hierarchy.cc: Remove static keyword and anonymous namespace.
* spot/tl/hierarchy.hh: Declare function.
2017-09-19 17:37:00 +01:00
Alexandre GBAGUIDI AISSE
8cf542644c ltlfilt: Add %r and %R format options
* NEWS: Declare new options.
* bin/common_output.cc: Add new options.
* bin/common_output.hh: Add new options.
* bin/genltl.cc: Update.
* bin/ltlfilt.cc: Update.
* bin/ltlgrind.cc: Update.
* bin/randltl.cc: Update.
2017-09-19 17:37:00 +01:00
Alexandre GBAGUIDI AISSE
ad9bc644ba misc/timer: Gather handling of %r and %R options
* bin/autcross.cc: Update.
* bin/autfilt.cc: Update.
* bin/common_aoutput.cc: Gather them. Move process_timer struct.
* bin/common_aoutput.hh: Gather them.
* bin/common_output.hh: Update.
* bin/dstar2tgba.cc: Update.
* bin/ltl2tgba.cc: Update.
* bin/ltlcross.cc: Update.
* bin/ltldo.cc: Update.
* bin/ltlfilt.cc: Update.
* bin/randaut.cc: Update.
* spot/misc/formater.hh: Remove an useless function.
* spot/misc/timer.hh: Add process_timer struct definition.
* spot/misc/timer.cc: Remove old dead code.
* spot/twaalgos/stats.cc: Update.
* spot/twaalgos/stats.hh: Update.
2017-09-19 17:37:00 +01:00
Alexandre GBAGUIDI AISSE
302095ff9e typos
* spot/twaalgos/alternation.hh: Typos.
* spot/twa/twa.hh: Typos.
2017-09-19 17:37:00 +01:00
Alexandre GBAGUIDI AISSE
8ae10f744f twaalgos/cobuchi: Add dnf_to_dca()
* NEWS: Update news with all co-Büching functions.
* spot/twaalgos/cobuchi.hh: Declare it.
* spot/twaalgos/cobuchi.cc: Implement it.
2017-09-19 17:37:00 +01:00
Alexandre GBAGUIDI AISSE
5f6a71d27a twaalgos/cobuchi: Add breakpoint construction and nsa_to_dca()
* spot/twaalgos/cobuchi.hh: Declare nsa_to_dca().
* spot/twaalgos/cobuchi.cc: Implement nsa_to_dca().
2017-09-19 17:37:00 +01: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 GBAGUIDI AISSE
37c1a19b39 twaalgos/scc_info: Add states_on_acc_cycle_of() method
* NEWS: Update.
* spot/twaalgos/sccinfo.hh: Declare states_on_acc_cycle_of().
* spot/twaalgos/sccinfo.cc: Implement it.
2017-09-19 17:37:00 +01:00
Alexandre GBAGUIDI AISSE
0957317ad7 spot/twa: Add methods to set co-Büchi acceptance
* spot/twa/acc.hh: Add set_generalized_co_buchi() method.
* spot/twa/twa.hh: Add set_generalized_co_buchi() and set_co_buchi()
wrappers.
2017-09-19 17:37:00 +01:00
Alexandre GBAGUIDI AISSE
75d9e5f624 Fix: Remove SBAcc option in bin/ltlfilt
* bin/ltlfilt.cc: Remove SBAcc option as rabin_to_buchi_maybe() works
with transition-based acceptance as well.
2017-09-19 14:54:16 +01:00
Maximilien Colange
bd5c6920b1 Use clearer names for three methods of spot::scc_info
scc_info::used_acc() and spot::info::used_acc_of() have been renamed to
scc_info::marks() and scc_info::marks_of().
scc_info::acc() has been renamed to (the already existing and redundant)
scc_info::acc_sets_of().
Old names have been deprecated.

* spot/twaalgos/sccinfo.hh, spot/twaalgos/sccinfo.cc: implement it.
* spot/twaalgos/dtwasat.cc, spot/twaalgos/isweakscc.cc,
  spot/twaalgos/remfin.cc, spot/twaalgos/sccfilter.cc: update names.
* NEWS: documentate it.
2017-09-19 10:24:12 +02: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
c704c3b019 bin: fix some --help typos
Reported by František Blahoudek.

* bin/genaut.cc, bin/autcross.cc: Fix help strings.
2017-09-07 16:13:28 +02:00
Alexandre Duret-Lutz
1941bac22c org: improve dot2tex conversion to png
* doc/org/oaut.org: Here.
2017-09-06 11:18:34 +02:00
Alexandre Duret-Lutz
86e61089ea * tests/core/dot2tex.test: Work around dot2tex 2.9.0. 2017-09-06 11:10:22 +02:00
Alexandre Duret-Lutz
bfe5753bf9 * NEWS, configure.ac: Bump version to 2.4.0.dev. 2017-09-06 11:05:34 +02:00
Alexandre Duret-Lutz
80621557b2 Release Spot 2.4
* NEWS, configure.ac, doc/org/setup.org: Bump version.
2017-09-05 21:08:48 +02:00
Alexandre Duret-Lutz
f3ef225334 * NEWS: Add a missing entry. 2017-09-05 19:15:50 +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
552afb9d55 * NEWS: Some typos en cleanup. 2017-09-05 11:23:23 +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
290d7b56fb * doc/org/oaut.org: Missing word. 2017-09-04 19:57:40 +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
f726152ebd org: fix one example
* doc/org/genaut.org: Output the result for the last example.
2017-09-04 17:23:07 +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
cd6f1c2c3e get rid of some unnecessary code
* spot/priv/enumflags.hh: Delete.
* spot/priv/Makefile.am, debian/copyright: Adjust.
* spot/twaalgos/remfin.cc: Replace the complex enum
definition by a plain enum that is almost not used.
2017-09-01 22:09:52 +02:00
Alexandre Duret-Lutz
15cc7301cc remove_fin: apply Rabin conversion before Streett
* spot/twaalgos/remfin.cc (remove_fin_impl): Apply the Rabin strategy
before the Streett one.
2017-09-01 22:09:52 +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
7b9cedc697 common_trans: leave the shell handle commands containing = in arg0
This is probably an environment variable definition.

* bin/common_trans.cc: Here.  A use-case appears in the test of the
next patch.
2017-09-01 20:20:36 +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