Commit graph

3601 commits

Author SHA1 Message Date
Alexandre Lewkowicz
e8c428d0a3 safra: Edges to accepting SCC are accepting
*  src/twaalgos/safra.cc, src/twaalgos/safra.hh: Implement optimisation.
Update function calls with new API.
* src/tests/safra.cc, src/tests/safra.test: Use new API.
2016-02-12 14:07:28 +01:00
Alexandre Lewkowicz
f29de22b8a safra: Add bisimulation option
* src/tests/safra.cc, src/twaalgos/safra.cc,
src/twaalgos/safra.hh: Here.
2016-02-12 14:07:28 +01:00
Alexandre Lewkowicz
64b27a9a26 safra: Add pretty printer for states
* src/tests/safra.cc, src/tests/safra.test: Add options and test.
* src/twaalgos/safra.cc, src/twaalgos/safra.hh: Here.
2016-02-12 14:07:28 +01:00
Alexandre Lewkowicz
64cdd1adc7 safra: Fix the nesting comparision function
* src/twaalgos/safra.cc, src/twaalgos/safra.hh: Here.
2016-02-12 14:07:28 +01:00
Alexandre Lewkowicz
ebe03cf3d0 safra: Fix nesting comparision
* src/tests/safra.cc:  Output error message for wrong ltl formula.
* src/twaalgos/safra.cc:  Default comparision of vector does not
correspond to the desired comparision.
2016-02-12 14:07:28 +01:00
Alexandre Lewkowicz
8362bf3a5f safra: Ensure parity min even acceptance
* src/tests/safra.cc, src/tests/safra.test:  Use HOA format in tests.
* src/twaalgos/safra.cc:  Make sure the number of sets are always odd so
that cycles without any acceptance set are rejected.
2016-02-12 14:07:28 +01:00
Alexandre Lewkowicz
d0d42f86f9 safra: Use sub-transitions during determinization
* src/tests/safra.cc, src/tests/safra.test:  Update results.
* src/twaalgos/safra.cc, src/twaalgos/safra.hh: The use of transitions
resulted in non deterministic automata.  By using sub-transitions the
problem is solved.
2016-02-12 14:07:28 +01:00
Alexandre Lewkowicz
8b1f9d3712 safra: Ensure automata is degeneralized
* src/tests/safra.cc, src/tests/safra.test:  Update it.
* src/twaalgos/safra.cc: Here;
2016-02-12 14:07:28 +01:00
Alexandre Lewkowicz
20fc8b0269 safra: Use std::map to represent macrostates
* src/twaalgos/safra.cc, src/twaalgos/safra.hh: Here.
2016-02-12 14:07:28 +01:00
Alexandre Lewkowicz
3ecdba6094 safra: Add a couple of tests
* src/tests/safra.cc, src/tests/safra.test: New.
2016-02-12 14:07:28 +01:00
Alexandre Lewkowicz
ef3143f048 safra: Output parity acceptance sets
* src/twaalgos/safra.cc, src/twaalgos/safra.hh:  Note that the created
automaton is not a true parity automaton as they are not handled yet
by Spot.
2016-02-12 14:07:28 +01:00
Alexandre Lewkowicz
f2fa92004c safra: handle single accepting set
* src/twaalgos/safra.cc, src/twaalgos/safra.hh: Here.
2016-02-12 14:07:28 +01:00
Alexandre Lewkowicz
496083b14a safra: implement powerset construction
* spot/twaalgos/Makefile.am: Update it.
* src/twaalgos/safra.cc, src/twaalgos/safra.hh: New.
2016-02-12 14:07:28 +01:00
Alexandre Duret-Lutz
064ccd5c05 fix paths mentioning buddy/src/.libs
Those had been incorrectly renamed to buddy/spot/.libs when we rename
the main src/ directory into spot/.  This only affected the setting of
DYLD_LIBRARY_PATH, that used to be needed on Darwin.

