Commit graph

1230 commits

Author SHA1 Message Date
Alexandre Duret-Lutz
8156766fe3 Another Clang report.
* iface/nips/nips.cc (format_state): Do not use a variable-sized
array, this is not allowed in C++.
2010-11-27 14:29:28 +01:00
Alexandre Duret-Lutz
019c85dff6 Fix more errors reported by Clang.
* src/tgbaalgos/reducerun.hh (tgba_run): Predeclare as a struct
since this is what it is.
* src/tgbatest/randtgba.cc (main): Avoid using "i" with two
different type in the same loop.
2010-11-27 10:21:44 +01:00
Alexandre Duret-Lutz
0d9d0b08ec Finalize Kripke interface.
* src/kripke/fairkripke.hh, src/kripke/fairkripke.cc,
* src/kripke/kripke.hh, src/kripke/kripke.cc: Finalize and
document the Kripke interface.  I have tested it by updating
checkpn to use it.
2010-11-26 17:50:12 +01:00
Alexandre Duret-Lutz
67f46b85b3 Never claim output used to print the degeneralized automaton
before some optional operations (like more optimizations, or a
product).

* src/tgbatest/ltl2tgba.cc (-N, -NN): Make sure we print the last
automaton computed, not just the automaton when we degeneralized
it.  We may have applied other algorithms since the original
degeneralization.
2010-11-25 20:29:16 +01:00
Alexandre Duret-Lutz
7627b9673b * src/tgbatest/ltl2tgba.test: Test both -l and -f. This should
have been done on 2010-01-30 when the default translation was
changed from -l to -f.
2010-11-25 19:59:46 +01:00
Alexandre Duret-Lutz
0dca4be69d * src/tgbaalgos/scc.hh: Typos in the documentation. 2010-11-25 19:57:10 +01:00
Alexandre Duret-Lutz
0a2dbab413 * src/tgbaalgos/sccfilter.hh: Fix some typos in the documentation. 2010-11-24 22:00:57 +01:00
Alexandre Duret-Lutz
57d4df47dd Suggest using bddtrue and bddfalse instead of bdd_true() and
bdd_false().

* src/sanity/style.test: Catch uses of bdd_true() or bdd_false().
2010-11-24 22:00:57 +01:00
Alexandre Duret-Lutz
2ba963200a Fix some struct/class missmatches reported by clang.
* src/ltlast/predecl.hh: Predeclare the LTL AST nodes as class,
not struct.
* src/ltlast/nfa.hh (formula_tree::node): Predeclare as struct,
not class.
2010-11-20 18:02:20 +01:00
Alexandre Duret-Lutz
2b46cb4bab Add interface for and test the bdd_setxor() function added to Buddy.
* wrap/python/buddy.i (bdd_setxor): New function.
* wrap/python/tests/setxor.py: New file.
* wrap/python/tests/Makefile.am (TESTS): Add setxor.py.
2010-11-07 11:15:56 +01:00
Alexandre Duret-Lutz
38913302dd * src/Makefile.am (libspot_la_LIBADD): Rename libneverclaimparse.la
as libneverparse.la.
* src/neverparse/Makefile.am: Install files in
$(pkgincludedir)/neverparse, not $(pkgincludedir)/neverclaimparse.
2010-11-06 20:44:37 +01:00
Alexandre Duret-Lutz
1e0f99e824 Cosmetics to please sanity checks.
* src/neverparse/public.hh, src/neverparse/parsedecl.hh: Fix
inclusion guards.
* src/tgba/tgbaexplicit.hh, src/tgbatest/emptchk.test,
src/tgbatest/ltl2tgba.cc: Fix trailing whitespaces.
2010-11-06 17:56:27 +01:00
Alexandre Duret-Lutz
87f69eaf18 * src/tgbatest/ltl2tgba.cc: Clock the time spent reading -P file. 2010-11-06 16:40:44 +01:00
Alexandre Duret-Lutz
b1dbfed17f * src/tgbatest/neverclaimread.test: Check that Spot can read the
neverclaims it outputs.
2010-11-06 15:56:50 +01:00
Alexandre Duret-Lutz
a6677c2984 Do not output a counterexample by default in ltl2tgba, introduce
options -C and -CR for that.

