Commit graph

1462 commits

Author SHA1 Message Date
Alexandre Duret-Lutz
c892599494 Fix two memory leak reported by Sonali Dutta.
* src/tgbatest/ltl2tgba.cc: Calling tgbatest/ltl2tgba -M -O (which
makes no sense, but that is no reason) used the "minimized" variable
for two automata, overwriting one.
* wrap/python/spot.i: The python bindings did not know about
sba_explicit automata, causing memory leaks, and complaints from the
bdd_dict.
2013-03-05 21:09:01 +01:00
Alexandre Duret-Lutz
b6b6582b05 bin: Fix handling of LTL simplification options.
Enable LTL simplifications by default for ltl2tgba & ltl2tgta, and make
sure the ltl_simplifier_options are all false initially.  Before this
patch --low/-r1 had the same effect as --medium/-r2 with respect to LTL
simplification.

* src/bin/ltl2tgba.cc, src/bin/ltl2tgta.cc (simplification_level): Set
to 3 by default.
* src/bin/common_r.cc: Disable all ltl_simplifier options initially.
2013-03-02 15:36:26 +01:00
Alexandre Duret-Lutz
543de07737 Improve some Doxygen comments.
This follows up on a mail from Sonali Dutta.

* src/tgba/bdddict.hh (assert_emptiness, ~bdd_dict): Better
documentation.
* src/tgba/formula2bdd.hh (formula_to_bdd): Mention
unregister_all_my_variables().
(bdd_to_formula): Complete the documentation.
* THANKS: Add Sonali Dutta.
2013-02-20 12:04:35 +01:00
Alexandre Duret-Lutz
b31ddb787d * src/bin/man/Makefile.am (common_dep): Fix dependency. 2013-01-23 14:59:20 +01:00
Alexandre Duret-Lutz
3f61a34bd1 * src/tgbatest/ltlcross2.test: Fix list of tested configurations. 2013-01-22 11:55:03 +01:00
Alexandre Duret-Lutz
362c396356 * src/tgbaalgos/postproc.cc (count_states): Speed up explicit case. 2013-01-21 19:34:41 +01:00
Alexandre Duret-Lutz
76988369dc * src/tgbaalgos/minimize.hh: Fix documentation. 2013-01-21 16:04:20 +01:00
Alexandre Duret-Lutz
5e10057cfc cycles: fix documentation.
* src/tgbaalgos/cycles.hh: Fix comments.
2013-01-21 10:58:01 +01:00
Alexandre Duret-Lutz
6a547371d7 ltlcross: diagnose missing i/o specifications earlier.
* src/misc/formater.cc, src/misc/formater.hh (scan): New method.
(prime): Use it.
* src/bin/ltlcross.cc (translator_runner::translator_runner): Scan each
specification string, and report those missing an input or output
%-sequence.
* NEWS: Mention it.
2013-01-21 10:20:25 +01:00
Alexandre Duret-Lutz
edd687a301 ltlparse: Add compatibility with ltl2dsar's input.
* src/ltlparse/ltlscan.ll: Accept as a proposition any
alphanumeric string that is not an operator.
* NEWS: Mention it.
* src/ltltest/lbt.test: New file.  Also tests previous patch.
* src/ltltest/Makefile.am: Add it.
2013-01-20 03:01:44 +01:00
Alexandre Duret-Lutz
3a5eec42de lbt: Do not write a trailing space.
* NEWS: Mention it.
* src/ltlvisit/lbt.cc: Instead of outputting a space after each
node, output one before each node but the first one.
2013-01-20 03:01:44 +01:00
Alexandre Duret-Lutz
bf3c3aecde tostring: quote U, W, M, R when used as atomic propositions
* src/ltltest/tostring.test, src/ltltest/parse.test: More tests.
* src/ltlvisit/tostring.cc (is_bare_word): Quote U, W, M, R.
* NEWS: Mention it.
2013-01-20 03:01:44 +01:00
Alexandre Duret-Lutz
5086e24165 ltlcross: Display the number of timeouts.
* NEWS: Mention it.
* src/bin/ltlcross.cc: Always display the number of timeout
on normal termination.
2013-01-20 03:01:44 +01:00
Alexandre Duret-Lutz
b99cfa88bb Fix two dead assignments detected by clang's static analyzer.
* src/tgbaalgos/scc.cc, src/tgbatest/ltl2tgba.cc: Remove assignments to
unread variables.
2013-01-17 14:06:31 +01:00
Alexandre Duret-Lutz
dcd4644d42 eltl2tgba: slight cleanup of the tests.
* src/eltltest/acc.test, src/tgbatest/eltl2tgba.test: Simplify use of
here documents, and also test for ltl2tgba's -lo option with valgrind.
2013-01-17 14:06:31 +01:00
Alexandre Duret-Lutz
d580cce685 Fix documentation errors reported by clang++ 3.2.
* m4/gccwarn.m4: Use -Wdocumentation if supported.
* src/ltlast/binop.hh, src/ltlparse/public.hh, src/ta/taproduct.hh,
src/taalgos/emptinessta.hh, src/taalgos/reachiter.hh,
src/tgba/state.hh, src/tgba/tgbasafracomplement.cc,
src/tgbaalgos/ltl2tgba_fm.hh: Fix Doxygen documentations errors signaled
by clang++ 3.2.
2013-01-17 09:07:13 +01:00
Alexandre Duret-Lutz
aa7b43eadf Fix several warnings reported by clang++ 3.2.
* src/tgba/tgbakvcomplement.cc
(tgba_kv_complement_succ_iterator::current_state_),
src/ta/taexplicit.hh (state_ta_explicit::source_):
Remove useless private member.
* src/ta/taexplicit.cc: Adjust constructors.
* src/ta/tgta.cc, src/ta/taexplicit.hh: Also fix
copyright banner.
* src/bin/ltlcross.cc (exec_with_timeout): Work
around warning about status not being set in the
error path.
2013-01-16 08:52:27 +01:00
Pierre PARUTTO
67b7b86d52 tgbaproduct: fix segfault
* src/tgba/tgbaproduct.cc (transition_annotation): Adapt down cast to
new hierarchy.
2013-01-14 18:24:24 +01:00
Alexandre Duret-Lutz
e4ecc2d465 simplify: add four simplification rules for GF and FG
GF(a|Xb) = GF(a|b)      GF(a|Fb) = GF(a|b)
FG(a&Xb) = FG(a&b)      FG(a&Gb) = FG(a&b)

