Commit graph

1006 commits

Author SHA1 Message Date
Damien Lefortier
8fe11196bd * src/eltlparse/eltlparse.yy: Fix a memory leak.
* src/eltltest/nfa.cc: Adjust.
* src/tgbaalgos/eltl2tgba_lacim.cc: Fix a memory leak.
2009-06-09 21:18:43 +02:00
Guillaume Sadegh
c5f8eafb01 Add an algorithm to complement Büchi automata.
* src/tgba/tgbacomplement.hh, src/tgba/tgbacomplement.cc: New
	files. The complementation algorithm.
	* src/tgba/Makefile.am: Adjust.
	* src/tgbatest/complementation.test,
	src/tgbatest/complementation.cc: New files. Test suite for the
	complementation algorithm.
	* src/tgbatest/Makefile.am: Adjust.
	* src/tgbaalgos/Makefile.am: Reformat the header using 80
	columns.
2009-06-05 16:25:14 +02:00
Damien Lefortier
e48338e8d8 Modify the ELTL parser to be able to support PSL operators. Add a
new keyword in the ELTL format: finish, which applies to an
automaton operator and tells whether it just completed.

* src/eltlparse/eltlparse.yy: Clean it. Add finish.
* src/eltlparse/eltlscan.ll: Add finish.
* src/formula_tree.cc, src/formula_tree.hh: New files. Define a
small AST representing formulae where atomic props are unknown
which is used in the ELTL parser.
* src/ltlast/automatop.cc, ltlast/automatop.hh, ltlast/nfa.cc,
ltlast/nfa.hh: Adjust.
* src/ltlast/unop.cc, src/ltlast/unop.hh: Finish is an unop.
* src/ltlvisit/basicreduce.cc, src/ltlvisit/nenoform.cc,
src/ltlvisit/reduce.cc, src/ltlvisit/syntimpl.cc,
src/ltlvisit/tostring.cc, src/ltlvisit/tunabbrev.cc,
src/tgba/formula2bdd.cc, src/tgbaalgos/ltl2tgba_fm.cc,
src/tgbaalgos/ltl2tgba_lacim.cc: Handle finish in switches.
* src/tgbaalgos/eltl2tgba_lacim.cc: Translate finish.
* src/tgbatest/eltl2tgba.test: More tests.
2009-06-05 12:01:24 +02:00
Alexandre Duret-Lutz
4de885afb1 * src/tgbatest/scc.test: Redirect stdout into file `stdout'
instead of `out', to conform to other tests, and add a missing
call to diff.
2009-06-02 17:30:52 +02:00
Alexandre Duret-Lutz
a40f362e99 Introduce some experimental kripke classes to simplify writing
interfaces.

* src/kripke/Makefile.am, src/kripke/fairkripke.cc,
src/kripke/fairkripke.hh, src/kripke/kripke.cc,
src/kripke/kripke.hh: New files.
* src/Makefile.am: Recurse into kripke and link libkripke.la.
* configure.ac: Output src/kripke/Makefile.
2009-06-02 17:30:27 +02:00
Alexandre Duret-Lutz
a2b6bef003 * src/tgbatest/scc.test: New file.
* src/tgbatest/Makefile.am: Adjust.
* src/tgbaalgos/scc.hh: More documentation.
* src/tgbaalgos/scc.cc (scc_recurse): Fix computation of
acc_paths and dead_paths.  Prevent recursions in states that
have already been visited.
2009-06-02 15:47:01 +02:00
Alexandre Duret-Lutz
642c2b1a71 Lift the SCC computation off future_condition_collectors, into
a new tgba_scc class.

* src/tgba/futurecondcol.cc, src/tgba/futurecondcol.hh: Move
all delegation functions and scc_map into ...
* src/tgba/tgbascc.cc, src/tgba/tgbascc.hh: ... these new files.
2009-05-31 21:46:05 +02:00
Alexandre Duret-Lutz
352984293a Test "ltl2tgba -FC" and plug the memory leaks of scc_map.
* src/tgbaalgos/scc.hh (scc_map::~scc_map): Declare it.
* src/tgbaalgos/scc.cc (scc_map::~scc_map): Implement it.
(scc_map::build_map): Delete duplicate states.
* src/tbbatest/ltl2tgba.test: Run ltl2tgba -FV to catch
memory leaks with valgrind.
2009-05-28 18:42:18 +02:00
Alexandre Duret-Lutz
d74578ef6e Implement spot::future_conditions_collector.
* src/tgba/futurecondcol.hh, src/tgba/futurecondcol.cc:
New files.
* src/tgba/Makefile.am: Adjust.
* src/tgbatest/ltl2tgba.cc: Add option -FC.
2009-05-28 18:42:18 +02:00
Alexandre Duret-Lutz
a375972f5c * src/tgbaalgos/scc.cc (dump_scc_dot): Use a bit vector instead of
a map to track visited SCC since they are sequentially numbered.
2009-05-28 18:42:18 +02:00
Alexandre Duret-Lutz
15b3b9e07d Number states using negative values and SCCs using nonnegative
values.