* src/tgbatest/ltl2tgba.cc: Add option -C and -CR to control
whether we want the accepting run to be printed or replayed.
* src/tgbatest/dfs.test, src/tgbatest/eltl2tgba.test,
src/tgbatest/emptchk.test, src/tgbatest/emptchke.test,
src/tgbatest/ltl2tgba.cc, src/tgbatest/ltlcounter.test: Use -CR.
2010-11-06 15:38:00 +01:00
Alexandre Duret-Lutz
fe1f59cd30 Make sure the neverclaim parser works on the output of spin and
ltl2ba.

* src/neverparse/neverclaimparse.yy: Accept multiple labels
for the same state.  Honor accepting states.  Forward parse
error from the parser used for guards.  Accept "false" as a
single instruction for a state.
* src/neverparse/neverclaimscan.ll: Recognize "false" specifically,
and remove the ";" hack.
* src/tgba/tgbaexplicit.cc
(tgba_explicit_string::~tgba_explicit_string): Adjust not to
destroy a state twice.
* src/tgba/tgbaexplicit.hh
(tgba_explicit_string::add_state_alias): New function.
* src/tgbatest/defs.in (SPIN, LTL2BA): New variables.
* src/tgbatest/neverclaimread.test: Check error messages for
syntax errors in guards.  Make sure we can read the output
of `spin -f' and `ltl2ba -f' on a few test formulae.
2010-11-06 14:35:31 +01:00
Alexandre Duret-Lutz
ac08c5abce Cleanup neverclaim support.
* src/neverclaimparse/: Shorthen as ...
* src/neverparse/:... this.
* src/Makefile.am: Adjust, and add back the directories mistakenly
removed by previous patch.
* README: Adjust, and keep the file's width under 80 columns.
* configure.ac: Adjust.
* src/neverparse/Makefile.am, src/neverparse/fmterror.cc,
src/neverparse/neverclaimparse.yy,
src/neverparse/neverclaimscan.ll, src/neverparse/public.hh:
Fix copyright.
* src/tgbatest/Makefile.am (check_PROGRAMS): Remove neverclaimread.
* src/tgbatest/ltl2tgba.cc: Add option -XN to read a neverclaim.
* src/tgbatest/readneverclaim.cc: Delete.
* src/tgbatest/neverclaimread.test: Use ltl2tgba instead of
neverclaimread.
2010-11-06 14:35:31 +01:00
Felix Abecassis
ab6ec5cb63 Add never claim parser.
* src/neverclaimparse/: New directory.
* src/neverclaimparse/fmterror.cc: New file.  Print a formatted parse
error on a output stream.
* src/neverclaimparse/neverclaimparse.yy: New file.  Parser declaration
for Bison.
* src/neverclaimparse/neverclaimscan.ll: New file.  Scanner declaration
for Flex.
* src/neverclaimparse/public.hh: New file.  Public header for external
use.
* src/neverclaimparse/parsedecl.hh: New file.  Header file for
Flex-Bison interaction.
* src/neverclaimparse/Makefile.am: New Makefile.
* src/tgbatest/neverclaimread.cc: New file.  Test program for the
never claim parser.
* src/tgbatest/neverclaimread.test: New file.  Test script for the
never claim parser.
* src/tgbatest/Makefile.am: Adjust.
* configure.ac : Adjust.
* README: Adjust.
2010-11-06 14:35:23 +01:00
Alexandre Duret-Lutz
7da112344e Remove `readsave' and fix line numbers in tgbaparse error messages.
* src/tgbaparse/tgbaparse.yy (line): Fix computation of line number
for error messages when parsing conditions.
* src/tgbatest/readsave.test: Check the syntax position of syntax errors
in the diagnostics.  Use ltl2tgba instead of readsave.
* src/tgbatest/Makefile.am (check_PROGRAMS): Remove readsave.
2010-11-06 14:14:18 +01:00
Alexandre Duret-Lutz
a53706c824 * bench/emptchk/pml2tgba.pl: Adjust to work with Spin 5.2.5. 2010-11-06 09:21:37 +01:00
Alexandre Duret-Lutz
b240bd8204 * configure.ac: Do not run CF_GXX_WARNINGS unless they are enabled. 2010-10-07 15:29:35 +02:00
Alexandre Duret-Lutz
1fa1621a6b Hide the safra_tree_automaton type from the public interface.
We do that because the declaration of this type, which is local to
src/tgba/tgbasafracomplement.cc has a member in an anonymous
namespace, and some versions of g++-4.2 issue a very annoying
warning about this legitimate code.  See Bug 29365 on GCC's
Bugzilla.  Report by Silien Hong <silien.hong@lip6.fr>.

* src/tgba/tgbasafracomplement.hh (safra_tree_automaton): Do not
forward declare.
(tgba_safra_complement): Use void* instead of
safra_tree_automaton*.
* src/tgba/tgbasafracomplement.cc: static_cast void* to
safra_tree_automaton* anywhere needed.
2010-10-07 15:17:18 +02:00
Alexandre Duret-Lutz
498b44f742 Revert "Add never claim parser."
Such changes should not be pushed to master before they are finished
(this doesn't pass distcheck).

This reverts commit 9aaa638b27.
2010-06-21 17:42:29 +02:00
Felix Abecassis
9aaa638b27 Add never claim parser.
* src/neverclaimparse/: New directory.
* src/neverclaimparse/fmterror.cc: New file.  Print a formatted parse
error on a output stream.
* src/neverclaimparse/neverclaimparse.yy: New file.  Parser declaration
for Bison.
* src/neverclaimparse/neverclaimscan.ll: New file.  Scanner declaration
for Flex.
* src/neverclaimparse/public.hh: New file.  Public header for external
use.
* src/neverclaimparse/parsedecl.hh: New file.  Header file for
Flex-Bison interaction.
* src/neverclaimparse/Makefile.am: New Makefile.
* src/tgbatest/neverclaimread.cc: New file.  Test program for the
never claim parser.
* src/tgbatest/neverclaimread.test: New file.  Test script for the
never claim parser.
* src/tgbatest/Makefile.am: Adjust.
* configure.ac : Adjust.
* README: Adjust.
2010-05-25 16:45:08 +02:00
Alexandre Duret-Lutz
be6efe94a4 Fix the --enable-optimizations check.
* m4/gccoptim.m4: Add missing AC_LANG_PUSH/AC_LANG_POP around the
C test.  It was using the C++ compiler instead...
2010-05-20 17:16:59 +02:00
Alexandre Duret-Lutz
c9dd3f86b4 * NEWS: Typo. 2010-04-16 13:45:03 +02:00
Alexandre Duret-Lutz
e084e06f43 * NEWS, configure.ac: Bump version to 0.6a. 2010-04-16 10:29:43 +02:00
Alexandre Duret-Lutz
02d01257ed Release Spot 0.6.
* NEWS, configure.ac: Bump version to 0.6.
2010-04-16 09:46:28 +02:00
Alexandre Duret-Lutz
ce51ed3002 Reorder recent additions to reduccmp.test.
* src/ltltest/reduccmp.test: Reorder the test added by the
previous patches.  Some are not supposed to be reduced by
reductaustr.
2010-04-15 19:05:03 +02:00
Alexandre Duret-Lutz
5755a531f9 Fix a long-standing bug in the stronger rule for R and its recent
clone for M.

* src/ltlvisit/contain.cc (reduce_tau03_visitor): Remove
the stronger rules for R and M.  They were wrong.
* src/ltltest/reduccmp.test: Test a simpple counterexample.
2010-04-15 16:07:36 +02:00
Alexandre Duret-Lutz
1a91208933 More simplifications rules for M.
* src/ltlvisit/reduce.cc (reduce_visitor): Add the following
implication rewriting rules:
a M (b M c) = a M c if a implies b.
a M (b R c) = a M c if a implies b.
a R (b R c) = a R c if a implies b.
a R (b M c) = b M c if b implies a.
a M (b M c) = b M c if b implies a.
The latter rule was fixed from an incorrectly copied&pasted
rule for a M (b R c) = b R c if b implies a (this is wrong).
* src/ltltest/reduccmp.test: Add more tests.
2010-04-15 16:07:36 +02:00
Alexandre Duret-Lutz
946f305f7c Speed up syntactic_implication() for constants.
* src/ltlvisit/syntimpl.cc (syntactic_implication): Do not
create visitors if arguments are constant.
2010-04-15 12:27:31 +02:00
Alexandre Duret-Lutz
7021e45f70 Fix simplification of "a M true" as Fa.
* src/ltlvisit/simpfg.cc: Typo.
* src/ltltest/reduccmp.test: Add more tests.
2010-04-15 11:44:17 +02:00
Alexandre Duret-Lutz
9a1769fe78 * HACKING: Bison 2.4.2 has a bugfix we rely on. 2010-04-15 10:59:26 +02:00
Alexandre Duret-Lutz
70669c99ed * src/tgbatest/ltl2tgba.cc (syntax): Add missing black line in
help output.
2010-04-15 09:46:18 +02:00
Alexandre Duret-Lutz
26bd137020 * NEWS: Mention W and M. 2010-04-14 18:58:40 +02:00
Alexandre Duret-Lutz
28094c87da More LTL reductions for W and M.
* src/ltlvisit/basicreduce.cc: Perform the following reductions:
(a R b) | Gb = a R b
(a M b) | Gb = a R b
(a U b) & Fb = a U b
(a W b) & Fb = a U b
* src/ltltest/reduccmp.test: Test them.
2010-04-14 18:58:32 +02:00
Alexandre Duret-Lutz
aa5426b2fb * wrap/python/cgi-bin/ltl2tgba.in: Document W and M operators. 2010-04-12 16:40:42 +02:00
Alexandre Duret-Lutz
e6809b8c66 More LTL reductions for W and M.
* src/ltlvisit/basicreduce.cc: Perform the following reductions:
(a U b) & (c W b) = (a & c) U b
(a W b) & (c W b) = (a & c) W b
(a R b) | (c M b) = (a | c) R b
(a M b) | (c M b) = (a | c) M b
* src/ltltest/reduccmp.test: Test them.
2010-04-12 16:40:41 +02:00
Alexandre Duret-Lutz
f003c3d16f Add LTL reductions for strong release.
* src/ltlvisit/basicreduce.cc: Perform the following reductions.
a R (b & F(a)) = a M b
a M (b & F(a)) = a M b
a R Fa = Fa
a M Fa = Fa
a R b & Fa = a M b
a R b & a M c = a M (b & c)
a M b & a M c = a M (b & c)
* src/ltltest/reduccmp.test: More tests.
2010-04-12 16:40:41 +02:00
Alexandre Duret-Lutz
80ceca599c Add LTL reductions for weak until.
* src/ltlvisit/basicreduce.cc: Perform the following reductions.
a U (b | Ga) = a W b
a W (b | Ga) = a W b
a U b | Ga = a W b
a U b | a W c = a W (b | c)
a W b | a W c = a W (b | c)
a U Ga = Ga
a W Ga = Ga
* src/ltltest/reduccmp.test: More tests.
2010-04-12 16:40:41 +02:00
Alexandre Duret-Lutz
0fc0ea3166 Add support for W (weak until) and M (strong release) operators.
* src/ltlast/binop.cc, src/ltlast/binop.cc: Add support for
these new operators.
* src/ltlparse/ltlparse.yy, src/ltlparse/ltlscan.ll: Parse them.
* src/ltltest/reduccmp.test: Add new tests for W and M.
* src/ltlvisit/basicreduce.cc, src/ltlvisit/contain.cc,
src/ltlvisit/lunabbrev.cc, src/ltlvisit/nenoform.cc,
src/ltlvisit/randomltl.cc, src/ltlvisit/randomltl.hh,
src/ltlvisit/reduce.cc, src/ltlvisite/simpfg.cc,
src/ltlvisit/simpfg.hh, src/ltlvisit/syntimpl.cc,
src/ltlvisit/tostring.cc, src/tgba/formula2bdd.cc,
src/tgbaalgos/eltl2tgba_lacim.cc, src/tgbaalgos/ltl2taa.cc,
src/tgbaalgos/ltl2tgba_fm.cc, src/tgbaalgos/ltl2tgba_lacim.cc:
Add support for W and M.
* src/tgbatest/ltl2neverclaim.test: Test never claim output
using LBTT, this is more thorough.  Also we cannot use -N
any more in the spotlbtt.test.
* src/tgbatests/ltl2tgba.cc: Define M and W for ELTL.
* src/tgbatest/ltl2neverclaim.test: Test W and M, and use
-DS instead of -N, because lbtt-translate does not want
to translate these operators for tools that masquerade as Spin.
2010-04-12 16:40:41 +02:00
Alexandre Duret-Lutz
60dbeb1128 Adjust ltl2tgba.py to call scc_filter() with the "full" option as
appropriate.

* wrap/python/spot.i (spot::scc_filter): Make it available.
* wrap/python/cgi-bin/ltl2tgba.in (reduce_scc): Call scc_filter.
Use the "full" option unless the show_degen_png or
show_never_claim are set.  Also reduce_scc the default.
2010-04-12 16:39:28 +02:00
Alexandre Duret-Lutz
ef3c82e1b0 * src/ltlvisit/basicreduce.cc: Typo in comment. 2010-04-08 15:56:58 +02:00
Alexandre Duret-Lutz
f282338e1c * NEWS: Summarize recent noteworthy changes. 2010-04-08 15:41:42 +02:00
Alexandre Duret-Lutz
bbd526ac81 Modernize Bison parsers.
* src/ltlparse/ltlparse.yy, src/tgbaparse/tgbaparse.yy,
src/evtgbaparse/evtgbaparse.yy, src/eltlparse/eltlparse.yy: Use
token types for %destructor and %printer.  Remove the yylex hack,
since %name-prefix is now honored by Bison.  Also remove the
useless <token> type.  Suggested by Akim Demaille.
2010-04-08 11:53:34 +02:00
Alexandre Duret-Lutz
d71ceb3b04 Fix column in LTL error messages, it was off by one.
* src/ltlparse/fmterror.cc (format_parse_errors): Count columns
starting at 1.  Older Bison used to start at 0 but changed to
match the GNU Coding Standards.
* src/ltltest/parseerr.test: Add a test case.
2010-03-10 15:17:05 +01:00
Alexandre Duret-Lutz
3cf2ddbcb0 Do not rewrite F(a & GF(b)) = F(a) & GF(b), this can be harmful.
* src/ltlvisit/basicreduce.cc (basic_reduce_visitor::recurse):
Disable this rule unconditionally.
* src/ltltest/reduccmp.test: Adjust tests.
2010-03-07 12:36:54 +01:00
Alexandre Duret-Lutz
629dc4c0c9 * src/tgba/tgbatba.cc: Fix English in comments. 2010-03-06 18:07:46 +01:00
Alexandre Duret-Lutz
58b233db6f Reverse the order of expected acceptance conditions in
degeneralization.

* src/tgba/tgbatba.cc (tgba_sba_proxy::tgba_tba_proxy): Build the
list of acceptance condition in the reverse order.  The order is
still arbitrary, but the bdd_satone() call seems to output the
acceptance conditions that are more used first, and this helps the
degeneralization process.
2010-03-06 17:42:48 +01:00