* src/ltlvisit/simplify.cc: Implement them.
* NEWS, doc/tl/tl.tex: Document them.
* src/ltltest/reduccmp.test: Test then.
2013-01-11 17:16:17 +01:00
Alexandre Duret-Lutz
2580fc6f91 * src/tgbatest/babiak.test: Rewrite using ltlcross. 2013-01-10 18:42:36 +01:00
Alexandre Duret-Lutz
081aa0d120 tgbatest: Rewrite ltl2neverclaim using ltlcross.
* src/tgbatest/ltl2neverclaim.test: Rename as...
* src/tgbatest/ltl2neverclaim-lbtt.test: ... this.
* src/tgbatest/ltl2neverclaim.test: New version, using ltlcross.
* src/tgbatest/Makefile.am: Add ltl2neverclaim-lbtt.test.
2013-01-10 18:22:35 +01:00
Alexandre Duret-Lutz
c55f282298 * src/bin/common_setup.cc: Bump copyright year. 2013-01-06 21:44:38 +01:00
Alexandre Duret-Lutz
254896d5d8 Remove anything related to evtgba.
* src/evtgba/, src/evtgbaalgos/, src/evtgbaparse/, src/evtgbatest/:
Delete.
* src/Makefile.am (SUBDIRS): Adjust.
* configure.ac, README: Adujst.
2013-01-06 19:26:32 +01:00
Alexandre Duret-Lutz
a577850eb3 Address several issues reported by cppcheck all over the place.
* src/bin/common_finput.cc, src/tgbaalgos/lbtt.cc: Use !empty() instead
of size() > 0.
* src/bin/ltl2tgta.cc, src/kripke/kripkeexplicit.cc,
src/tgbatest/complementation.cc: Avoid useless assignments.
* src/bin/ltlcross.cc: Correct mistaken assignment inside assert().
* src/evtgba/symbol.hh, src/tgba/tgbabddcoredata.cc,
src/tgba/tgbabddcoredata.hh,
src/tgba/tgbasafracomplement.cc (operator=): Do not return a const
reference.
* src/evtgbatest/ltl2evtgba.cc, src/evtgbatest/product.cc,
src/evtgbatest/product.cc: Check indices before using them, not after.
* src/kripke/kripkeexplicit.cc, src/kripke/kripkeexplicit.hh,
src/tgbatest/randtgba.cc: Pass constant strings by reference.
* src/kripke/kripkeprint.cc, src/tgbaalgos/simulation.cc:
Remove a useless operation.
* src/ltlvisit/simplify.cc: Remove a duplicate condition.
* src/misc/formater.hh: Remove unused attribute.
* src/misc/modgray.cc: Initialize done_ in the constructor.
* src/saba/explicitstateconjunction.cc,
src/saba/explicitstateconjunction.hh (operator=): Fix prototype.
* src/saba/sabacomplementtgba.cc: Remove unused default constructor.
* src/ta/taexplicit.cc, src/ta/taproduct.cc, src/ta/tgtaproduct.cc,
src/ta/tgtaproduct.hh, src/taalgos/emptinessta.cc,
src/taalgos/minimize.cc, src/taalgos/reachiter.cc,
src/taalgos/tgba2ta.cc, src/tgbaalgos/cutscc.cc: Use C++ casts, and
++it instead of it++.
* src/taalgos/dotty.cc, src/tgbatest/ltl2tgba.cc: Refine the scope of
variables.
* src/tgba/tgbakvcomplement.hh (bdd_order): Always initialize bdd_.
* src/tgba/tgbasgba.cc, src/tgba/wdbacomp.cc: Use the initialization
line to initialize all members.
2012-12-24 13:14:33 +01:00
Alexandre Duret-Lutz
a3b49f1108 acccompl: Speed up.
* src/misc/acccompl.cc: Simplify both directions of the conversion.
* src/misc/acccompl.hh: Pass bdds by reference.
2012-12-24 13:14:33 +01:00
Alexandre Duret-Lutz
13c41ee773 ltlast: use the return of insert() to avoid a double lookup
* src/ltlast/atomic_prop.cc, src/ltlast/automatop.cc,
src/ltlast/binop.cc, src/ltlast/bunop.cc,
src/ltlast/multop.cc, src/ltlast/unop.cc: Do not look for a key
and then insert the (key,value) on failure.  Simply insert
(key,0), and replace 0 by value on failure.  This replaces two map
lookups by one.
2012-12-19 22:30:49 +01:00
Alexandre Duret-Lutz
aa2374c5a2 Cosmetics.
* src/sanity/style.test: Catch extra space around operator declarations.
* src/ltlast/automatop.hh, src/ltlast/multop.hh,
src/tgba/tgbabddcoredata.cc, src/tgba/tgbabddcoredata.hh,
src/tgbaalgos/simulation.cc: Fix them.
2012-12-19 15:23:29 +01:00
Alexandre Duret-Lutz
cffbb7b498 Remove useless variable.
* src/tgba/tgbaexplicit.hh (add_state): Remove useless variable.
Reported by Étienne Renault.
2012-12-14 11:22:18 +01:00
Alexandre Duret-Lutz
64484e7816 Print F"proc.st" as Fproc.st.
* src/ltlvisit/tostring.cc: Allow '.' in bare words while
printing atomic propositions.
* src/ltltest/bare.test: New file.
* src/ltltest/Makefile.am: Add it.
2012-11-28 17:34:39 +01:00
Alexandre Duret-Lutz
af639e58c7 more files to ignore 2012-11-28 16:45:04 +01:00
Thomas Badie
d10e772d35 Fix non determinism in the simulation.
* src/tgbaalgos/simulation.cc: Fix non determinism.
* src/tgbatest/simdet.test: Test that the behavior is now correct.
* src/tgbatest/Makefile.am (TESTS): Add the new test to the
test-suite.
2012-11-14 18:22:11 +01:00
Alexandre Duret-Lutz
49d384b1eb ltlcross: diagnose failure to write into temporary files
The removes a warning about the return code from write() being
ignored.  Reported by Thomas Badie.