Before this change states were numbered using positive values and
SCCs using negative values.  That meant the user had to work with
negative values.  With this changes, the nonnegative values used
to label SCCs can also directly be used as index in the scc_map_.

* src/tgbaalgos/scc.hh (scc_map::scc_of_state,
scc_map::cond_set_of, scc_map::acc_set_of, scc_map::states_of,
scc_map::initial, scc_map::scc_type, scc_map::succ,
scc_map::accepting): Adjust prototypes to take or return unsigned
arguments.
* src/tgbaalgos/scc.cc: Adjust prototypes of the above functions.
(scc_map::build_map, scc_map::relabel_component): Number states
using negative values, and SCCs using nonnegative values.
(dump_scc_dot): Adjust to use nonnegative values.
2009-05-28 18:42:18 +02:00
Alexandre Duret-Lutz
96a7a49c52 Store the scc_map_ as a vector instead of a std::map. There is no
point in using a map since the SCC are numbered in sequence.

* src/tgbaalgos/scc.hh (scc_map::relabel_component): Return the
number of the SCC instead of taking it as argument.
(scc_map::scc_num_): Delete this variable.  scc_map_.size() gives
the same information.
(scc_map::scc_map_type): Define using std::vector instead of
std::map.
* src/tgbaalgos/scc.cc: Adjust all uses.
2009-05-28 18:42:18 +02:00
Alexandre Duret-Lutz
07ead6134e Keep track of conditions in SCC, and add a more verbose dump.
* src/tgbaalgos/scc.hh (scc_map::scc_of_state,
scc_map::cond_set_of, scc_map::acc_set_of, scc_map::states_of):
New functions.
(scc_map::scc::conds): New attribute.
(dump_scc_dot): Take an optional VERBOSE argument.
* src/tgbaalgos/scc.cc (scc_map::scc_of_state,
scc_map::cond_set_of, scc_map::acc_set_of, scc_map::states_of):
Implement these new functions.
(dump_scc_dot): Display number of states, conditions and
acceptance conditions, with VERBOSE is set.
(build_map): Fill the new scc_map::scc::cond field.
2009-05-28 18:41:58 +02:00
Alexandre Duret-Lutz
cbfdcca1f9 Fix assertion in scc.cc 2009-05-28 18:24:34 +02:00
Alexandre Duret-Lutz
6142441f01 * src/tgba/tgba.hh (format_state): s/automata who/automata that/.
* src/evtgba/evtgba.hh (format_state): Likewise.
* src/evtgba/product.hh (format_state): Likewise.
2009-05-28 18:23:42 +02:00
Damien Lefortier
b06c9cd563 Extend the ELTL parser to support more complex aliases of
automaton operators such as Strong=G(F($0))->G(F($1)) and
G=R(false, $0).

