Commit graph

2776 commits

Author SHA1 Message Date
Thibaud Michaud
6400ec852b Add documentation for is_stutter_invariant.
* src/tgbaalgos/stutter_invariance.hh: Add documentation.
2014-11-29 10:53:49 +01:00
Alexandre Duret-Lutz
10c4a92ddb python: fix spot.py script for new acceptance interface
* wrap/python/ajax/spot.in: Adjust to the new interface.
* wrap/python/spot.i: Work around missing support for nested classes.
* wrap/python/tests/ltl2tgba.py, wrap/python/tests/ltl2tgba.test: More
test.
2014-11-27 22:31:56 +01:00
Alexandre Duret-Lutz
c494a347c9 stutter: fiddle with the benchmark
* bench/stutter/stutter_bench.sh: Add headers in the CSV files, and also
run stutter_invariance_randomgraph.
* bench/stutter/stutter_invariance_formulas.cc: Remove space from CSV
output.
* bench/stutter/stutter_invariance_randomgraph.cc: Likewise, plus fix
the call to is_stutter_invariant(), and return an average time.
* bench/stutter/stutter.ipynb: Adjust.
* bench/stutter/README: Simplify.
* bench/stutter/Makefile.am: Distribute the script and python notebook.
2014-11-26 10:38:32 +01:00
Alexandre Duret-Lutz
0beb148b6a * src/tgbaalgos/closure.cc: Fix invalid read. 2014-11-26 10:38:32 +01:00
Thibaud Michaud
ad3ea61ac2 Adding README in bench/stutter/.
* bench/stutter/README: Document stutter-invariance benchmarks.
2014-11-26 10:38:32 +01:00
Thibaud Michaud
94854ac7be Adding ipython notebook to visualize stutter-invariance benchmarks.
* bench/stutter/stutter_bench.sh: Collect benchmarks for different
number of atomic propositions in a single csv file.
* bench/stutter/stutter.ipynb: Visualize benchmarks generated by
stutter_bench.sh.
2014-11-26 10:38:32 +01:00
Alexandre Duret-Lutz
0250a32747 export a create_atomic_prop_set() function
* src/ltlvisit/apcollect.hh,
src/ltlvisit/apcollect.cc (create_atomic_prop_set): New function.
* src/bin/randltl.cc, bench/stutter/stutter_invariance_randomgraph.cc:
Use it.
2014-11-26 10:37:40 +01:00
Alexandre Duret-Lutz
f08a26f7b9 hoa: rename hoaf_reachable() to hoa_reachable()
* src/tgbaalgos/hoaf.cc, src/tgbaalgos/hoaf.hh: Rename to...
* src/tgbaalgos/hoa.cc, src/tgbaalgos/hoa.hh: ... these, and
fix the function names.
* src/tgbaalgos/Makefile.am, src/bin/autfilt.cc,
src/bin/dstar2tgba.cc, src/bin/ltl2tgba.cc, src/tgbatest/ltl2tgba.cc:
Adjust all calls.
2014-11-25 22:02:59 +01:00
Alexandre Duret-Lutz
5b5c5edcf8 * src/ltlparse/ltlscan.ll: Mark as non-interactive. 2014-11-25 21:46:27 +01:00
Alexandre Duret-Lutz
ef5b0417e7 hoa: fix handling of escaped characters in atomic propositions
(No test, this is just a simple backport of a fix from the development
branch, where it is tested.)