* src/bin/ltlcross.cc (string_to_tmp): Call error() on error.
2012-11-14 15:12:43 +01:00
Alexandre Duret-Lutz
301ad1ebf0 Speed-up translation of persistence formulas.
* src/tgbaalgos/ltl2tgba_fm.cc: Use a single acceptance for syntactic
persistence formulas.
2012-10-26 07:46:04 +02:00
Alexandre Duret-Lutz
7c464246f2 * src/tgbaalgos/ltl2tgba_fm.cc: Typo in comment. 2012-10-24 10:16:19 +02:00
Alexandre Duret-Lutz
d552be308b ltlcross: Add a --stop-on-error option.
* src/bin/ltlcross.cc: Add the option.
* src/bin/common_finput.hh, src/bin/common_finput.cc: Make it possible
to abort run().
2012-10-23 23:21:14 +02:00
Alexandre Duret-Lutz
1f12ad8765 unabbreviate_wm: fix a segfault.
* src/ltlvisit/wmunabbrev.cc: Fix clone() order.
* src/ltltest/equals.cc: Add a mode for unabbreviate_wm().
* src/ltltest/unabbrevwm.test: New file.
* src/ltltest/Makefile.am: Add it.
2012-10-23 22:36:18 +02:00
Alexandre Duret-Lutz
aede62d123 * src/bin/man/genltl.x: Missing dot. 2012-10-22 20:29:14 +02:00
Alexandre Duret-Lutz
f3ef9de0be rename ltlcheck as ltlcross
* src/bin/ltlcheck.cc, src/bin/man/ltlcheck.x,
src/tgbatest/ltlcheck.test, src/tgbatest/ltlcheck2.test: Rename as ...
* src/bin/ltlcross.cc, src/bin/man/ltlcross.x,
src/tgbatest/ltlcross.test, src/tgbatest/ltlcross2.test: ... these.
* NEWS, src/bin/Makefile.am, src/bin/man/Makefile.am,
src/tgbatest/Makefile.am: Adjust.
2012-10-21 13:23:02 +02:00
Alexandre Duret-Lutz
fa4e6effa6 tgbaexplicit: fix state_is_accepting()
* src/tgba/tgbaexplicit.hh (state_is_accepting): Use
all_acceptance_conditions(), not all_acceptance_conditions_, so that
it works even when all_acceptance_conditions_ is not ready.
* src/tgbatest/explicit2.cc, src/tgbatest/explicit2.test: Adjust
test case.
2012-10-21 00:02:07 +02:00
Alexandre Duret-Lutz
76787b23c0 postproc: add the possibility to output a monitor
* src/tgbaalgos/stripacc.cc, src/tgbaalgos/stripacc.hh: New files.
* src/tgbaalgos/Makefile.am: Add them.
* src/tgbaalgos/postproc.cc, src/tgbaalgos/postproc.hh: Add a Monitor
output option.
* src/bin/ltl2tgba.cc: Add a --monitor/-M option.
* NEWS: Mention monitors.
* src/tgba/tgbaexplicit.hh (is_accepting_state): Fix for the
case where the automaton has no acceptance set.
2012-10-21 00:02:06 +02:00
Alexandre Duret-Lutz
877082bfb0 Add a parse_boolean() function to use in parsers for Automata.
* src/ltlparse/public.hh, src/ltlparse/ltlparse.yy (parse_boolean):
New function.
* src/neverparse/neverclaimparse.yy, src/tgbaparse/tgbaparse.yy:
Use it.
2012-10-20 19:18:54 +02:00
Alexandre Duret-Lutz
da5f7ac3aa to_string: remove extra parentheses
* src/ltlvisit/tostring.cc: Fix duplicate parentheses around
argument of unary operators when full_parent=true.
2012-10-20 13:52:44 +02:00
Alexandre Duret-Lutz
0fc3c6bcff Add support for printing LTL formulas using Wring's syntax.
* src/ltlvisit/tostring.hh, src/ltlvisit/tostring.cc
(to_wring_string): New option.
* src/bin/common_output.hh, src/bin/common_output.cc:
Add support for a --wring option.
* src/bin/ltlcheck.cc: Add %w and %W format specifiers.
2012-10-20 13:40:33 +02:00
Alexandre Duret-Lutz
bf765480b1 * src/tgba/tgbaexplicit.hh: Fix hash_map definition to please old g++. 2012-10-20 12:18:06 +02:00
Alexandre Duret-Lutz
b8ed85a30d bin: Adjust version display and help options.
In particular, this get rid of the ugly -? option that argp adds by
default, and we also remove -V so that we can use it for something
else later.

