Commit graph

1074 commits

Author SHA1 Message Date
Alexandre Duret-Lutz
b7db0c3085 [buddy] Fix the previous patch in reorder.c 2009-10-01 13:33:36 +02:00
Guillaume Sadegh
44ab903b86 The sgba proxy adds an acceptance condition to every states when
the original automaton has no acceptance condition.

* src/tgba/tgbasgba.cc, src/tgba/tgbasgba.hh: New option:
when the original automaton has no accepting condition, it
explicitly considers that every state is accepting.
2009-10-01 00:35:54 +02:00
Guillaume Sadegh
6d18623e4b * src/tgba/tgbacomplement.cc: Move functions related to
shared_ptr on states...
* src/tgba/state.hh: ... here.
* src/tgbatest/complementation.test: Do not apply some tests on
the new algorithm because it takes to much time to run.
2009-10-01 00:32:06 +02:00
Guillaume Sadegh
d6e22c0674 A new complementation construction based on ranking.
* src/tgba/tgbacomplement.cc, src/tgba/tgbacomplement.hh: The
construction.
* src/tgbatest/Makefile.am: Adjust.
* src/tgbatest/complementation.cc: Add options to support this
construction in addition to Safra construction.
* src/tgba/Makefile.am: Adjust.
* src/tgbatest/complementation.test: Adjust to test also this
complementation.
2009-10-01 00:32:06 +02:00
Guillaume Sadegh
d037008cdc * src/ltltest/randltl.cc, src/ltltest/reduc.test,
src/tgbatest/dfs.test: Adjust headers to 80 columns.
2009-10-01 00:32:06 +02:00
Guillaume Sadegh
8f5f0354ad A wrapper around tgba to produce state-labeled automata.
* src/tgba/tgbasgba.hh, src/tgba/tgbasgba.hh: Here.
* src/tgbatest/ltl2tgba.cc: New option `-lS' for state-labeled
automata.
* src/tgba/Makefile.am: Adjust and sort files in tgba_HEADERS
and libtgba_la_SOURCES.
2009-10-01 00:32:06 +02:00
Guillaume Sadegh
9775dd9701 Rename files related to Safra complementation.
* src/tgba/tgbacomplement.cc, src/tgba/tgbacomplement.hh: Rename
as...
* src/tgba/tgbasafracomplement.cc,
src/tgba/tgbasafracomplement.hh: ... these, and adjust class name.
* src/tgba/Makefile.am, src/tgbatest/Makefile.am: Adjust.
* src/tgbatest/complementation.cc: Adjust.
2009-10-01 00:32:06 +02:00
Alexandre Duret-Lutz
1208365b8c Fix previous patch.
* src/tgbaalgos/scc.cc (scc_map::update_supp_rec): Also take the
label of the outgoing edges into account.
2009-09-28 15:29:31 +02:00
Alexandre Duret-Lutz
fd0de04d24 Optimize previous patch.
* src/tgbaalgos/scc.hh (scc_map::scc::supp_rec): Initialize to
bddfalse, since this cannot occur in reallife.
* src/tgbaalgos/scc.cc (scc_map::update_supp_rec): Adjust.
2009-09-18 10:39:07 +02:00
Alexandre Duret-Lutz
fa8dd7f160 Have scc_map keep track of APs that are reachable from a SCC.
* src/tgbaalgos/scc.hh (scc_map::scc): Add a supp_rec member to
hold reachable APs.
* src/tgbaalgos/scc.cc (scc_map::update_supp_rec): New function,
to update supp_rec.
(scc_map::build_map): Call it.
(scc_map::aprec_set_of): New function.
(dump_scc_dot): Show the output of aprec_set_of().
2009-09-17 17:56:55 +02:00
Alexandre Duret-Lutz
b3486965a0 Have scc_map keep track of APs that are occurring in a SCC.
* src/tgbaalgos/scc.hh (scc_map::scc): Add a supp member to hold APs.
* src/tgbaalgos/scc.cc (scc_map::build_map): Update supp.
(scc_map::ap_set_of): New function.
(dump_scc_dot): Show the output of ap_set_of().
2009-09-17 15:06:30 +02:00
Alexandre Duret-Lutz
ada681d813 [buddy] Fix some issues reported by LLVM/Clang's static analyser. 2009-09-08 11:05:45 +02:00
Damien Lefortier
995335618a Fix some memory leaks.
* src/eltlparse/eltlparse.yy: Free the automatop::vec when
CHECK_ARITY fails while parsing an automatop.
* src/eltltest/acc.cc: Free all constructed formulae.
2009-09-07 16:41:49 +02:00
Alexandre Duret-Lutz
4964c9a1a4 Fix a memory leak in reduce_tau03().
* src/ltlvisit/contain.cc (reduce_tau03_visitor::visit): Free
the operand array when a multop reduces to a constant.
2009-09-07 16:10:40 +02:00
Alexandre Duret-Lutz
058bb83c6d Fix a memory leak in randltl.
* src/ltltest/randltl.cc: Free the atomic properties from AP
before exit.
2009-09-07 14:35:35 +02:00
Damien Lefortier
edd4b2b532 Add an algorithm (from Couvreur) working on BDDs to reduce the
size of TGBAs represented as BDDs by deleting unaccepting SCCs.

* src/eltlparse/eltlparse.yy: Remove a warning.
* src/tgba/tgbabddconcrete.cc, src/tgba/tgbabddconcrete.hh,
src/tgba/tgbabddcoredata.cc, src/tgba/tgbabddcoredata.hh: Add a
new function delete_unaccepting_scc in both classes.
* src/tgbatest/eltl2tgba.cc, src/tgbatest/spotlbtt.test: Use this
new function in LaCIM for ELTL and bench it.
* src/tgbatest/defs.in: Fix it.
* bench/ltl2tgba/algorithms, bench/ltl2tgba/defs.in: Add LaCIM for
ELTL in benchs.
2009-09-07 14:26:42 +02:00
Alexandre Duret-Lutz
dc8cb56b67 Fix path to libtool in test suites.
* src/ltltest/defs.in, src/eltltest/defs.in, src/tgbatest/defs.in,
src/evtgbatest/defs.in (run): Use ../../../libtool instead of
../../libtool, now that testcases have been moved down one directory.
2009-09-02 10:41:19 +02:00
Alexandre Duret-Lutz
1098c62de2 Use Automake 1.11's parallel-tests feature.
* configure.ac: Enable parallel-tests.
* src/eltltest/defs.in, src/evtgbatest/defs.in,
src/ltltest/defs.in, src/tgbatest/defs.in: Always output verbose
tests.  Make a subdirectory for each test case.
* src/ltltest/Makefile.am, src/eltltest/Makefile.am,
src/tgbatest/Makefile.am, src/evtgbatest/Makefile.am: Remove
CLEANFILES and clean the test subdirectories in a distclean-local
rule instead.
* src/eltltest/acc.test, src/eltltest/nfa.test,
src/evtgbatest/explicit.test, src/evtgbatest/ltl2evtgba.test,
src/evtgbatest/product.test, src/evtgbatest/readsave.test,
src/ltltest/equals.test, src/ltltest/lunabbrev.test,
src/ltltest/nenoform.test, src/ltltest/parse.test,
src/ltltest/parseerr.test, src/ltltest/reduc.test,
src/ltltest/reduccmp.test, src/ltltest/syntimpl.test,
src/ltltest/tostring.test, src/ltltest/tunabbrev.test,
src/ltltest/tunenoform.test, src/tgbatest/bddprod.test,
src/tgbatest/complementation.test, src/tgbatest/dfs.test,
src/tgbatest/dupexp.test, src/tgbatest/eltl2tgba.test,
src/tgbatest/emptchk.test, src/tgbatest/emptchke.test,
src/tgbatest/emptchkr.test, src/tgbatest/explicit.test,
src/tgbatest/explpro2.test, src/tgbatest/explpro3.test,
src/tgbatest/explpro4.test, src/tgbatest/explprod.test,
src/tgbatest/ltl2neverclaim.test, src/tgbatest/ltl2tgba.test,
src/tgbatest/ltlprod.test, src/tgbatest/mixprod.test,
src/tgbatest/readsave.test, src/tgbatest/reduccmp.test,
src/tgbatest/reductgba.test, src/tgbatest/scc.test,
src/tgbatest/spotlbtt.test, src/tgbatest/tgbaread.test,
src/tgbatest/tripprod.test: Adjust to run from a subdirectory.
2009-09-02 10:41:19 +02:00
Alexandre Duret-Lutz
1f7aa90d74 more files to ignore 2009-09-02 10:41:18 +02:00
Alexandre Duret-Lutz
f22b5ae371 * configure.ac: Switch to Automake 1.11 and enable color-tests. 2009-09-02 10:41:18 +02:00
Alexandre Duret-Lutz
43ba3f8378 [buddy] configure.ac: Switch from Libtool 1.5.x to Libtool 2.x, and add an AC_CONFIG_MACRO_DIR call. 2009-09-02 10:41:18 +02:00
Alexandre Duret-Lutz
9eecd6aed5 * configure.ac: Switch from Libtool 1.5.x to Libtool 2.x, and
add an AC_CONFIG_MACRO_DIR call.
* m4/libtool.m4, tools/ltmain.sh: Remove.
2009-09-02 10:41:15 +02:00
Flix Abecassis
b19ea79f43 Add TGBA union implementation.
* src/tgba/tgbaunion.cc, src/tgba/tgbaunion.hh: New files.
Union of two TGBAs.
* src/tgba/Makefile.am: Adjust.
2009-07-30 16:48:01 +02:00
Guillaume Sadegh
afeaf287e9 * m4/intel.m4: Fix to support the cache. 2009-07-09 21:29:50 +02:00
Guillaume Sadegh
fd9ec01743 * src/tgba/tgbacomplement.cc: Stay on 80 columns. 2009-07-08 18:09:21 +02:00
Flix Abecassis
414956c51e Add 2 benchmarks directories.
Add an algorithm to split an automaton in several automata.

* bench/scc-stats: New directory.  Contains input files and test
program for computing statistics.
* bench/split-product: New directory.  Contains test program for
synchronised product on splitted automata.
* bench/split-product/models: New directory.  Contains Promela
files and LTL formulae that should be verified by the models.
* src/tgba/tgbafromfile.cc, src/tgba/tgbafromfile.hh:
New files.  Small class to avoid long initializations with numerous
constants when translating to TGBA many LTL formulae from a
given file.
* src/tgbaalgos/cutscc.cc, src/tgbaalgos/cutscc.hh:
New file.  From a single automaton, create, at most,
X sub automata.
* src/tgbaalgos/scc.cc, src/tgbaalgos/scc.hh:
Adjust to compute self-loops count.
2009-07-08 17:01:43 +02:00
Guillaume Sadegh
a160b3504b * src/tgba/tgbacomplement.cc: Fix the transformation from
Streett to TGBA.
* src/tgbatest/complementation.test: Modify tests.
2009-07-07 14:16:31 +02:00
Alexandre Duret-Lutz
9c7201c3b1 * bench/emptchk/pml2tgba.pl: Adjust to work with Spin 5.2.0. 2009-06-17 16:28:44 +02:00
Guillaume Sadegh
b3e8797c51 [lbtt] Adjust to support the Intel compiler (icpc).
* configure.ac: Adjust to call...
    * m4/intel.m4: ...this new macro.
    * Makefile.am: Add the directory `m4' as an includedir of
    autoconf's macros.
