Commit graph

2278 commits

Author SHA1 Message Date
Alexandre Duret-Lutz
561b852106 * src/tgba/tgbaexplicit.hh: Fix definition of the new alias_ map. 2012-10-03 09:32:30 +02:00
Alexandre Duret-Lutz
fb38fe56aa * src/sanity/includes.test: Work around a bug in Bison 2.6. 2012-10-02 18:21:57 +02:00
Alexandre Duret-Lutz
c05ec36dd0 * src/neverparse/neverclaimparse.yy: Prefer accepting labels in aliases. 2012-10-02 18:21:56 +02:00
Alexandre Duret-Lutz
dd4d03e3a9 tgba_explicit: fix support for aliases
This had been broken in the 0.9 reorganization of the tgba_explicit
hierarchy.  The output of 'spin -f' was incorrectly parsed as a
consequence.

* src/tgba/tgbaexplicit.hh: Introduce an alias_ map and use it.
2012-10-02 18:21:56 +02:00
Alexandre Duret-Lutz
0fed46b796 Add a string version of to_lbt_string().
* src/ltlvisit/lbt.cc, src/ltlvisit/lbt.hh (to_lbt_string):
New string version.
2012-09-30 16:21:10 +02:00
Alexandre Duret-Lutz
902dadb898 * src/tgbaalgos/cycles.cc (nocycle): Fix a comment. 2012-09-30 15:39:06 +02:00
Alexandre Duret-Lutz
dd16f58ef4 enumerate_cycles: fix memory management.
* src/tgbaalgos/cycles.cc (tag_state): Destroy duplicate states, not
new states!
* src/tgbatest/cycles.test: Add a test case that used to segfault.
Reported by Étienne Renault.
2012-09-30 15:19:05 +02:00
Alexandre Duret-Lutz
4ed4e4d2a8 Fix return of is_deterministic(), it was inverted.
Reported by Étienne Renault.