* src/bin/common_setup.cc, src/bin/common_setup.hh (misc_argp):
Provide support for --help/--version/--usage output, replacing argp's
default builting version.
* src/bin/genltl.cc, src/bin/ltl2tgba.cc, src/bin/ltl2tgta.cc,
src/bin/ltlcheck.cc, src/bin/ltlfilt.cc, src/bin/randltl.cc:
Call argp_parse() with ARGP_NO_HELP, and use misc_argp instead.
2012-10-19 22:58:38 +02:00
Alexandre Duret-Lutz
c6030df936 accconv: speed up acceptance_convertor::as_positive_product()
* src/misc/accconv.cc (as_positive_product): Use a small loop instead
of calling bdd_satone().
2012-10-19 20:50:35 +02:00
Alexandre Duret-Lutz
31fb3d9d15 tgbaexplicit: speed up merge_transitions()
* src/tgba/tgbaexplicit.hh (merge_transitions): Use a hash table
to merge compatible transitions.
* src/tgbatest/readsave.test: Add a test case.
2012-10-19 17:53:08 +02:00
Alexandre Duret-Lutz
0bdfd9c72c * src/bin/ltlcheck.cc: Cleanup temporary files on ^C. 2012-10-19 16:17:53 +02:00
Alexandre Duret-Lutz
e426c63550 lbttparse: allow acceptance sets that are not consecutive integers.
* src/tgbaalgos/lbtt.cc: Renumber acceptance sets as they are read.
* src/tgbatest/lbttparse.test: Add a test cases.
2012-10-19 15:56:42 +02:00
Alexandre Duret-Lutz
89b9cc5fd5 lbttparse: make sure we parse wring2lbtt's output
* src/tgbaalgos/lbtt.cc: Do not expect a new line after the number of
acceptance conditions.
* src/tgbatest/lbttparse.test: Add a test case.
2012-10-18 14:48:10 +02:00