Commit graph

894 commits

Author SHA1 Message Date
Denis Poitrenaud
3ea9771942 * src/tgbaalgos/magic.cc: Add a bit state hashing version.
* src/tgbaalgos/se05.cc: Add a bit state hashing version.
* src/tgbaalgos/magic.hh: Make them public.
* src/tgbatest/ltl2tgba.cc: Add the two new emptiness checks.
* src/tgbatest/emptchk.test: Incorporate tests of src/tgbatest/dfs.test.
* src/tgbatest/dfs.test: Introduce new characteristic explicit tests.
2004-11-15 12:16:59 +00:00
Alexandre Duret-Lutz
ca6084160e * wrap/python/cgi/ltl2tgba.in: Add options to check the produced
automata for emptiness, using the existing algorithms.
* wrap/python/spot.i: Declare spot::explicit_magic_search,
and spot::explicit_se05_search as allocating their output.
2004-11-14 23:10:56 +00:00
Alexandre Duret-Lutz
4a7486bbff * configure.ac: Check for srand48 and drand48.
* src/misc/random.cc (srand, drand): Use srand48 and drand48 if
available.
2004-11-12 18:27:09 +00:00
Alexandre Duret-Lutz
5bcb6091fd * src/tgbaalgos/randomgraph.cc, src/tgbaalgos/randomgraph.hh: New files.
* src/tgbaalgos/Makefile.am (tgbaalgos_HEADERS)
(libtgbaalgos_la_SOURCES): Add them.
* src/tgba/tgbaexplicit.hh (tgba_explicit::add_state): Make it public.
* src/tgbatest/randtgba.cc: New file.
* src/tgbatest/Makefile.am (noinst_PROGRAMS, readsave_SOURCES): Add it.
* src/tgbatest/readsave.test: Check a random graph.
2004-11-12 17:24:46 +00:00
Alexandre Duret-Lutz
e54ddd46ed * misc/random.cc, misc/random.hh: New files.
* src/misc/Makefile.am (misc_HEADERS, libmisc_la_SOURCES): Add them.
2004-11-12 16:27:39 +00:00
Alexandre Duret-Lutz
67e133ae51 * src/evtgbaparse/public.hh (evtgba_parse): Fix doxygen comments.
* src/tgbaalgos/projrun.hh (project_tgba_run): Likewise.
2004-11-10 14:14:05 +00:00
Alexandre Duret-Lutz
57792ca541 * src/tgbaalgos/emptiness.hh (print_tgba_run): Document it. 2004-11-10 14:09:37 +00:00
Alexandre Duret-Lutz
21e0e9bc18 * src/tgbaalgos/replayrun.hh,
src/tgbaalgos/replayrun.cc (replay_tgba_run): Take a `debug'
option to decide whether the output should look like that of
print_tgba_run() or a complete debug trace.
* src/tgbatest/ltl2tgba.cc (main): Call replay_tgba_run() with
debug=true.
2004-11-10 13:56:42 +00:00
Alexandre Duret-Lutz
a67e2d0b23 * iface/gspn/ltlgspn.cc (main): Adjust to recent changes to
src/tgbaalgos/magic.cc, call explicit_magic_search() instead of
building a spot::magic_search.
* iface/gspn/udcseltl.test: Adjust to new output of print_tgba_run().
2004-11-10 12:28:47 +00:00
Alexandre Duret-Lutz
9b4edbc387 * src/tgbatest/Makefile.am (TESTS): Remove non-existing magic.test
and se05.test.
2004-11-09 18:13:27 +00:00
Alexandre Duret-Lutz
dc634800bf * src/tgbatest/ltl2tgba.cc (syntax): Fix old typos and reword
some help strings.
2004-11-09 18:08:42 +00:00
Denis Poitrenaud
f52082bcfb * src/tgbaalgos/magic.cc: rewrite to externalize the heap and
prepare it to a bit state hashing version.
* src/tgbaalgos/magic.hh: adapt to the new interface of
magic_search and se05_search.
* src/tgbaalgos/se05.cc: new file.
* src/tgbaalgos/Makefile.am: Add it.
* src/tgbatest/ltl2tgba.cc: Add new emptiness check.
* src/tgbatest/emptchk.test: more tests.
* src/tgbatest/dfs.test: new file.
* src/tgbatest/Makefile.am: Add it.
2004-11-09 17:22:58 +00:00
Alexandre Duret-Lutz
908b6129f4 * src/tgbaalgos/emptiness.cc (print_tgba_run): Output the
labels as formulae rather than bdd sets.
2004-11-09 10:41:25 +00:00
Alexandre Duret-Lutz
9d0bcae806 * src/tgbaalgos/gtec/ce.cc (couvreur99_check_result::accepting_path):
Rewrite as ...
(couvreur99_check_result::accepting_cycle): ... this less complex
implementation.
(couvreur99_check_result::complete_cycle): Delete.
* src/tgbatest/emptchke.test: More explicit examples.
2004-11-08 17:39:48 +00:00
Alexandre Duret-Lutz
263afcd22a * src/tgbaalgos/replayrun.cc (replay_tgba_run): Do not leak
the initial state when no valid outgoing transition is found.
2004-11-08 15:39:52 +00:00
Alexandre Duret-Lutz
7afd10420a * src/tgbaparse/tgbaparse.yy: Add `%destructor's so the parser
does not leak on errors.
* src/tgbatest/ltl2tgba.cc: Free the automata if it could not be
fully parsed.
2004-11-08 14:43:10 +00:00
Alexandre Duret-Lutz
86ff462fa4 * src/tgbaalgos/gtec/ce.cc (couvreur99_check_result::accepting_run):
Remove spurious FIXME.
2004-11-08 10:32:34 +00:00
Alexandre Duret-Lutz
a31ab32b9b * src/evtgbaalgos/save.cc (save_bfs::output_acc_set): Sort
acceptance conditions in the output.
* src/evtgbatest/readsave.test, src/evtgbatest/product.test: Adjust.
2004-11-05 17:26:33 +00:00
Alexandre Duret-Lutz
6c1152d819 * src/tgbaalgos/rundotdec.cc (tgba_run_dotty_decorator::link_decl):
Typo.
2004-11-05 06:46:47 +00:00
Alexandre Duret-Lutz
9444d84a17 * src/tgbaalgos/neverclaim.cc (never_claim_bfs::process_link):
Adjust prototype.
2004-11-04 12:57:04 +00:00
Alexandre Duret-Lutz
d60025dcd1 * src/tgba/tgba.hh, src/tgba/tgba.cc
(tgba::number_of_acceptance_conditions): New method.
* src/tgbaalgos/lbtt.cc (lbtt_bfs::lbtt_bfs): Use it.
2004-11-04 12:55:03 +00:00
Alexandre Duret-Lutz
1d3100607a * wrap/python/spot.i: Generate bindings for tgbaalgos/dottydec.hh,
tgbaalgos/emptiness.hh, tgbaalgos/gtec/gtec.hh, and
tgbaalgos/rundotdec.hh.
2004-11-04 08:03:59 +00:00
Alexandre Duret-Lutz
c3d50ed019 * src/tgbaalgos/lbtt.cc (lbtt_bfs::process_link): Adjust prototype. 2004-11-04 06:59:47 +00:00
Alexandre Duret-Lutz
7688431451 * src/tgbaalgos/dottydec.cc, src/tgbaalgos/dottydec.hh,
src/tgbaalgos/rundotdec.cc, src/tgbaalgos/rundotdec.hh: New files.
* src/tgbaalgos/Makefile.am (tgbaalgos_HEADERS,
libtgbaalgos_la_SOURCES): Add them.
* src/tgbaalgos/dotty.hh (dotty_reachable): Take a dotty_decorator
as third parameter.
* src/tgbaalgos/dotty.cc (dotty_bfs::process_state,
dotty_bfs::process_link): Use the decorator.
* src/tgbatest/ltl2tgba.cc: Graph the accepting run if the -g option
is given.
* src/tgbatest/emptchk.test: Exercize -g.
2004-11-03 15:17:06 +00:00
Alexandre Duret-Lutz
a90b0648f8 * src/tgbaalgos/replayrun.cc (replay_tgba_run): Add missing std::endl. 2004-11-03 12:35:37 +00:00
Alexandre Duret-Lutz
42b05c7a05 * tgbaalgos/reachiter.hh, tgbaalgos/reachiter.cc
(tgba_reachable_iterator::process_link): Take the state* as arguments
in addition to the state numbers.
* src/tgba/tgbaexplicit.hh, src/tgba/tgbaexplicit.cc
(tgba_explicit::copy_acceptance_conditions_of): New method.
* tgbaalgos/dupexp.cc (dupexp_iter::dupexp_iter): Call
copy_acceptance_conditions_of.
(dupexp_iter::process_state, duplex_iter::declare_state,
dupexp_iter::name_): Remove.
(dupexp_iter::process_link): Adjust prototype, and format
the state here rather than in process_state.
* tgbaalgos/stats.cc, tgbaalgos/dotty.cc: Adjust prototype
of process_link.
2004-11-03 11:59:58 +00:00
Alexandre Duret-Lutz
b6f3faba38 * src/ltlvisit/reduce.hh (is_eventual, is_universal): More doc. 2004-11-02 17:16:32 +00:00
Alexandre Duret-Lutz
e3de75f677 * src/tgbaalgos/projrun.hh, src/tgbaalgos/projrun.cc: New files.
* src/tgbaalgos/Makefile.am (tgbaalgos_HEADERS,
libtgbaalgos_la_SOURCES): Add them.
* iface/gspn/ltlgspn.cc (main): Call project_tgba_run if -P.
2004-11-02 16:26:57 +00:00
Alexandre Duret-Lutz
0fd665f3a2 * src/tgbaalgos/emptiness.cc,
src/tgbaalgos/emptiness.hh (print_tgba_run): Take the tgba*
argument before the tgba_run* argument (for consistency with
replay_tgba_run).
* src/tgbatest/ltl2tgba.cc, iface/gspn/ltlgspn.cc: Adjust
calls to print_tgba_run().
2004-11-02 15:25:41 +00:00
Alexandre Duret-Lutz
e5e886a442 * src/ltlast/formula.hh (ltl::formula::~formula): Make it protected. 2004-11-02 13:53:20 +00:00
Alexandre Duret-Lutz
754d7064ae A tgba can now annotate a transition (i.e., the position of a
tgba_succ_iterator) with some string.  This comes handy to
associate that transition to its high-level name.
* src/tgba/tgba.hh, src/tgba/tgba.cc (tgba::transition_annotation):
New method.
* src/tgba/tgbaproduct.hh, src/tgba/tgbaproduct.cc
(tgba_product::transition_annotation): Implement it.
* src/tgba/tgbatba.hh, src/tgba/tgbatba.cc
(tgba_tba_proxy::transition_annotation): Likewise.
* src/tgbaalgos/replayrun.cc (print_annotation): New function.
(replay_tgba_run): Use it.
2004-10-29 16:45:49 +00:00
Alexandre Duret-Lutz
32403566f6 * src/tgbaalgos/gtec/gtec.cc,
src/tgbaalgos/gtec/gtec.hh (couvreur99_check::print_stats): New.
* src/tgbatest/ltl2tgba.cc: Print emptiness-check statistics.
2004-10-29 16:10:47 +00:00
Alexandre Duret-Lutz
55014e9dcc * src/sanity/style.test: Diagnose superfluous constructs such
as `if (x) delete x;'.
* iface/gspn/gspn.cc, iface/gspn/ssp.cc, src/ltlvisit/basicreduce.cc,
src/tgba/tgba.cc, src/tgba/tgbaproduct.cc, src/tgbaalgos/magic.cc,
src/tgbatest/ltl2tgba.cc: Remove such constructs.
2004-10-29 14:29:02 +00:00
Alexandre Duret-Lutz
4654da9ab5 * src/tgbatest/ltl2tgba.cc: Replace -e, -E, -m, -M, and -n by
-eALGO and -EALGO to ease the addition of new algorithms.
* src/tgbatest/emptchk.test, src/tgbatest/emptchke.test: Adjust.
2004-10-29 13:15:01 +00:00
Alexandre Duret-Lutz
7fce2b2a95 * src/misc/version.cc: Fix trailing whitespace.
* src/sanity/style.test: Diagnose trailing whitespace.
2004-10-29 12:41:56 +00:00
Alexandre Duret-Lutz
8c0b085d73 * src/tgbatest/ltl2tgba.cc: Fix lines longer than 80 chars.
* src/sanity/80columns.test: Use expand to untabify, the previous
recipe was incomplete.
2004-10-29 12:31:13 +00:00
Alexandre Duret-Lutz
720a31c128 * src/tgbaalgos/replayrun.cc (replay_tgba_run): Note duplicate states. 2004-10-29 12:19:18 +00:00
Alexandre Duret-Lutz
cf45539312 * src/tgbaalgos/replayrun.cc (replay_tgba_run): Verify the run is
accepting.
2004-10-29 11:51:21 +00:00
Alexandre Duret-Lutz
434475dbc8 * src/tgbaalgos/gtec/ce.cc (couvreur99_check_result::accepting_path):
Initialize best_end to remove a spurious warning.
2004-10-29 07:05:30 +00:00
Alexandre Duret-Lutz
e7bc4f2a5a * src/tgbaalgos/gtec/ce.cc (couvreur99_check_result::accepting_run,
couvreur99_check_result::complete_cycle,
couvreur99_check_result::accepting_path): Record conditions and
acceptance conditions in the accepting run.  Simplify the
todo BFS stack for accepting_run and complete_cycle.
* src/tgbatest/ltl2tgba.cc (main): Do use replay_tgba_run
now everything works.
* src/tgbaalgos/replayrun.cc (replay_tgba_run): Be more verbose
when an outgoing transition is not found.
2004-10-29 00:30:09 +00:00
Alexandre Duret-Lutz
35a286ba41 * src/tgbaalgos/magic.hh, src/tgbaalgos/magic.cc (magic_search):
Record the acceptance conditions in the accepting run.
* src/tgbaalgos/replayrun.cc (replay_tgba_run): Fix logic.
2004-10-28 22:02:53 +00:00
Alexandre Duret-Lutz
7819f14db2 * src/tgbaalgos/replayrun.cc, src/tgbaalgos/replayrun.hh: New files.
Cannot test them because the run returned by the emptiness checks
are currently incomplete (they lack the acceptance conditions, and
sometimes even the labels in the prefix).
* src/tgbaalgos/Makefile.am (tgbaalgos_HEADERS,
libtgbaalgos_la_SOURCES): Add them.
* src/tgbatest/ltl2tgba.cc (main): Prepare to use replay_tgba_run
when the emptiness checks are fixed.
2004-10-28 12:10:12 +00:00
Alexandre Duret-Lutz
6c815004c4 Introduce an emptiness-check interface, and modify the existing
algorithms to conform to it, uniformly.  This will unfortunately
break third-party code that were using these algorithms.
* src/tgbaalgos/emptiness.cc, src/tgbaalgos/emptiness.hh: New files.
* src/tgbaalgos/Makefile.am: New files.
* src/tgbaalgos/magic.cc, src/tgbaalgos/magic.hh: Adjust to
conform to the new emptiness-check interface.
* src/tgbaalgos/gtec/ce.cc, src/tgbaalgos/gtec/ce.hh,
src/tgbaalgos/gtec/gtec.cc, src/tgbaalgos/gtec/gtec.hh,
src/tgbaalgos/gtec/status.cc, src/tgbaalgos/gtec/status.hh:
Likewise.  The classes have been renamed are as following
  emptiness_check -> couvreur99_check
  emptiness_check_shy -> couvreur99_check_shy
  counter_example -> couvreur99_check_result
* src/tgbatest/ltl2tgba.cc, iface/gspn/ltlgspn.cc, iface/gspn/ssp.hh,
iface/gspn/ssp.cc: Adjust to renaming and new interface.
2004-10-27 16:47:54 +00:00
Alexandre Duret-Lutz
7010a02cd9 * src/evtgbaalgos/tgba2evtgba.cc, src/evtgbaalgos/tgba2evtgba.hh:
New files.
* src/evtgbaalgos/Makefile.am (evtgbaalgos_HEADERS,
libevtgbaalgos_la_SOURCES): Add them.
* src/evtgbatest/ltl2evtgba.cc, src/evtgbatest/ltl2evtgba.test:
New files.
* src/evtgbatest/Makefile.am (check_PROGRAMS, TESTS): Add them.
(ltl2evtgba_SOURCES): New variable.
2004-10-27 11:18:13 +00:00
Alexandre Duret-Lutz
b89f1e252e * src/tgbaalgos/ltl2tgba_fm.cc (ltl_to_tgba_fm): Do not assert
that the true state has only one link when unobs is used.
2004-10-27 11:13:52 +00:00
Alexandre Duret-Lutz
0864d1ca1e * src/evtgbatest/Makefile.am (CLEANFILES): New variable. 2004-10-23 07:49:08 +00:00
Alexandre Duret-Lutz
73ff928b6f Preliminary support for Event-based GBA.
* src/evtgba/Makefile.am, src/evtgba/evtgba.cc,
src/evtgba/evtgba.hh, src/evtgba/evtgbaiter.hh,
src/evtgba/explicit.cc, src/evtgba/explicit.hh,
src/evtgba/product.cc, src/evtgba/product.hh,
src/evtgba/symbol.cc, src/evtgba/symbol.hh,
src/evtgbaalgos/Makefile.am, src/evtgbaalgos/dotty.cc,
src/evtgbaalgos/dotty.hh, src/evtgbaalgos/reachiter.cc,
src/evtgbaalgos/reachiter.hh, src/evtgbaalgos/save.cc,
src/evtgbaalgos/save.hh, src/evtgbaparse/Makefile.am,
src/evtgbaparse/evtgbaparse.yy, src/evtgbaparse/evtgbascan.ll,
src/evtgbaparse/fmterror.cc, src/evtgbaparse/parsedecl.hh,
src/evtgbaparse/public.hh, src/evtgbatest/Makefile.am,
src/evtgbatest/defs.in, src/evtgbatest/explicit.cc,
src/evtgbatest/explicit.test, src/evtgbatest/product.cc,
src/evtgbatest/product.test, src/evtgbatest/readsave.cc,
src/evtgbatest/readsave.test: New files.
* configure.ac: Create the Makefiles in these new subdirectories.
* src/Makefile.am: Recurse them.
2004-10-22 16:22:31 +00:00
Alexandre Duret-Lutz
d9b29a0590 * src/misc/bareword.hh, src/misc/bareword.cc (quote_unless_bare_word):
New function.
2004-10-22 16:06:55 +00:00
Alexandre Duret-Lutz
38f7cac8dd * src/ltlvisit/tostring.cc (to_spin_string_visitor): Move to
anonymous namespace.
2004-10-22 12:29:13 +00:00
Alexandre Duret-Lutz
91b9682bd8 * wrap/python/Makefile.am (_spot_la_SOURCES): Add spot_wrap.h. 2004-10-21 11:01:27 +00:00