2009-06-12 16:38:25 +02:00
Guillaume Sadegh
bf925aaeeb [buddy] Adjust to support the Intel compiler (icc).
* configure.ac: Adjust to call...
    * m4/intel.m4: ...this new macro.
2009-06-12 16:37:21 +02:00
Guillaume Sadegh
7ac816f38e Adjust the build system for ICC.
* m4/intel.m4: Remove the `-W' option from CXXFLAGS since icpc
    does not support it. Inhibit the warning ``method was declared
    but never referenced''.
2009-06-12 16:37:21 +02:00
Alexandre Duret-Lutz
d1cf819540 Kill a g++-4.2 warning.
* src/tgba/tgbacomplement.cc (state_complement::state_complement)
explicitly initialize the base class spot::state.
2009-06-11 18:35:01 +02:00
Guillaume Sadegh
e0a8114f06 During the complementation, transform the auxiliary Streett automaton
into a TGBA instead of a TBA.

    * src/tgba/tgbacomplement.hh, src/tgba/tgbacomplement.cc:
    Adjust the transformation from Streett to Büchi to support
    generalized acceptance conditions.
    * src/tgbatest/complementation.cc: Improve output messages.
    * src/tgbatest/complementation.test: New tests.
2009-06-10 03:37:05 +02:00
Guillaume Sadegh
4d4fc641b5 * src/tgba/tgbacomplement.cc, src/tgbatest/complementation.cc: Fix style. 2009-06-10 03:34:08 +02:00
Guillaume Sadegh
7817f325eb More files to ignore. 2009-06-10 03:34:08 +02:00
Guillaume Sadegh
3a3e5d4bff * src/tgba/tgbacomplement.cc (state_complement::hash): Improve
the hash function.
2009-06-10 03:34:08 +02:00
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
78f8f1640c Remove generated files that git follows.
* INSTALL, lbtt/INSTALL, lbtt/doc/texinfo.tex: Do not track
	anymore these generated files.
2009-06-05 16:35:57 +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
2cc7c253f1 [lbtt] Adjust parser to Bison 2.4.1. 2009-05-31 21:27:47 +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