* src/eltlparse/eltlparse.yy, src/eltlparse/eltlscan.ll: Add
support for more complex aliases.
* src/eltltest/acc.cc, src/eltltest/acc.test: Adjust.
* src/ltlast/nfa.cc, src/ltlast/nfa.hh (arity): Now returns an
unsigned value.
* src/tgbatest/eltl2tgba.test: Adjust.
* src/tgbalagos/eltl2tgba_lacim.cc: Fix sanity.
2009-04-26 01:41:57 +02:00
Guillaume Sadegh
bbbc1acc14 Minor fixes to compile with GCC 4.4.
2009-04-09  Guillaume SADEGH  <sadegh@lrde.epita.fr>

	* src/eltlparse/eltlparse.yy (subformula): Avoid a comparaison
	between a signed and an unsigned value.
	* src/ltlast/automatop.hh, src/ltlast/automatop.cc (nfa): Avoid
	a name clash with the `nfa' class.
2009-04-09 18:30:51 +02:00
Damien Lefortier
7643c49cbd Correct LaCIM for ELTL and make it work with LBTT.
* src/eltlparse/eltlparse.yy: Adjust.
* src/ltlast/automatop.cc, src/ltlast/automatop.hh,
src/ltlvisit/clone.cc, src/ltlvisit/nenoform.cc: Clean the way we
handle the negation of automaton operators.
* src/ltlvisit/tostring.cc, src/ltlvisit/tostring.hh: Add an
optional argument to output a fully parenthesized string.
* src/tgbaalgos/eltl2tgba_lacim.cc: Fix it.
* src/tgbatest/eltl2tgba.cc: Add a new option (-L) to read formulae
from an LBTT-compatible file.
* src/tgbatest/eltl2tgba.test: A new tests.
* src/tgbatest/spotlbtt.test: Add LaCIM for ELTL.
2009-04-08 20:19:42 +02:00
Damien Lefortier
355461ae99 Extend the ELTL parser to support basic aliases of automaton
operators such as F=U(true,$0) or R=!U(!$0,!$1), and infix
notation for binary automaton operators.

* README: Document the ELTL directories.
* src/eltlparse/eltlparse.yy, src/eltlparse/eltlscan.ll: Add
support for aliases and infix notation.
* src/eltlparse/public.hh, src/ltlast/nfa.cc, src/ltlast/nfa.hh:
Clean them.
* src/eltltest/acc.test, src/tgbatest/eltl2tgba.test: Add tests
for the ELTL parser's extensions.
* src/tgbatest/eltl2tgba.cc: Adjust.
2009-04-04 22:35:23 +02:00
Damien Lefortier
2fbcd7e52f Add support for ELTL (AST & parser), and an adaptation of LaCIM
for ELTL.  This is a new version of the work started in 2008 with
LTL and ELTL formulae now sharing the same class hierarchy.

* configure.ac: Adjust for src/eltlparse/ and src/eltltest/
directories, and call AX_BOOST_BASE.
* m4/boost.m4: New file defining AX_BOOST_BASE([MINIMUM-VERSION]).
* src/Makefile.am: Add eltlparse and eltltest.
* src/eltlparse/: New directory.  Contains the ELTL parser.
* src/eltltest/: New directory.  Contains tests related to
ELTL (parser and AST).
* src/ltlast/Makefile.am: Adjust for ELTL AST files.
* src/ltlast/automatop.cc, src/ltlast/automatop.hh: New files.
Represent automaton operators nodes used in ELTL ASTs.
* src/ltlast/nfa.cc, src/ltlast/nfa.hh: New files.  Represent
simple NFAs used internally by automatop nodes.
* src/ltlast/allnode.hh, src/ltlast/predecl.hh,
src/ltlast/visitor.hh: Adjust for automatop.
* src/ltlvisit/basicreduce.cc, src/ltlvisit/clone.cc,
src/ltlvisit/clone.hh, src/ltlvisit/contain.cc,
src/ltlvisit/dotty.cc, src/ltlvisit/nenoform.cc,
src/ltlvisit/postfix.cc, src/ltlvisit/postfix.hh,
src/ltlvisit/reduce.cc, src/ltlvisit/syntimpl.cc,
src/ltlvisit/tostring.cc: Because LTL and ELTL formulae share the
same class hierarchy, LTL visitors need to handle automatop nodes
to compile.  When it's meaningful the visitor applies on automatop
nodes or simply assert(0) otherwise.
* src/tgba/tgbabddconcretefactory.cc (create_anonymous_state),
src/tgba/tgbabddconcretefactory.hh (create_anonymous_state): New
function used by the LaCIM translation algorithm for ELTL.
* src/tgbaalgos/Makefile.am: Adjust for eltl2tgba_lacim* files.
* src/tgbaalgos/eltl2tgba_lacim.cc,
src/tgbaalgos/eltl2tgba_lacim.hh: New files.  Implementation of
the LaCIM translation algorithm for ELTL.
* src/tgbaalgos/ltl2tgba_fm.cc, src/tgbaalgos/ltl2tgba_lacim.cc:
Handle automatop nodes in the translation by an assert(0).
* src/tgbatest/Makefile.am: Adjust for eltl2tgba.* files.
* src/src/tgbatest/eltl2tgba.cc, src/tgbatest/eltl2tgba.test: New
files
2009-03-26 12:05:08 +01:00
Alexandre Duret-Lutz
90332d8d77 * src/evtgbaparse/evtgbaparse.yy: Stay on 80 columns. 2009-03-25 17:43:55 +01:00
Alexandre Duret-Lutz
efbdc08d9f Update parsers to work with Bison 2.4.1.
* HACKING: Mention that we require Bison >= 2.4 for developers.
* src/evtgbaparse/evtgbaparse.yy, src/tgbaparse/tgbaparse.yy,
src/ltlparse/ltlparse.yy: The sections "%{ ... %}" should now be
renamed "%code requires { ... }" or "%code { ... }" depending on
whether they should end up in the parser's header file or its cc
file.  Also use %language, %locations, %defines, instead of
command-line arguments.
* src/evtgbaparse/Makefile.am, src/tgbaparse/Makefile.am,
src/ltlparse/Makefile.am: Remove the --locations, --defines
and --languages in the call to bison.  Add -Wall -Werror to
catch more errors.
Thanks to Akim Demaille <akim@lrde.epita.fr> for the help.
2009-03-25 17:26:44 +01:00
Alexandre Duret-Lutz
70b6bcf8eb * src/tgbaalgos/scc.hh: Add missing misc/hash.hh inclusion. 2009-03-25 16:44:47 +01:00
Alexandre Duret-Lutz
b1bfdee870 Revert everything related to Damien's work in 2008 (he will commit a new version soon).
Here are the reverted patches:
8c0d1003b0,
25a3114287,
9afbaf6342,
dc0005f4e1,
543190f2bc.
2009-03-25 16:44:05 +01:00
Alexandre Duret-Lutz
3d278663cd typo 2009-02-23 19:06:46 +01:00
Alexandre Duret-Lutz
ab8b2cbceb typos 2009-02-23 15:05:52 +01:00
Alexandre Duret-Lutz
6e4110fabb Typos 2009-02-18 10:03:49 +01:00
Guillaume Sadegh
33652acd62 Update to compile with GCC 4.4.0 (trunk). 2008-12-19 00:15:40 +01:00
Guillaume SADEGH
1d58493be3 Update to compile with the Intel compiler. 2008-12-18 23:41:10 +01:00
Alexandre Duret-Lutz
7998fff056 Compute more statistics about SCCs. 2008-12-11 13:06:58 +01:00
Alexandre Duret-Lutz
b2f7c2d76d Fix tracking of SCCs on the search stack 2008-12-11 13:06:32 +01:00
Alexandre Duret-Lutz
c44d6277f2 Introduce scc.cc to compute SCC stats and map. 2008-12-10 18:14:44 +01:00
Alexandre Duret-Lutz
d5235c6901 Add option -k to ltl2tgba 2008-12-10 18:14:34 +01:00
Alexandre Duret-Lutz
b83349d416 more files to ignore 2008-08-26 14:19:59 +02:00
Damien Lefortier
8c0d1003b0 Start the ELTL translation (LACIM).
Merge all eltlast/ files into formula.hh (except automatop.hh).
2008-06-20 00:27:06 +02:00
Alexandre Duret-Lutz
25a3114287 Merge all ltlast/ files into formula.hh. The forward declaration of visitor was causing error messages too cryptic for users. 2008-06-12 16:33:03 +02:00
Alexandre Duret-Lutz
9afbaf6342 Delete useless *.cc files in ltlast/ 2008-06-12 14:28:29 +02:00
Alexandre Duret-Lutz
dc0005f4e1 src/eltlparse/eltlparse.yy: Include limits.h for INT_MIN and INT_MAX. 2008-06-11 17:01:42 +02:00
Alexandre Duret-Lutz
34d81cd807 src/sanity/includes.test: Remove empty line at beginning of file. 2008-06-11 16:58:44 +02:00
Alexandre Duret-Lutz
9cadc24173 Remove the const qualifier from the return type of formula::hash(), GCC complains. 2008-06-11 16:57:35 +02:00
Alexandre Duret-Lutz
f56721107b src/sanity/includes.test (INCDIR): Remove any trailing slash. 2008-06-03 12:46:19 +02:00
Alexandre Duret-Lutz
ed589d8c5a more files to ignore 2008-06-02 14:35:31 +02:00
Guillaume Sadegh
bc5f13bb4e NIPS VM added to the SPOT distribution.
2008-05-29  Guillaume SADEGH  <sadegh@lrde.epita.fr>

	* iface/nips/nips.cc, iface/nips/nips.hh, iface/nips/common.cc,
	iface/nips/common.hh, iface/nips/Makefile.am: TGBA implementation
	with the NIPS library.
	* iface/nips/emptiness_check.cc: Emptiness check on a Promela
	interface.
	* iface/nips/dottynips.cc: Dot printer on the NIPS interface.
	* iface/nips/compile.sh: Add. Wrapper around nips compiler to
	compile Promela to NIPS bytecode.
	* iface/nips/nips_vm,iface/nips/nips_vm/bytecode.h,
	iface/nips/nips_vm/ChangeLog, iface/nips/nips_vm/COPYING,
	iface/nips/nips_vm/hashtab.c, iface/nips/nips_vm/hashtab.h,
	iface/nips/nips_vm/INSTALL, iface/nips/nips_vm/instr.c,
	iface/nips/nips_vm/instr.h, iface/nips/nips_vm/instr_step.c,
	iface/nips/nips_vm/instr_step.h,
	iface/nips/nips_vm/instr_tools.c,
	iface/nips/nips_vm/instr_tools.h,
	iface/nips/nips_vm/instr_wrap.c,
	iface/nips/nips_vm/instr_wrap.h,
	iface/nips/nips_vm/interactive.c,
	iface/nips/nips_vm/interactive.h, iface/nips/nips_vm/main.c,
	iface/nips/nips_vm/Makefile, iface/nips/nips_vm/Makefile.am,
	iface/nips/nips_vm/nips_asm_help.pl,
	iface/nips/nips_vm/nips_asm_instr.pl,
	iface/nips/nips_vm/nips_asm.pl,
	iface/nips/nips_vm/nips_disasm.pl, iface/nips/nips_vm/nipsvm.c,
	iface/nips/nips_vm/nipsvm.h, iface/nips/nips_vm/README,
	iface/nips/nips_vm/rt_err.c, iface/nips/nips_vm/rt_err.h,
	iface/nips/nips_vm/search.c, iface/nips/nips_vm/search.h,
	iface/nips/nips_vm/split.c, iface/nips/nips_vm/split.h,
	iface/nips/nips_vm/state.c, iface/nips/nips_vm/state.h,
	iface/nips/nips_vm/state_inline.h,
	iface/nips/nips_vm/state_parts.c,
	iface/nips/nips_vm/state_parts.h, iface/nips/nips_vm/timeval.h,
	iface/nips/nips_vm/tools.h: NIPS VM added to the SPOT
	distribution.
	* configure.ac, iface/Makefile.am: Build system updated for the
	NIPS front-end.
2008-05-30 13:22:00 +02:00
Damien Lefortier
543190f2bc Template ltlast/ & ltlenv/ classes in internal/ & Add ELTL parser. 2008-04-17 11:41:41 +02:00
Alexandre Duret-Lutz
21c98c0a01 Kill some FIXMEs.
* src/ltlenv/environment.hh, src/ltlvisit/basicreduce.cc: Remove
useless FIXMEs.
* src/ltlvisit/reduce.cc (reduce_visitor::visit(binop)): Compute
syntactic implications only when needed.
* src/tgbaalgos/reductgba_sim_del.cc
(build_recurse_successor_spoiler): Remplace the FIXME by an assert.
* src/tgba/tgbareduc.cc: Reword some comments, discard old
commented code.
2008-04-14 11:35:57 +02:00
Alexandre Duret-Lutz
43c9c6faaa * src/evtgbaparse/Makefile.am (AM_CXXFLAGS): Remove -Werror
so we tolerate more flex versions.
* src/ltlparse/Makefile.am (AM_CXXFLAGS): Likewise.
* src/tgbaparse/Makefile.am (AM_CXXFLAGS): Likewise.
2008-03-28 17:22:23 +01:00
Alexandre Duret-Lutz
323e326c7d Second thinko in #if/#else. 2008-03-25 16:26:50 +01:00
Alexandre Duret-Lutz
07fd0377e6 Thinko in #if/#else. 2008-03-25 15:43:51 +01:00
Damien Lefortier
b71360ae44 Avoid <iostream> in headers, better use <iosfwd>. 2008-03-21 21:59:34 +01:00
Alexandre Duret-Lutz
c764b2021d * src/tgbatest/ltl2tgba.cc, src/misc/hash.hh: Reformat the header
using 80 columns.
2008-03-21 17:02:57 +01:00