* doc/org/.dir-locals.el.in, doc/org/init.el.in, python/ajax/spotcgi.in,
tests/run.in: Fix the PATH.
2016-02-12 14:02:47 +01:00
Alexandre Duret-Lutz
fbdd146565 simplify: add missing recursion
"1 U (a | Fb)" was not always reduced to "F(a | b)".

Fixes #143.

* spot/tl/simplify.cc: Add the missing recurse() call.
* tests/core/reduc0.test: Add a test.
* NEWS: Mention the bug.
2016-02-12 08:18:39 +01:00
Alexandre Duret-Lutz
992c97151c ltldo, ltl2tgba: support %< and %>
* bin/common_aoutput.hh, bin/common_aoutput.cc,
bin/ltl2tgba.cc, bin/ltldo.cc: Add support for %< and %>.
* tests/core/ltl2tgba.test, tests/core/ltldo.test: Test it.
* NEWS: Mention it.
2016-02-12 08:18:15 +01:00
Alexandre Duret-Lutz
86646ac31f bin: fix destruction order of global variables
Fixes #142, reported by Joachim Klein.

* bin/autfilt.cc, bin/ltlfilt.cc, bin/randaut.cc, bin/randltl.cc: Make
sure all global variables that have a destructor are destructed in the
main.  Otherwise they risk being destructed after the library's global
structures are destructed, causing access to freed memory.
* NEWS: Mention the bug.
2016-02-10 19:12:48 +01:00
Alexandre Duret-Lutz
bceb54c80e * spot/ltsmin/ltsmin.cc (format_state): Thinko. 2016-02-09 14:49:28 +01:00
Alexandre Duret-Lutz
a31793960f * tests/ltsmin/modelcheck.cc: Typo when printing accepting run. 2016-02-09 14:49:28 +01:00
Alexandre Duret-Lutz
e146527852 twa_run: add a highlight method
* spot/twaalgos/emptiness.hh, spot/twaalgos/emptiness.cc: Add
the method.
* tests/python/highlighting.ipynb: Add a small test.
2016-02-06 17:10:55 +01: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
23c2cbf46a python: highlighting functions for edges and states
* python/spot/impl.i (highlight_state, highlight_edge): New function.
* python/spot/__init__.py (highlight_states, highlight_edges): New
functions.
* spot/twaalgos/dot.cc: Add a '#' option.
* spot/taalgos/dot.cc: Ignore '#'.
* tests/python/highlighting.ipynb: New file to illustrate everything.
* tests/Makefile.am, doc/org/tut.org: Add it.
2016-02-05 17:29:30 +01:00
Alexandre Duret-Lutz
be4418257e * spot/twaalgos/dot.cc: Rename a variable. 2016-02-05 15:58:41 +01:00
Alexandre Duret-Lutz
348f7cce0b parseaut, dot: install a highlighting framework
* spot/parseaut/parseaut.yy, spot/parseaut/scanaut.ll:
Parse "spot.highlight.edges" and "spot.highlight.states" to
fill the "highlight-edges" and "highlight-states" properties.
* spot/twaalgos/dot.cc: Use these properties to highlight states.
* tests/core/readsave.test: Add a small test.
2016-02-04 23:02:28 +01:00
Alexandre Duret-Lutz
91bb93eeaa parse_acc: cleanup error reporting
* spot/twa/acc.cc: Factor all the error reporting code in a single
place, and improve the error message at end of acceptance.
* tests/core/randaut.test: Add more tests.
2016-02-04 10:48:40 +01:00
Alexandre Duret-Lutz
30b996460c doc: run Doxygen twice to work around its bugs
* doc/Makefile.am: Here.
2016-02-03 22:39:28 +01:00
Alexandre Duret-Lutz
d5bf95c5cb do not build ikwiad, randtgba, and modelcheck by default
Fix #128.

* tests/Makefile.am: Make these check_PROGRAMS.
* bench/emptchk/Makefile.am: Adjust.
* bench/emptchk/README, bench/emptchk/defs.in: Fix paths.
2016-02-03 22:08:02 +01:00
Alexandre Duret-Lutz
8880578e0d * bench/emptchk/pml2tgba.pl: Fix to work with recent Spin. 2016-02-03 22:07:21 +01:00
Alexandre Duret-Lutz
22345d0c67 rename parse_print_test as kripkecat
Fixes #135.