* src/tgbaalgos/isdet.cc (is_deterministic): Invert return code.
* src/tgbatest/nondet.test: New file.
* src/tgbatest/Makefile.am (TESTS): Add it.
2012-09-30 10:02:59 +02:00
Alexandre Duret-Lutz
7854f629e5 bin: factor version display.
* src/bin/common_setup.cc (display_version): New function.
(setup): Hook the display_version function.
(argp_program_bug_address): Define this common variable here.
* src/bin/genltl.cc, src/bin/ltl2tgba.cc, src/bin/ltl2tgta.cc,
src/bin/ltlfilt.cc, src/bin/randltl.cc (argp_program_bug_address,
argp_program_version): Remove these definitions.
2012-09-30 10:02:51 +02:00
Alexandre Duret-Lutz
489f719dc1 bin: factor the calls to set_program_name().
* src/bin/common_setup.cc, src/bin/common_setup.hh: New files.
* src/bin/Makefile.am: Add them.
* src/bin/genltl.cc, src/bin/ltl2tgba.cc, src/bin/ltl2tgta.cc,
src/bin/ltlfilt.cc, src/bin/randltl.cc: Adjust.
2012-09-29 17:09:26 +02:00
Alexandre Duret-Lutz
ecca4ba53e bin: factor the code to read LTL formulas from -f or -F.
* src/bin/common_finput.cc, src/bin/common_finput.hh: Define the
processor class.
* src/bin/ltl2tgba.cc, src/bin/ltl2tgta.cc, src/bin/ltlfilt.cc:
Simplify accordingly.
2012-09-29 15:42:33 +02:00
Thomas Badie
467bf378a8 simulation: Fix a bug reported by Étienne Renault.
* src/tgbatest/renault.test: New file.
* src/tgbatest/Makefile.am: Add it.
* src/tgbaalgos/simulation.cc: Fix the bug.
2012-09-27 10:01:16 +02:00
Thomas Badie
f01d30eb91 Create unique_ptr for Spot.
* src/misc/unique_ptr.hh: Create unique_ptr for Spot.
* src/misc/Makefile.am: Register this new file.
* src/tgbatest/ltl2tgba.cc: Replace two calls to delete by the
utilisation of unique_ptr.
* src/tgbaalgos/simulation.cc: Replace two calls to delete by the
utilisation of unique_ptr.
2012-09-26 18:06:58 +02:00
Alexandre Duret-Lutz
b23296cf61 Allow lbtt not to be built, and skip relevant tests.
* m4/lbtt.m4: Turn the missing lbtt error into a warning,
and do not configure lbtt wen --without-included-lbtt is specified.
* bench/ltl2tgba/defs.in: Abort if lbtt is missing.
* src/tgbatest/defs.in (need_lbtt): New function to skip
tests that require lbtt.
* src/tgbatest/babiak.test, src/tgbatest/ltl2neverclaim.test,
src/tgbatest/spotlbtt.test: Call need_lbtt.
2012-09-25 19:55:06 +02:00
Alexandre Duret-Lutz
b5b3cd9d0c * src/bin/ltlfilt.cc (--psl): Remove this option. 2012-09-25 09:54:50 +02:00
Alexandre Duret-Lutz
b5da11ed24 * src/tgbaalgos/minimize.hh: Typo in comment. 2012-09-24 17:08:11 +02:00
Alexandre Duret-Lutz
1f0c765547 ltl2tgta: new tool
* src/bin/common_post.cc, src/bin/common_post.hh: New files, extracted
from ...
* src/bin/ltl2tgba.cc: ... here.
* src/bin/ltl2tgta.cc, src/bin/man/ltl2tgta.x: New files.
* src/bin/Makefile.am, src/bin/man/Makefile.am: Adjust.
* NEWS: Mention ltl2tgta.
2012-09-24 17:08:11 +02:00
Alexandre Duret-Lutz
b0678a21a2 Fix prototype of atomic_prop_collect_as_bdd().
* src/ltlvisit/apcollect.cc, src/ltlvisit/apcollect.hh
(atomic_prop_collect_as_bdd): Take a const tgba.
2012-09-24 14:52:18 +02:00
Alexandre Duret-Lutz
d138853676 * HACKING: Document the Gettext.pm and LaTeX dependencies 2012-09-24 11:35:40 +02:00
Alexandre Duret-Lutz
45e3f7fc2a Add two event_univ rewriting rules.
* src/ltlvisit/simplify.cc: Here.
* doc/tl/tl.tex: Document them.
* src/ltltest/reduccmp.test: Test them.
2012-09-24 10:42:20 +02:00
Alexandre Duret-Lutz
45ba8c3ef6 Add 11 implication-based simplification rules for U,W,R,M.
* src/ltlvisit/simplify.cc: Add them.
* src/ltltest/reduccmp.test: Check them.
* doc/tl/tl.tex: Document them.
2012-09-24 09:08:55 +02:00
Alexandre Duret-Lutz
f711f9d097 Fix failures detected on MacOS X with g++ 4.0.
* src/tgbaalgos/cycles.hh (state_info): Initialize
mark and reach to false.
* src/tgbatest/cycles.test: Use jot if seq is missing,
and a custom loop of jot is missing too.
2012-09-22 13:06:10 +02:00
Alexandre Duret-Lutz
c6840d81e4 Work around old g++ versions.
* src/tgbaalgos/isweakscc.cc (cycle_found): Add a const_cast.
2012-09-22 01:26:33 +02:00
Alexandre Duret-Lutz
13025d6cc8 * src/tgbaalgos/cycles.hh: Add virtual destructor. 2012-09-22 01:14:07 +02:00
Alexandre Duret-Lutz
3c17c418a2 Speedup is_weak_scc() if all transitions in the SCC are accepting.
* src/tgbaalgos/isweakscc.cc, src/tgbaalgos/isweakscc.hh: Speedup when
all transitions are accepting.
2012-09-21 15:12:23 +02:00
Alexandre Duret-Lutz
d228784c39 Don't pass the automaton to enumerate_cycle and is_weak_scc.
The scc_map knows the automaton already.

