Commit graph

4410 commits

Author SHA1 Message Date
Alexandre Duret-Lutz
12f6c8cf10 twa_graph: add a merge_univ_dests() method
and call it after parsing

* spot/twa/twagraph.cc, spot/twa/twagraph.hh
(twa_graph::merge_univ_dests): New method.
* spot/parseaut/parseaut.yy: Call it.
* spot/twaalgos/dot.cc: Improve output, now that
several edges can use the same universal destination.
* tests/core/alternating.test, tests/core/complete.test,
tests/core/parseaut.test, tests/python/_altscc.ipynb,
tests/python/alternating.py, tests/python/alternation.ipynb: Adjust
test case.
* doc/org/tut24.org: Adjust example.
2016-12-29 12:57:53 +01:00
Alexandre Duret-Lutz
3d0a971aa8 org: examples with alternating automata
* doc/org/tut23.org, doc/org/tut24.org, doc/org/tut31.org: New files.
* doc/Makefile.am, doc/org/tut.org: Add them.
* doc/org/hoa.org, doc/org/concepts.org: Adjust for alternation support.
* NEWS: Add links.
2016-12-29 12:57:53 +01:00
Alexandre Duret-Lutz
f5b261d80e remfin: call remove_alternation if needed
* spot/twaalgos/remfin.cc: Here.
* tests/core/alternating.test: Add a test case.
2016-12-29 12:57:53 +01:00
Alexandre Duret-Lutz
071d819c49 complete: add support for alternating autamata
* spot/twaalgos/complete.cc: Do not use the initial
state as a sink if it is universal.
* tests/core/complete.test: Add a test case.
2016-12-29 12:57:53 +01:00
Alexandre Duret-Lutz
f1b8d5f1d4 postproc: preliminary support for alternating automata
* spot/twaalgos/postproc.cc: Call remove_alternation().
* tests/core/alternating.test: Additional test.
2016-12-29 12:57:53 +01:00
Alexandre Duret-Lutz
9f6924ccfb twaalgos: add many guards against alternation
* spot/twa/twagraph.hh, spot/twaalgos/are_isomorphic.cc,
spot/twaalgos/canonicalize.cc, spot/twaalgos/couvreurnew.cc,
spot/twaalgos/cycles.cc, spot/twaalgos/degen.cc,
spot/twaalgos/determinize.cc, spot/twaalgos/isunamb.cc,
spot/twaalgos/isweakscc.cc, spot/twaalgos/mask.hh,
spot/twaalgos/minimize.cc, spot/twaalgos/product.cc,
spot/twaalgos/randomize.cc, spot/twaalgos/sbacc.cc,
spot/twaalgos/sccfilter.cc, spot/twaalgos/simulation.cc:
Throw a runtime_error if the input is alternating.
2016-12-29 12:57:53 +01:00
Alexandre Duret-Lutz
87c9d6f039 ltlcross: add support for alternating automata
* bin/ltlcross.cc: Add an alternation-removal pass, and
adjust CSV output.
* doc/org/ltlcross.org: Update.
* tests/core/ltl3dra.test, tests/core/ltl3ba.test: Add more tests.
* tests/Makefile.am: Add tests/core/ltl3ba.test.
* NEWS: Mention it.
2016-12-29 12:57:53 +01:00
Alexandre Duret-Lutz
543e0db9a0 stats: add a variant for twa_graph_ptr
This is faster than using the abstract interface, and it also supports
alternating automata.  (This will be tested in the tests for
ltlcross's support for alternating automata.)

* spot/twaalgos/stats.cc (stats_reachable, sub_stats_reachable):
Add code specific to twa_graph_ptr.
2016-12-29 12:57:53 +01:00
Alexandre Duret-Lutz
64fa6c0026 remfin: ignore unreachable states in remove_fin_weak()
* spot/twaalgos/remfin.cc (remove_fin_weak): Ignore unreachable
states.  This caused crashes in the test cases for the
upcoming alternation support in ltlcross.
2016-12-29 12:57:53 +01:00
Alexandre Duret-Lutz
326431fd28 * NEWS: Describe experimental alternation support. 2016-12-29 12:57:53 +01:00
Alexandre Duret-Lutz
fa06cfa303 alternation: implement remove_alternation() for weak alt automata
This mixes the subset construction (for 1-state rejecting SCCs) and
the breakpoint construction (for larger rejecting SCCs).  The
algorithm should probably be rewritten in a cleaner and more efficient
way, but that should do for a first version.  It should be easy to
extend it to support Büchi acceptance (since the breakpoint
construction works for this) when we need it.

* spot/twaalgos/alternation.hh,
spot/twaalgos/alternation.cc (remove_alternation): New function.
* tests/python/alternation.ipynb: New file.
* tests/Makefile.am, doc/org/tut.org: Add it.
2016-12-29 12:57:16 +01:00
Alexandre Duret-Lutz
582d455c23 twa: add support for very-weak property
* spot/twa/twa.hh: Implement the property.
* spot/parseaut/parseaut.yy, spot/twaalgos/hoa.cc: Add input
and output for it.
* spot/twaalgos/strength.cc,
spot/twaalgos/strength.hh (is_very_weak_automaton): New function.
* tests/core/alternating.test: Add a test for --check=strength
on an alternating automaton.
* tests/core/strength.test, tests/core/parseaut.test: Adjust expected
output.
* NEWS, doc/org/hoa.org, doc/org/concepts.org: Document it.
2016-12-27 12:36:38 +01:00
Alexandre Duret-Lutz
a4ce999402 sccinfo: adjust to work with alternating automata
* spot/twaalgos/sccinfo.cc: Consider universal edges as if they were
existential edges.
* spot/twaalgos/sccinfo.hh: Document that.
* spot/twaalgos/dot.cc: Allow option 's' again, for easy testing.
* tests/core/alternating.test: Adjust tests.
* tests/python/_altscc.ipynb: New file (more tests).
* tests/Makefile.am: Add it.
2016-12-27 12:36:38 +01:00
Alexandre Duret-Lutz
d2f471da06 parseaut: handle alternating automata with many universal init states
* spot/parseaut/parseaut.yy (fix_initial_state): Use
spot::internal::outgoing_edge_group to reduce all initial states to a
single one.
* tests/core/parseaut.test: Add more tests.
2016-12-27 12:36:38 +01:00
Alexandre Duret-Lutz
27ab631cdc alternation: add a states_and algorithm
This should will come handy to implement the convertion from LTL to
alternating automata, and to handle automata with multiple initial
states.

* spot/twaalgos/alternation.hh, spot/twaalgos/alternation.cc: New files.
* spot/twaalgos/Makefile.am: Add them.
* python/spot/impl.i: Add bindings.
* tests/python/alternating.py: Test states_and.
2016-12-27 12:36:38 +01:00
Alexandre Duret-Lutz
48c812a595 twa_graph: add support for universal initial states
The only missing point is that the HOA parser cannot deal with multiple
universal initial states, as seen in parseaut.test.

* spot/graph/graph.hh (new_univ_dests): New function, extracted from...
(new_univ_edge): ... this one.
* spot/twa/twagraph.hh (set_univ_init_state): Implement using
new_univ_dests.
* spot/twaalgos/dot.cc, spot/twaalgos/hoa.cc, python/spot/impl.i:
Add support for universal initial states.
* spot/parseaut/parseaut.yy: Add preliminary support for
universal initial states.  Multiple universal initial states
are still not supported.
* tests/core/alternating.test, tests/core/parseaut.test,
tests/python/alternating.py: Adjust tests and exercise this new feature.
2016-12-27 12:36:38 +01:00
Alexandre Duret-Lutz
d5c9c34514 dot: add support for alternating automata
* spot/twaalgos/dot.cc: Handle universal destinations.
Ignore option 's' for alternating automata.
* tests/core/alternating.test: New file.
* tests/Makefile.am: Add it.
2016-12-27 12:36:38 +01:00
Alexandre Duret-Lutz
e620368696 parseaut: preliminary support for reading alternating automata
Currently this only reads universal branches.  The parser (and the
automaton code) do not support universal initial states.

* spot/parseaut/parseaut.yy: Read universal branches.  Deal with
the no-univ-branch/!univ-branch change in HOA 1.1.
* tests/python/alternating.py: Read the output of print_hoa.
* tests/core/parseaut.test: Adjust test output, and add more tests.
2016-12-27 12:36:38 +01:00
Alexandre Duret-Lutz
56df459c75 print_hoa: add support for universal branches
* spot/twaalgos/hoa.cc: Implement it.
* tests/python/alternating.py: Test it.
2016-12-27 12:36:38 +01:00
Alexandre Duret-Lutz
6aad559c29 twa_graph: add basic support for alternation
This only allows creating universal edges, and reading the associated
destinations.

* spot/twa/twagraph.hh (new_univ_edges, univ_dests, is_alternating): New
function.
* python/spot/impl.i: Add Python bindings.
* tests/python/alternating.py: New file.
* tests/Makefile.am: Add it.
2016-12-27 12:36:38 +01:00
Alexandre Duret-Lutz
4903f086e3 graph: replace the existing "alternating" interface
* spot/graph/graph.hh: Use the sign bit of destination state X to
designate a universal edge.  Store the destinations of such an edge in a
separate array, at index ~X.
* spot/graph/ngraph.hh, tests/core/graph.cc, tests/core/graph.test,
tests/core/ngraph.cc: Adjust test case to the new interface.
2016-12-27 12:36:38 +01:00
Alexandre Duret-Lutz
dcd21aaabf org: call set_init_state() in tut22
* doc/org/tut22.org: Here.
2016-12-25 12:27:17 +01:00
Alexandre Duret-Lutz
34ac6f08cc org: ltlcross supports any acceptance condition
* doc/org/ltlcross.org: Also fix the documentation of terminal and
weak SCCs.
2016-12-24 21:08:01 +01:00
Alexandre Duret-Lutz
8e8c6a8cea org: support org >= 8.3
* doc/org/.dir-locals.el.in, doc/org/init.el.in: Load "shell" instead
of "sh" for recent org-mode version.
2016-12-24 21:08:01 +01:00
Alexandre Duret-Lutz
2f02911e1a copy: improve documentation
* spot/twaalgos/copy.hh: Make a reference to make_twa_graph().
2016-12-24 21:08:00 +01:00
Alexandre Duret-Lutz
f5a76baa33 strength: improve doc
* spot/twaalgos/strength.hh: Add a verb to the descriptions.
Suggested by Alexandre Gbaguidi Aïsse.
2016-12-16 13:48:28 +01:00
Alexandre Duret-Lutz
f1922325ed * AUTHORS: Add Maximilien. 2016-12-16 08:09:20 +01:00
Alexandre Duret-Lutz
975ec6ff81 Merge branch 'master' into next 2016-12-16 07:03:18 +01:00
Alexandre Duret-Lutz
f8f7c9a537 bump version number
* NEWS, configure.ac: Set version 2.2.2.dev.
2016-12-16 06:58:46 +01:00
Alexandre Duret-Lutz
574f47c366 Release Spot 2.2.2
* NEWS, configure.ac, doc/org/setup.org: Update version.
2016-12-16 06:50:59 +01:00
Alexandre Duret-Lutz
38fdb40eaf spotcgi: correctly kill ltl3ba on timeout
* python/spot/__init__.py (automata): Do not create a session for
every command, this is only needed if automata() is run with a timeout
parameter.
* python/ajax/spotcgi.in: Adjust exclude the main process from
the process group, so that only children are killed on SIGALRM.
* NEWS: Mention the bug.
2016-12-15 22:20:31 +01:00
Alexandre Duret-Lutz
cd34827510 spotcgi: correctly kill ltl3ba on timeout
* python/spot/__init__.py (automata): Do not create a session for
every command, this is only needed if automata() is run with a timeout
parameter.
* python/ajax/spotcgi.in: Adjust exclude the main process from
the process group, so that only children are killed on SIGALRM.
* NEWS: Mention the bug.
2016-12-15 21:57:11 +01:00
Alexandre Duret-Lutz
55eae0d8bc * spot/twa/twa.hh (twa_succ_iterable): Mark move ctor as noexcept. 2016-12-15 11:11:59 +01:00
Maximilien Colange
05f8333e76 Add an option to enable C++14.
* configure.ac: add an option --enable-c++14.
* NEWS: mention the new option.
2016-12-14 09:40:38 +01:00
Maximilien Colange
878649c823 [buddy] Add an option to enable C++14.
* configure.ac: add an option --enable-c++14.
2016-12-13 17:42:22 +01:00
Maximilien Colange
114f7f1200 Default emptiness check is the new version of Couvreur.
* spot/twa/twa.cc: is_empty() and accepting_run() now call the new
version of the Couvreur algorithm.
2016-12-13 16:18:31 +01:00
Maximilien Colange
1a08eca840 Add a new, parameterized, version of the Couvreur emptiness check.
This version has optimization for explicit twa, and also for weak and
terminal (depending on whether an accepting run is requested) automata.

* spot/twaalgos/couvreurnew.hh, spot/twaalgos/couvreurnew.cc,
  spot/twaalgos/Makefile.am: New files for the new algorithm.
* spot/twaalgos/emptiness.cc, tests/core/randtgba.cc:
  Register new algorithm.
2016-12-13 16:18:31 +01:00
Alexandre Duret-Lutz
f0416b3f3c ltsmin: workaround spurious gcc-snapshot warning
* spot/ltsmin/ltsmin.cc: Add an assert.
2016-12-10 21:56:25 +01:00
Alexandre Duret-Lutz
15709084b8 ltlf: ensure alive holds initially
Reported by Shufang Zhu.

* spot/tl/ltlf.cc, spot/tl/ltlf.hh: Fix the transltion
and update the comments.
* tests/core/ltlfilt.test: Adjust test cases.
* NEWS: Mention the fix.
* THANKS: Add Shufang Zhu.
2016-12-10 20:23:07 +01:00
Alexandre Duret-Lutz
413eab1d32 ltlf: ensure alive holds initially
Reported by Shufang Zhu.

* spot/tl/ltlf.cc, spot/tl/ltlf.hh: Fix the transltion
and update the comments.
* tests/core/ltlfilt.test: Adjust test cases.
* NEWS: Mention the fix.
* THANKS: Add Shufang Zhu.
2016-12-09 21:37:15 +01:00
Alexandre Duret-Lutz
7824005d3e install back the safety check of includes.test
Compilation of each header file alone, as a safety check, was removed
when introducing "#pragma once" because we did not have to check for
possible double inclusion.  However we still need to compile each
header to make sure they are self-contained.

* tests/sanity/includes.test: Compile each header.
* tests/run.in: Export various compiler and directory flags.
* spot/twaalgos/emptiness_stats.hh, spot/misc/mspool.hh,
spot/misc/fixpool.hh: Include <spot/misc/common.hh>.
* spot/misc/common.hh: Include <cassert>.
* NEWS: Mention the fixed headers.
2016-12-02 17:59:32 +01:00
Alexandre Duret-Lutz
0ab8dc06c4 install back the safety check of includes.test
Compilation of each header file alone, as a safety check, was removed
when introducing "#pragma once" because we did not have to check for
possible double inclusion.  However we still need to compile each
header to make sure they are self-contained.

* tests/sanity/includes.test: Compile each header.
* tests/run.in: Export various compiler and directory flags.
* spot/twaalgos/emptiness_stats.hh, spot/misc/mspool.hh,
spot/misc/fixpool.hh: Include <spot/misc/common.hh>.
* spot/misc/common.hh: Include <cassert>.
* NEWS: Mention the fixed headers.
2016-12-02 15:03:43 +01:00
Alexandre Duret-Lutz
2198543a7a parseaut: diagnose invalid acceptance terms
* spot/parseaut/parseaut.yy: Add a diagnostic.
* tests/core/parseaut.test: Test it.
* NEWS: Document it.
2016-12-01 22:21:42 +01:00
Alexandre Duret-Lutz
38b82dba9b ltsmin: use any installed libltdl
This should solve issue with the Debian package.

* spot/ltsmin/Makefile.am: Use the LTDLINC, LTDLDEPS and LIBLTDL as
documented.
* NEWS: Mention the fix.
2016-12-01 22:20:46 +01:00
Alexandre Duret-Lutz
3d726fccb2 parseaut: diagnose invalid acceptance terms
* spot/parseaut/parseaut.yy: Add a diagnostic.
* tests/core/parseaut.test: Test it.
* NEWS: Document it.
2016-12-01 18:34:44 +01:00
Alexandre Duret-Lutz
f3b95a8a11 tests: recognize ./run jupyter
* tests/run.in: Here.
2016-12-01 18:34:44 +01:00
Maximilien Colange
e8a3f62491 Fix a sanity check.
* tests/sanity/style.test: Allow parenthesis after 'operator delete'.
2016-12-01 11:58:28 +01:00
Maximilien Colange
9a1e411502 Properly time computations of accepting runs in randtgba.
* tests/core/randtgba.cc: do not time statistics.
2016-12-01 10:54:42 +01:00
Alexandre Duret-Lutz
2b07326217 twa_graph: simplify two precondition checks
* spot/twa/twagraph.hh (state_acc_sets, state_is_accepting): Do not
check num_sets()==0 since this would imply prop_state_acc().
2016-11-30 14:26:30 +01:00
Alexandre Duret-Lutz
034620c521 graph: fix internal iterator constness
* spot/graph/graph.hh: Use only const variants of begin()/end(), since
they do not modify the iterator.
2016-11-30 14:26:30 +01:00