* tests/core/parse_print_test.cc: Rename as...
* tests/core/kripkecat.cc: ... this.
* tests/Makefile.am, tests/core/.gitignore, tests/core/kripke.test,
tests/ltsmin/kripke.test: Adjust.
2016-02-03 21:19:30 +01:00
Alexandre Duret-Lutz
1ca4204ccd Remove obsolete ACLOCAL_AMFLAGS definition.
Fixes #138, reported by Valentin Iovene.

* Makefile.am: Here.
* THANKS: Add Valentin.
2016-02-03 16:51:24 +01:00
Alexandre Duret-Lutz
af96cbca83 * tests/python/ltsmin.ipynb: Erase the model file. 2016-02-03 08:51:37 +01:00
Alexandre Duret-Lutz
35c8beaa3c dot, hoa: enable "k" also for fair_kripke
* spot/twaalgos/dot.cc, spot/twaalgos/hoa.cc: Here.
2016-02-03 08:46:50 +01:00
Alexandre Duret-Lutz
2c67c68766 org: adjust PYTHONPATH after recent python changes
Fixes #137.

* doc/org/.dir-locals.el.in, doc/org/init.el.in: Search python modules
in python/spot as well.
2016-02-02 17:38:58 +01:00
Alexandre Duret-Lutz
aebe6593f9 twa: make acc_ private
* spot/twa/twa.hh: Here.
* spot/ta/ta.hh, spot/twa/taatgba.cc, spot/twa/taatgba.hh,
spot/twa/twagraph.hh, spot/twa/twasafracomplement.cc,
spot/twaalgos/stutter.cc: Adjust.
2016-02-02 17:08:11 +01:00
Alexandre Duret-Lutz
681bb82b8e * doc/Doxyfile.in: Tweak two options. 2016-02-02 17:08:11 +01:00
Alexandre Duret-Lutz
df9a8ad0d1 Add missing documentation in twa.hh
Fixes #136.

* spot/twa/twa.hh: Document almost all members.
2016-02-02 17:08:11 +01:00
Alexandre Duret-Lutz
02b5460b91 dot, hoa: default to "k" for kripke structure
* spot/twaalgos/dot.cc, spot/twaalgos/hoa.cc: If a Kripke
structure is passed, automatically enable the "k" option.
* tests/core/parse_print_test.cc, tests/ltsmin/modelcheck.cc,
tests/python/ltsmin.ipynb: Remove the explicit use of "k".
* NEWS: Mention the change.
2016-02-01 22:12:13 +01:00
Alexandre Duret-Lutz
a9b4560f3d dot: add option "k"
Fixes #134.

* spot/twaalgos/dot.cc: Implement it.
* bin/common_aoutput.cc, spot/twaalgos/dot.hh, NEWS: Document it.
* tests/core/readsave.test, tests/python/ltsmin.ipynb: Test it.
2016-02-01 08:38:45 +01:00
Alexandre Duret-Lutz
5a5f83f468 python: add missing bindings for twa_word and twa_run
Fixes #133.