* src/tgbaalgos/hoaf.cc: Do not call to_string() to display names, as
this would add another level of escaping.
* NEWS: Mention it.
2014-11-25 16:41:28 +01:00
Alexandre Duret-Lutz
2a71517f5c hoa: more coverage for the parser
* src/tgbatest/hoaparse.test: More tests.
2014-11-25 14:31:56 +01:00
Alexandre Duret-Lutz
12389adf4f hoa: check parsing from stdin
* src/tgbatest/hoaparse.test: More test.
2014-11-25 11:53:34 +01:00
Alexandre Duret-Lutz
fa2ad77078 hoa: test DOS-style input
* src/tgbatest/hoaparse.test: Add test.
2014-11-25 11:44:58 +01:00
Alexandre Duret-Lutz
0d59e55f4d hoa: fix handling of escaped characters in atomic propositions
* src/hoaparse/hoascan.ll: Remove superfluous line.
* src/tgbaalgos/hoaf.cc: Do not call to_string() to display names, as
this would add another level of escaping.
* src/tgbatest/hoaparse.test: Test it.
2014-11-25 11:37:29 +01:00
Alexandre Duret-Lutz
a9fa7d33c5 autfilt: diagnose non-existant files
* src/bin/autfilt.cc: Catch exception.
* src/tgbatest/hoaparse.test: Test it.
2014-11-25 09:00:23 +01:00
Alexandre Duret-Lutz
e7e21ae58f hoa: improve parser and scanner
* src/hoaparse/hoaparse.yy: Improve error reporting
in case labeled edges are mixed with unlabeled edges.
* src/hoaparse/hoascan.ll: Fix handling of nested comments.
* src/tgbatest/hoaparse.test: More coverage.
2014-11-25 08:51:55 +01:00
Alexandre Duret-Lutz
0a21db5c30 * NEWS: Mention the HOA parser. 2014-11-21 17:44:10 +01:00
Alexandre Duret-Lutz
1c8b58d69f hoa: add some error recovery
* src/hoaparse/hoaparse.yy: Here.
* src/tgbatest/hoaparse.test: More tests.
2014-11-21 17:44:10 +01:00
Alexandre Duret-Lutz
4043ad2ccf hoa: diagnose unsupported Headers
* src/hoaparse/hoaparse.yy: Here.
* src/tgbatest/hoaparse.test: Test it.
2014-11-21 17:44:10 +01:00
Alexandre Duret-Lutz
8004dca157 hoa: add support for multiple initial states
* src/hoaparse/hoaparse.yy: Here.
* src/tgbatest/hoaparse.test: Add tests.
2014-11-21 16:07:27 +01:00
Alexandre Duret-Lutz
63abfed108 ltlcross: report aborted HOA files
* src/bin/ltlcross.cc: Here.
* src/tgbatest/ltlcross3.test: Add test case.
2014-11-21 16:07:27 +01:00
Alexandre Duret-Lutz
c12b2d63b3 hoa: add support for --ABORT--
* src/hoaparse/parsedecl.hh (hoa_abort): New structure.
* src/hoaparse/hoascan.ll: Throw hoa_abort on --ABORT--.
* src/hoaparse/hoaparse.yy: Deal with this exception.
* src/hoaparse/public.hh: Add a boolean flag to mark aborted automata.
* src/bin/autfilt.cc: Report aborted automata.
* src/tgbatest/hoaparse.test: Add test case.
2014-11-21 16:07:27 +01:00
Alexandre Duret-Lutz
8c8c2f0b7c hoa: allocate the states once, after parsing the header
* src/hoaparse/hoaparse.yy: Allocate state after parsing the entire
header, not right after passing "States:".
* src/tgbatest/hoaparse.test: Reflect improved error message
about initial state.
2014-11-21 16:07:27 +01:00
Alexandre Duret-Lutz
71d21b378b hoa: support Inf(!x)
* src/hoaparse/hoaparse.yy: Here.
* src/tgbatest/hoaparse.test: More tests.
* src/tgba/acc.hh (operator^=): New method.
2014-11-21 16:07:11 +01:00
Alexandre Duret-Lutz
7a03228880 hoa: add alias support
* src/hoaparse/hoaparse.yy: Here.
* src/tgbatest/hoaparse.test: Test it.
2014-11-21 11:05:24 +01:00
Alexandre Duret-Lutz
691ab05926 hoa: catch redefinition of states
* src/hoaparse/hoaparse.yy: Here.
* src/tgbatest/hoaparse.test: More test.
2014-11-21 10:49:58 +01:00
Alexandre Duret-Lutz
69678152b6 hoa: add support for unlabeled transitions
* src/hoaparse/hoaparse.yy: Here.
* src/tgbatest/hoaparse.test: Add tests.
2014-11-20 19:44:56 +01:00
Alexandre Duret-Lutz
1d962f79ac hoa: make the parser more resilient to errors
* src/hoaparse/hoaparse.yy: Improve error recovery,
and fix location tracking in streams.
* src/hoaparse/public.hh: Store the last location so
that the next parse start at the correct position.
* src/bin/autfilt.cc: Stop parsing a stream on irrecoverable errors.
* src/tgbatest/hoaparse.test: Adjust tests.
2014-11-20 12:29:18 +01:00
Alexandre Duret-Lutz
392c527d31 monitor: add a few tests
* src/tgbatest/monitor.test: New file.
* src/tgbatest/Makefile.am: Add it.
* src/tgbaalgos/minimize.cc (minimize_monitor): Mark
the output automaton as state-based.
* src/tgba/tgbagraph.hh: Assume automata with 0 acceptance sets are also
state-based.
2014-11-20 10:59:56 +01:00
Alexandre Duret-Lutz
6eeb74e15f autfilt, dstar2tgba: fix --help
* src/bin/autfilt.cc, src/bin/dstar2tgba.cc: Do not reference the
formula in --help.
2014-11-20 10:02:29 +01:00
Alexandre Duret-Lutz
131299d03e hoa: make it possible to read a stream of automata
* src/bin/autfilt.cc: Loop over all automata in a file.
* src/hoaparse/public.hh: Turn the parser into an object.
* src/hoaparse/hoaparse.yy: Adjust.
2014-11-19 23:24:09 +01:00
Alexandre Duret-Lutz
5aff262844 autfilt: first stub
* src/bin/autfilt.cc, src/bin/man/autfilt.x: New files.
* src/bin/Makefile.am, src/bin/man/Makefile.am: Add them.
* src/bin/common_post.cc, src/bin/common_post.hh: Adjust.
2014-11-19 23:24:09 +01:00
Alexandre Duret-Lutz
fb0849f43b * src/bin/dstar2tgba.cc: Remove a useless include. 2014-11-19 19:29:29 +01:00
Alexandre Duret-Lutz
622fe08f00 ltlcross: add support for reading TGBA as HOA
* src/bin/ltlcross.cc: Add a %H modifier.
* src/tgbatest/ltlcross2.test: Exercise it.
2014-11-19 19:29:29 +01:00
Alexandre Duret-Lutz
e55bcd95aa hoa: preliminary implementation of a parser
* src/hoaparse/Makefile.am, src/hoaparse/fmterror.cc,
src/hoaparse/hoaparse.yy, src/hoaparse/hoascan.ll,
src/hoaparse/parsedecl.hh, src/hoaparse/public.hh: New files.
* src/Makefile.am, configure.ac, README: Adjust.
* src/tgbatest/ltl2tgba.cc: Add a -XH option.
* src/tgbatest/hoaparse.test: New file.
* src/tgbatest/Makefile.am: Adjust.
* buddy/src/bddx.h: Add a bdd_from_int() function.
2014-11-19 19:29:29 +01:00
Alexandre Duret-Lutz
e1d4522ca9 hoa: fix output
* src/tgbaalgos/hoaf.cc: Do not initialize acc_cond::mark_t with -1U.
2014-11-18 18:53:10 +01:00
Alexandre Duret-Lutz
f8cf2aa9b3 fix line number tracking in files with DOS newlines
* src/dstarparse/dstarscan.ll, src/kripkeparse/kripkescan.ll,
src/neverparse/neverclaimscan.ll, src/tgbaparse/tgbascan.ll:
Distinguish between 1-sized EOL and 2-sized EOL.
* src/kripketest/bad_parsing.test, src/tgbatest/neverclaimread.test,
src/tgbatest/readsave.test: Add more tests.
* NEWS: Mention it.
* src/kripkeparse/scankripke.ll: Remove this unused file.
2014-11-18 11:59:49 +01:00
Alexandre Duret-Lutz
45e9b96b66 fix line number tracking in files with DOS newlines
* src/dstarparse/dstarscan.ll, src/kripkeparse/kripkescan.ll,
src/neverparse/neverclaimscan.ll, src/tgbaparse/tgbascan.ll:
Distinguish between 1-sized EOL and 2-sized EOL.
* src/kripketest/bad_parsing.test, src/tgbatest/neverclaimread.test,
src/tgbatest/readsave.test: Add more tests.
* NEWS: Mention it.
* src/kripkeparse/scankripke.ll: Remove this unused file.
2014-11-18 11:07:02 +01:00
Alexandre Duret-Lutz
881afd67ba * NEWS: Mention the new stutter invariance check 2014-11-14 13:23:30 +01:00
Alexandre Duret-Lutz
d92ca23da3 * src/ltltest/remove_x.test: More tests. 2014-11-14 11:11:39 +01:00
Alexandre Duret-Lutz
9effca6907 Remove the stutter test from tgbatest/.
Because src/ltltest/stutter.test is stronger.