* src/tgbaalgos/cycles.cc, src/tgbaalgos/cycles.hh,
src/tgbaalgos/isweakscc.cc, src/tgbaalgos/isweakscc.hh: Simplify the
interface.
* src/tgbatest/ltl2tgba.cc: Adjust calls.
2012-09-21 15:12:16 +02:00
Alexandre Duret-Lutz
40de47f159 dve2: use postprocessor to simplify the code.
* iface/dve2/dve2check.cc: Use postprocessor to simplify the code.
* iface/dve2/dve2check.test: Adjust to some different output values
when a counterexample is found, caused by nondeterminism introduced by
the orders of transitions.
2012-09-21 15:10:13 +02:00
Alexandre Duret-Lutz
09b540315a * NEWS: Reorganize and update recent changes. 2012-09-21 15:10:13 +02:00
Alexandre Duret-Lutz
92e37998b2 Better documentation for the cycle enumeration algorithms.
* src/tgbaalgos/cycles.cc, src/tgbaalgos/cycles.hh,
src/tgbaalgos/isweakscc.hh: Improve .doc
* src/tgbaalgos/isweakscc.cc (weak_checker::cycle_found):
Scan the DFS backward so we only look at the cycle part.
2012-09-21 11:15:12 +02:00
Alexandre Duret-Lutz
420fcd62e4 Add a is_weak_scc() function based on cycle enumeration.
* src/tgbaalgos/isweakscc.cc, src/tgbaalgos/isweakscc.hh: New files.
* src/tgbaalgos/Makefile.am: Add them.
* src/tgbatest/ltl2tgba.cc: Add a -KW option.
* src/tgbatest/cycles.test: Test it on a small example.
2012-09-20 19:46:48 +02:00
Alexandre Duret-Lutz
374a489e3f Implement Loizou & Thanisch's algorithm for enumerating cycles.
* src/tgbaalgos/cycles.cc, src/tgbaalgos/cycles.hh,
src/tgbatest/cycles.test: New files.
* src/tgbaalgos/Makefile.am, src/tgbatest/Makefile.am: Add them.
* src/tgbatest/ltl2tgba.cc: Add a -KC option for testing.
2012-09-20 18:05:14 +02:00
Alexandre Duret-Lutz
379e0d5eb4 * src/tgba/tgbascc.cc: Cosmetics. 2012-09-19 22:13:58 +02:00
Alexandre Duret-Lutz
64f0f653e3 * src/bin/ltl2tgba.cc: Fix cases where --stats is not used... 2012-09-19 22:13:41 +02:00
Alexandre Duret-Lutz
f3a2675588 * src/bin/ltl2tgba.cc: Improve documentation. 2012-09-19 10:29:10 +02:00
Alexandre Duret-Lutz
26ad32d561 ltl2tgba: Add a --stats option.
* src/bin/ltl2tgba.cc (--stats): New option.
* src/tgbaalgos/stats.cc, src/tgbaalgos/stats.hh (stat_printer): New
class.
2012-09-19 00:33:39 +02:00
Alexandre Duret-Lutz
f4381d59ce Add option --lbt-input to ltl2tgba. Factor it with ltlfilt.
* src/bin/ltlfilt.cc: Extra input options into...
* src/bin/common_finput.cc, src/bin/common_finput.hh: ... these new
files...
* src/bin/ltl2tgba.cc: ... and use them here.
* src/bin/Makefile.am: Adjust.
2012-09-18 21:44:58 +02:00
Alexandre Duret-Lutz
f02156ebff Various utf-8 fixes.
* src/bin/ltl2tgba.cc: Add option -8.
* src/tgbatest/ltl2tgba.cc, wrap/python/spot.i: Enable utf8 on
sba_explicit_formula automata too.
2012-09-18 21:12:09 +02:00
Alexandre Duret-Lutz
4ed153a247 * src/bin/ltl2tgba.cc: Fix display of BA. 2012-09-18 16:04:48 +02:00
Alexandre Duret-Lutz
10189b2d61 * src/tgbaalgos/postproc.cc: Misplaced call to scc_filter(). 2012-09-17 18:47:04 +02:00
Alexandre Duret-Lutz
675fc0bc67 * src/bin/genltl.cc (parse_opt): Add OPT_U_LEFT and OPT_U_RIGHT cases. 2012-09-17 18:03:04 +02:00
Alexandre Duret-Lutz
0c005c8159 More fixes for the OS X builds.
* src/bin/common_r.hh: Include common_sys.hh first.
* src/sanity/80columns.test: Set LANG.
2012-09-17 11:51:44 +02:00
Alexandre Duret-Lutz
42665b87b0 * src/bin/ltlfilt.cc: Add a --remove-wm option. 2012-09-17 11:08:10 +02:00
Alexandre Duret-Lutz
28e7d9aa4d Fix sanity failure on Mac OS X.
* src/sanity/Makefile.am: Pass TOPBUILD to includes.test, and split the
tests in different targets.
* src/sanity/includes.test: Add include directories to bin/'s headers.
2012-09-17 10:31:55 +02:00
Alexandre Duret-Lutz
d9dc1f489d Add a visitor to relabel the atomic proposition in formulas.
* src/ltlvisit/relabel.cc, src/ltlvisit/relabel.hh: New files.
* src/ltlvisit/Makefile.am: Add them.
* src/ltlvisit/clone.cc (recurse): Don't call clone(), nobody
needs that.  Instead, really recurse.
* src/bin/ltlfilt.cc: Add a --relabel option.
* src/bin/genltl.cc: Relabel formulas if --lbt is used.
* src/sanity/style.test: Tweak detection of i++.
2012-09-16 21:30:54 +02:00
Alexandre Duret-Lutz
1a84c17ece Add an LTL printer in LBT's syntax.
* src/ltlvisit/lbt.cc, src/ltlvisit/lbt.hh: New files.
* src/ltlvisit/Makefile.am: Add them.
* src/bin/common_output.cc, src/bin/common_output.hh: Add
support for LBT output, and reporting formulae that cannot
be output in this syntax.
* src/bin/ltlfilt.cc: Pass filename and linenum to
output_formula() for better error reporting.
2012-09-14 18:55:04 +02:00
Alexandre Duret-Lutz
106a14f8db Implement a parser for LBT's prefix syntax for LTL.
* src/ltlparse/public.hh (parse_lbt): New function.
* src/ltlparse/ltlparse.yy, src/ltlparse/ltlscan.ll: Implement it.
* src/bin/ltlfilt.cc: Use it.
2012-09-14 18:34:54 +02:00
Alexandre Duret-Lutz
a010ebc805 Use more sba_explicit more often.
* src/tgbaalgos/minimize.cc, src/tgbaalgos/minimize.hh
(minimize_dfa, minimize_wdba): Return a sba_explicit_number automaton
instead of tgba_explicit_number.
* src/tgba/tgbaexplicit.hh (declare_acceptance_condition): Fix code
so it works on sba as well.
* src/tgbaalgos/dotty.cc, src/tgbaalgos/neverclaim.cc: Specialize
for sba instead of tgba_sba_proxy.
* src/tgbaalgos/neverclaim.hh: Point to degeneralize().
2012-09-14 15:10:12 +02:00
Alexandre Duret-Lutz
807834ec41 Detect fail conditions on std::cout in user's tools.
* src/bin/common_cout.cc, src/bin/common_cout.hh: New files.
* src/bin/Makefile.am: Add them.
* src/bin/ltl2tgba.cc, src/bin/ltlfilt.cc, src/bin/common_output.cc:
Report error when writing to std::cout failed.  This is mainly
motivated by ltlfilt not being killed by SIGPIPE on lip6's OSX
buildfarm (SIGPIPE is probably ignored when the build is started), but
it could detect other errors such as a disk full.
2012-09-14 11:56:42 +02:00
Alexandre Duret-Lutz
70f51b2786 * src/tgbatest/wdba2.test: Adjust to yesterday's change to -kt. 2012-09-12 18:53:16 +02:00
Alexandre Duret-Lutz
6a3cf7538c bin/ltl2tgba: New user binary.
* src/tgbaalgos/postproc.cc, src/tgbaalgos/postproc.hh: New class to
capture the postprocessing logic.
* src/tgbaalgos/Makefile.am: Add them.
* src/bin/ltl2tgba.cc, src/bin/man/ltl2tgba.x: New files.
* src/bin/Makefile.am, src/bin/man/Makefile.am: Add them.
* src/tgbatest/spotlbtt.test: Prune the list of configurations slightly.
* src/tgbatest/spotlbtt2.test: New file.
* src/tgbatest/Makefile.am: Add it.
* bench/ltl2tgba/algorithms, bench/ltl2tgba/defs.in: Adjust to
use the new binary.
* NEWS: Update.
2012-09-12 18:53:16 +02:00