* python/spot/impl.i: Add bindings for twa_word.  Add a __repr__
for twa_run, and instantiate templates for twa_run's members.
* tests/python/word.ipynb: New file with examples.
* tests/Makefile.am, doc/org/tut.org: Add it.
2016-01-31 21:05:44 +01:00
Alexandre Duret-Lutz
eb0a0b6b34 dot: use circles if state names are all short
* spot/twaalgos/dot.cc: Check for state names sizes.
* tests/core/readsave.test: Test the change.
* tests/core/tgbagraph.test: Adjust.
2016-01-29 13:39:17 +01:00
Alexandre Duret-Lutz
b11c07b351 dot: add a <N option
* spot/twaalgos/dot.cc: Implement it.
* spot/taalgos/dot.cc: Ignore it.
* spot/twaalgos/copy.cc, spot/twaalgos/copy.hh: Add option
to limit the number of states.
* tests/python/ltsmin.ipynb: Improve test case.
* tests/Makefile.am: Cleanup the files generated by ltsmin.ipynb.
* python/spot/__init__.py (setup): Add a max_states argument
that default to 50.
* bin/common_aoutput.cc: Mention the <INT option.
* NEWS: Likewise.
2016-01-29 09:09:05 +01:00
Alexandre Duret-Lutz
4571d6dd3a copy: rewrite as a BFS without using reachiter
* spot/twaalgos/copy.hh: Trim includes.
* spot/twaalgos/copy.cc: Rewrite.
* tests/python/ltsmin.ipynb: Adjust.
2016-01-28 15:37:00 +01:00
Alexandre Duret-Lutz
9b95b697a5 twa: introduce the state_map template alias
* spot/twa/twa.hh: Introduce the type.
* spot/taalgos/emptinessta.cc, spot/taalgos/emptinessta.hh,
spot/taalgos/minimize.cc, spot/taalgos/reachiter.cc,
spot/taalgos/reachiter.hh, spot/taalgos/tgba2ta.cc,
spot/twa/twasafracomplement.cc, spot/twaalgos/dtwasat.cc,
spot/twaalgos/emptiness.cc, spot/twaalgos/gtec/status.cc,
spot/twaalgos/gtec/status.hh, spot/twaalgos/gv04.cc,
spot/twaalgos/magic.cc, spot/twaalgos/minimize.cc,
spot/twaalgos/minimize.hh, spot/twaalgos/reachiter.cc,
spot/twaalgos/reachiter.hh, spot/twaalgos/se05.cc,
spot/twaalgos/tau03.cc, spot/twaalgos/tau03opt.cc: Use it.
2016-01-28 13:15:48 +01:00
Alexandre Duret-Lutz
6230f320bf python: fix installation
* python/Makefile.am: Use nobase_ for installing python files.  This
required removing the $(srcdir) prefix used almost everywhere in this
file, which in turn enabled the use of subdir-objects to remove
an Automake warning.  The downside is that the Makefile probably won't
support VPATH builds with some inferior implementations of Make.
2016-01-28 10:46:55 +01:00
Alexandre Duret-Lutz
c968e7b856 ltl2tgba_fm: fix setting of unambiguous property
Report from Joachim Klein.

* spot/twaalgos/ltl2tgba_fm.cc: Set the property, do not read it.
* tests/core/unambig.test: Add a test.
* NEWS: Mention the bug.
2016-01-26 19:38:50 +01:00
Alexandre Duret-Lutz
a3c2691632 debian: add missing file
* debian/libspotltlsmin0.install: Rename as...
* debian/libspotltsmin0.install: ... this, and
* Makefile.am: Actually distribute it!
2016-01-26 19:21:35 +01:00
Alexandre Duret-Lutz
db1e842a67 ltsmin: add accessors for variable names and types
* spot/ltsmin/ltsmin.hh, spot/ltsmin/ltsmin.cc: Expose more of the
ltsmin interface.
* python/spot/ltsmin.i: Add some helper functions on top of this
new interface.
* tests/python/ltsmin.ipynb: Test them.
* NEWS: Mention it.
2016-01-26 19:21:35 +01:00
Alexandre Duret-Lutz
907b72fbfb ltsmin: implement a two-step loading
* spot/ltsmin/ltsmin.cc, spot/ltsmin/ltsmin.hh: Split load_ltsmin() into
ltsmin_model::load() and ltsmin_model::kripke().  Report errors using
exceptions instead of on std::cerr.
* python/spot/ltsmin.i: Deal with exceptions.
* tests/ltsmin/modelcheck.cc, tests/python/ltsmin.ipynb: Adjust.
2016-01-26 19:21:35 +01:00
Alexandre Duret-Lutz
84031d2ae1 more files to ignore
* python/.gitignore, tests/.gitignore: Here.
2016-01-26 19:21:35 +01:00
Alexandre Duret-Lutz
0c2997990d * tests/run.in: Honor PREFIXCMD even without argument. 2016-01-26 19:21:35 +01:00