* src/tgbatest/stutter_invariant.test: Remove.
* src/tgbatest/Makefile.am: Adjust.
2014-11-14 11:11:39 +01:00
Alexandre Duret-Lutz
f412fee6f3 stutter check: cleanup and add test cases
* src/ltltest/ltlfilt.test: Add more tests.
* src/ltltest/stutter.test: New test.
* src/ltltest/Makefile.am: Adjust.
* src/bin/ltlfilt.cc: Catch std::runtime_error.
* src/tgba/tgbasl.hh (make_tgbasl): New function.
* src/tgba/tgbagraph.hh (make_tgba_graph): Add another overload.
* src/tgbaalgos/stutter_invariance.cc,
src/tgbaalgos/stutter_invariance.hh: Take the algorithm version as an
optional integer, and call getenv() only once.
* bench/stutter/stutter_invariance_randomgraph.cc,
bench/stutter/stutter_invariance_formulas.cc: Simplify using the
above functions.
2014-11-14 11:11:39 +01:00
Thibaud Michaud
fcf6e25132 Optimizing closure and sl.
* src/tgbaalgos/closure.cc, src/tgbaalgos/closure.hh: Using vectors
instead of sets and unordered maps, adding an overload to handle rvalue
references.
* src/tgbaalgos/stutterize.cc, src/tgbaalgos/stutterize.hh: Adding
an overload to handle rvalue references.
* bench/stutter/stutter_invariance_formulas.cc,
bench/stutter/stutter_invariance_randomgraph.cc: Automata are modified
in-place by is_stutter_invariant so they have to be copied before being
processed.
* src/tgbaalgos/stutter_invariance.cc,
src/tgbaalgos/stutter_invariance.hh: Use the in-place version of
closure and sl.
2014-11-14 11:11:39 +01:00
Thibaud Michaud
5817a3c11b Remove const qualifier in translator::run return type
* src/tgbaalgos/translate.cc, src/tgbaalgos/translate.hh: Remove const
qualifier in translator::run return type.
2014-11-14 11:11:39 +01:00
Thibaud Michaud
37bcb5d959 Adding tgba-based stutter-invariance checking
* src/tgbaalgos/closure.cc, src/tgbaalgos/closure.hh:
Add closure function.
* src/tgbaalgos/stutterize.cc, src/tgbaalgos/stutterize.hh:
Add two implementations of "self-loopize" function.
* src/tgbaalgos/Makefile.am: Add them.
* src/tgba/tgbasl.cc, src/tgba/tgbasl.hh: On-the-fly implementation of
self-loopize.
* src/tgba/Makefile.am: Add it.
* src/tgbatest/ltl2tgba.cc, src/tgbatest/stutter_invariant.test: Test
closure and sl.
* src/tgbatest/Makefile.am: Adjust.
* src/bin/ltlfilt.cc: Modify stutter-invariant option to use
automaton-based checking rather than syntactic-based checking.
* src/ltlvisit/remove_x.cc, src/ltlvisit/remove_x.hh:
Remove is_stutter_insensitive function.
* src/tgbaalgos/stutter_invariance.cc,
src/tgbaalgos/stutter_invariance.hh: Check if a formula is
stutter-invariant using closure and sl.
* wrap/python/spot.i: Add closure and sl bindings.
* bench/stutter/stutter_invariance_formulas.cc: Generate benchmarks from
given formulas.
* bench/stutter/stutter_invariance_randomgraph.cc: Generate benchmarks
from random automata.
* bench/stutter/Makefile.am: Add them.
* configure.ac: Add bench/stutter/Makefile.
* bench/Makefile.am: Add stutter subdirectory.
* README: Document bench/stutter directory.
2014-11-14 11:11:39 +01:00
Thibaud Michaud
beafcf4e3d Adding trans_storage methods to tgbagraph.hh
* src/tgba/tgbagraph.hh: Adding trans_storage methods to access
the underlying trans_storage_t struct.
2014-11-14 11:11:39 +01:00
Thibaud Michaud
c9618f9137 random_graph: add option to generate complete deterministic automaton
* src/tgbaalgos/randomgraph.cc, src/tgbaalgos/randomgraph.hh:
Add option to generate a complete deterministic automaton.
* src/tgbatest/randtgba.cc: Test it.
2014-11-14 11:11:39 +01:00
Thibaud Michaud
24d60edc84 Adding option to filter by number of atomic propositions in ltlfilt.
* src/bin/ltlfilt.cc: Add --ap=N option.
2014-11-14 11:11:39 +01:00
Alexandre Duret-Lutz
b012621357 * NEWS: Mention the std::set assignment workaround. 2014-11-14 11:04:28 +01:00
Alexandre Duret-Lutz
11aa708a81 ltl2tgba_fm: fix non-deterministic output
The ltl_to_tgba_fm() translation function was using a hash_map of
maps (ugh!) to merge transitions on output.  However recent libstd++
changed the implementation of hash_map (a.k.a. unordered_map) causing
transitions to be output in a different order.  This
implementation-dependent order caused the ltl2ta.test to fail because
the BA->TA transformation can produce TA of different sizes if you
simply change the order of transitions in the input BA! This does not
sound like a nice property for the BA->TA transformation, but Ala Eddine
isn't sure how to fix it yet.  In the meantime, this patch makes sure
ltl_to_tgba_fm() will return the same output regardless of the
implementation of hash_map.

The ltl2ta.test failure has been observed with g++ 4.9.2 on Arch Linux,
and with gcc-snapshot (5.0.0 20141016) on Debian.

* src/tgbaalgos/ltl2tgba_fm.cc: Rewrite the transition merging
using a std::vector and std::sort instead of nested maps tables.
* src/tgbatest/ltl2ta.test: Adjust sizes to the new order.
* NEWS: Mention the fix.
2014-11-14 11:03:30 +01:00