Commit graph

490 commits

Author SHA1 Message Date
Alexandre Duret-Lutz
549c31605d * src/tgbaalgos/emptinesscheck.cc (emptiness_check::remove_component):
Rewrite.
2003-10-24 09:32:24 +00:00
Alexandre Duret-Lutz
071cb5d62c * src/tgbaalgos/emptinesscheck.cc (emptiness_check::check,
emptiness_check::counter_example): Simplify access to hashes
after calls to find() for the same element..
2003-10-23 16:05:51 +00:00
Alexandre Duret-Lutz
fb4873d92e * src/tgbaalgos/emptinesscheck.hh (connected_component::set_of_state):
Rename as ...
(connected_component::set_type): ... this, and define as a hash_set.
(connected_component::has_state): New method.
* src/tgbaalgos/emptinesscheck.cc (connected_component::has_state):
New method.
(emptiness_check::counter_example, emptiness_check::complete_cycle,
emptiness_check::accepting_path): Simplify using has_state().
2003-10-23 15:49:29 +00:00
Alexandre Duret-Lutz
f0dd415f2f * src/tgbaalgos/emptinesscheck.hh (emptiness_check::seen_state_num):
Rename as ...
(emptiness_check::h): ... this, and define as a hash_map.
(emptiness_check::remove_component): Remove superfluous state_map
argument.
* src/tgbaalgos/emptinesscheck.cc: Adjust.
2003-10-23 15:06:57 +00:00
Alexandre Duret-Lutz
dfdefdf672 * src/tgbaalgos/emptinesscheck.hh, src/tgbaalgos/emptinesscheck.cc:
Remove superfluous includes.
2003-10-23 14:40:05 +00:00
Alexandre Duret-Lutz
90099e47a6 * src/tgbaalgos/emptinesscheck.hh (emptiness_check::emptiness_check):
New, take the automaton to work on, and store it ...
(emptiness_check::aut_): ... in this new attribute.
(emptiness_check::tgba_emptiness_check): Rename as ...
(emptiness_check::check): ... this, and remove the automata
argument.
(emptiness_check::counter_example, emptiness_check::print_result,
emptiness_check::remove_component, emptiness_check::accepting_path,
emptiness_check::complete_cycle): Remove the automata argument.
* src/tgbaalgos/emptinesscheck.cc, src/tgbatest/ltl2tgba.cc,
iface/gspn/ltlgspn.cc: Adjust.
2003-10-23 14:17:02 +00:00
Alexandre Duret-Lutz
b60722bc58 * src/tgbaalgos/emptinesscheck.hh (connected_component::not_null,
connected_component::transition_acc,
connected_component::nb_transition,
connected_component::nb_state): Remove these unused attributes.
(connected_component::connected_component): Merge the two
definitions into one.
(connected_component::~connected_component): Remove.
(connected_component::isAccepted): Delete, unused.
* src/tgbaalgos/emptinesscheck.cc
(connected_component::connected_component,
connected_component::~connected_component): Adjust.
(connected_component::isAccepted): Delete.
(spot):

* src/tgbatest/emptchk.test: Typo.
2003-10-23 13:50:15 +00:00
Alexandre Duret-Lutz
636f5238d3 * src/tgbaalgos/emptinesscheck.hh
(emptiness_check::remove_component, emptiness_check::root_component,
emptiness_check::seen_state_num, emptiness_check::suffix): Move in
private part.
(emptiness_check::arc_accepting, emptiness_check::todo): Move ...
* src/tgbaalgos/emptinesscheck.cc
(emptiness_check::tgba_emptiness_check): ... as local variables
of this function.
* src/tgbaalgos/emptinesscheck.hh (emptiness_check::vec_component):
Move ...
(emptiness_check::counter_example): ... as local variable of this
function.
* src/tgbaalgos/emptinesscheck.hh (pair_state_iter, triplet):
Move ...
* src/tgbaalgos/emptinesscheck.cc (pair_state_iter, triplet):
... here.
2003-10-23 13:05:35 +00:00
Alexandre Duret-Lutz
008056f279 * src/tgbaalgos/emptinesscheck.cc (emptiness_check::print_result):
Indent output as in the magic search.
2003-10-23 12:16:04 +00:00
Alexandre Duret-Lutz
46756c9589 * src/tgbatest/spotlbtt.test: Add notice about long run time. 2003-10-23 12:09:34 +00:00
Alexandre Duret-Lutz
d46c63a21b Merge emptinesscheckexplicit into ltl2tgba.
* src/tgbatest/Makefile.am (check_PROGRAMS): Remove
emptinesscheckexplicit.
(emptinesscheckexplicit_SOURCES): Remove.
(TESTS): Replace emptinesscheckexplicit.test by emptchke.test.
* src/tgbatest/emptinesscheckexplicit.cc,
src/tgbatest/emptinesscheckexplicit.test: Delete.
* src/tgbatest/empchke.test: New file.
* src/tgbatest/ltl2tgba.cc: Add support for -X.
2003-10-23 11:58:11 +00:00
Alexandre Duret-Lutz
65f84e2c61 Merge emptiness-checks tests into ltl2tgba.
* src/tgbatest/Makefile (check_PRORGRAMS): Remove
emptinesscheck and ltlmagic.
(emptinesscheck_SOURCES, ltlmagic_SOURCES): Remove.
(TESTS): Replace emptinesscheck.test and ltlmagic.test by
emptchk.test.
* src/tgbatest/emptinesscheck.test, src/tgbatest/ltlmagic.test:
Delete.
* src/tgbatest/emptchk.test: New file.
* src/tgbatest/emptinesscheck.cc, src/tgbatest/ltlmagic.cc:
Delete.
* src/tgbatest/ltl2tgba.cc: Add support for -e, -E, -m, -M, and -n.
2003-10-23 11:37:07 +00:00
Alexandre Duret-Lutz
a11a29a1f7 * src/tgbaalgos/emptinesscheck.cc
(emptiness_check::tgba_emptiness_check): Do not print anything.
(emptiness_check::counter_example): Assume that tgba_emptiness_check
has already been called.
2003-10-23 09:40:55 +00:00
Alexandre Duret-Lutz
93c0732f0e * src/tgbaalgos/emptinesscheck.hh, src/tgbaalgos/emptinesscheck.cc
(emptiness_check::seq_counter, emptiness_check::periode): Rename as ...
(emptiness_check::prefix, emptiness_check::period): ... these.
2003-10-22 15:25:05 +00:00
Alexandre Duret-Lutz
3784895ec7 * src/tgbaalgos/emptinesscheck.cc
(emptiness_check::tgba_emptiness_check,
emptiness_check::accepting_path): Simplify BDD operations.
2003-10-22 14:50:10 +00:00
Alexandre Duret-Lutz
558642fe9c * src/tgbaalgos/emptinesscheck.cc, src/tgbaalgos/emptinesscheck.hh:
Reindent.
(emptiness_check::~emptiness_check, emptiness_check::emptiness_check):
Remove, unused.
2003-10-22 14:33:12 +00:00
Alexandre Duret-Lutz
22a53800d9 * iface/gspn/ltlgspn.cc (main): Allow invocations with
only one atomic proposition.
2003-10-15 09:51:01 +00:00
Alexandre Duret-Lutz
fec0d60886 * src/misc/bddalloc.cc (bdd_allocator::initialize): Augment
bdd_init()'s arguments.
2003-10-14 08:49:31 +00:00
Alexandre Duret-Lutz
c7bbe60f4c * iface/gspn/ltlgspn.cc: Use command-line options to
select algorithms, not #defines.
* iface/gspn/Makefile.am (check_PROGRAMS): Remove eltlgspn-srg,
efmgspn-srg, fmgspn-rg, and fmgspn-srg and their associated
source variables.  These are all replaced by
ltlgspn-rg and ltlgspn-srg.
* iface/gspn/dcswavefm.test, iface/gspn/dcswaveltl.test,
iface/gspn/dcswaveeltl.test, iface/gspn/udcsefm.test,
iface/gspn/udcseltl.test, iface/gspn/udcsfm.test,
iface/gspn/udcsltl.test: Adjust calls to ltlgspn-srg.
2003-10-08 17:27:20 +00:00
Alexandre Duret-Lutz
b64c41abcf * iface/gspn/Makefile.am (XFAIL_TESTS): Remove. 2003-10-08 15:20:38 +00:00
rebiha
6920a1c30f * iface/gspn/ltlgspn.cc: We call tgba_emptiness_check before
counter_example. And we print the prefix and the periode of
counter_example's result.

* src/tgbatest/emptinesscheckexplicit.cc (main):
We call tgba_emptiness_check before counter_example.
* src/tgbatest/emptinesscheck.cc (main):
We call tgba_emptiness_check before counter_example.

* src/tgbaalgos/emptinesscheck.hh (spot):
(spot::print_result): New methode to print the prefix and the
periode of counter_example's result.

* src/tgbaalgos/emptinesscheck.cc (spot): counter_example doesn't
call tgba_emptiness_check. counter_example must be executed after
calling tgba_emptiness_check.  Remove tgba_emptiness_check calls.
(print_result): New methode to print the prefix and the
periode of counter_example's result.  Remove most of all std::cout
during execution of emptiness_check's methodes.
2003-10-07 12:13:30 +00:00
Alexandre Duret-Lutz
9828bf9800 * iface/gspn/udcsfm.test, iface/gspn/udcsefm.test: New files.
* iface/gspn/Makefile.am (TESTS) Add them.
(check_PROGRAMS): Add emgspn-srg.
(efmgspn_srg_SOURCES, efmgspn_srg_LDADD, efmgspn_srg_CPPFLAGS): New
variables.
* iface/gspn/udcsltl.test, iface/gspn/udcseltl.test: Complete.
2003-10-02 16:55:06 +00:00
Alexandre Duret-Lutz
d06e09b951 * src/ltlparse/ltlscan.ll: Allow doubly quoted atomic propositions. 2003-10-02 15:58:57 +00:00
Alexandre Duret-Lutz
694ce34bc5 * iface/gspn/udcsltl.test, iface/gspn/udcseltl.test,
iface/gspn/dcswaveltl.test, iface/gspn/dcswaveeltl.test,
iface/gspn/dcswavefm.test: Do not accept $? = 0 when
a failure is expected.
2003-10-01 16:55:22 +00:00
Alexandre Duret-Lutz
cc0efd8904 * iface/gspn/udcsltl.test, iface/gspn/udcseltl.test: New files
* iface/gspn/Makefile.am (TESTS): Add them.
(XFAIL_TESTS): Add udcseltl.test.
* iface/gspn/example/udcs/udcs.net, iface/gspn/example/udcs/udcs.def
iface/gspn/example/udcs/udcs.tobs: New files.
* iface/gspn/Makefile.am (EXTRA_DIST): Add them.
2003-10-01 14:49:33 +00:00
Alexandre Duret-Lutz
9b2d0ec258 * iface/gspn/Makefile.am (check_PROGRAMS): Add eltlgspn-srg.
(eltlgspn_srg_SOURCES, eltlgspn_srg_LDADD, eltlgspn_srg_CPPFLAGS):
New variables.
(TESTS): Add dcswaveeltl.test.
* iface/gspn/dcswaveeltl.test: New file.
* iface/gspn/ltlgspn.cc [CEC]: Use emptiness_check.
2003-10-01 14:34:14 +00:00
Alexandre Duret-Lutz
e5641f5b69 * m4/debug.m4, m4/devel.m4, m4/gccoptim.m4, m4/ndebug.m4: New files.
* Makefile.am (EXTRA_DIST): Add them.
* configure.ac: Call adl_ENABLE_DEVEL, adl_ENABLE_DEBUG, ad_GCC_OPTIM,
and adl_NDEBUG.
2003-10-01 11:44:57 +00:00
Alexandre Duret-Lutz
2e97e6447b * src/tgba/state.hh (state_ptr_less_than, state_ptr_equal):
Declare as std::binary_function.
(state_ptr_hash): Declare as std::unary_function.
* src/tgbaalgos/lbtt.cc (state_acc_pair_equal,
state_acc_pair_hash): Likewise.
* src/misc/bddlt.hh (bdd_less_than): Likewise.
* src/misc/hash.hh (ptr_hash, string_hash): Likewise.
2003-09-30 16:02:34 +00:00
rebiha
7f3c113130 * src/tgbatest/emptinesscheckexplicit.test (acc): New file.
* src/tgbatest/emptinesscheckexplicit.cc (main): New file.

* src/tgbatest/emptinesscheck.test: New file.

* src/tgbatest/emptinesscheck.cc (main): New file.

* src/tgbaalgos/emptinesscheck.cc (spot): New method.

* src/tgbaalgos/emptinesscheck.hh: New interface.
2003-09-25 15:12:44 +00:00
Alexandre Duret-Lutz
83565fb659 * src/tgbaalgos/ltl2tgba.cc, src/tgbaalgos/ltl2tgba.hh: Rename as ...
* src/tgbaalgos/ltl2tgba_lacim.cc, src/tgbaalgos/ltl2tgba_lacim.hh:
... this, and rename ltl_to_tgba() as ltl_to_tgba_lacim as well.
* iface/gspn/ltlgspn.cc, src/tgbatest/explprod.cc,
src/tgbatest/ltl2tgba.cc, src/tgbatest/ltlmagic.cc,
src/tgbatest/ltlprod.cc, src/tgbatest/mixprod.cc,
src/tgbatest/tripprod.cc, wrap/python/spot.i,
wrap/python/cgi/ltl2tgba.in, wrap/python/tests/interdep.py,
wrap/python/tests/ltl2tgba.py: Adjust.
2003-09-22 15:54:34 +00:00
Alexandre Duret-Lutz
5439b2f4ee * src/tgba/state.hh: Include cassert. 2003-09-10 22:45:45 +00:00
Alexandre Duret-Lutz
f0de38680a * src/tgba/state.hh (state::hash): New method.
(state_ptr_equal, state_ptr_hash): New functors.
* src/tgba/statebdd.hh, src/tgba/statebdd.cc (state_bdd::hash):
New method.
* src/tgba/tgbaexplicit.hh, src/tgba/tgbaexplicit.cc
(state_explicit::hash): New method.
(ns_map, sn_map): Use Sgi::hash_map instead of std::map.
* src/tgba/tgbaproduct.hh, src/tgba/tgbaproduct.cc
(state_product::hash): New method.
* src/tgba/tgbatba.cc (state_tba_proxy::hash): New method.
* src/tgbaalgos/lbtt.cc (acp_seen, todo_set, seen_map): Redefine
using Sgi::hash_map or Sgi::hash_set.
(lbtt_reachable): Don't erase a key that is pointed to by an
iterator.
* src/tgbaalgos/reachiter.cc
(tgba_reachable_iterator::~tgba_reachable_iterator): Likewise.
* src/tgbaalgos/magic.cc (magic_search::~magic_search()): Likewise.
* src/tgbaalgos/magic.hh (hash_type): Redefine using Sgi::hash_map.
* src/tgbaalgos/reachiter.hh (seen_map): Redefine using Sgi::hash_map.
* iface/gspn/gspn.cc (state_gspn::hash): New method.
* src/misc/hash.hh (string_hash): New functor.
2003-08-29 15:54:31 +00:00
Alexandre Duret-Lutz
6da1f35641 * src/tgba/tgbaexplicit.cc (tgba_explicit::all_accepting_conditions)
Compute all_accepting_conditions_ from neg_accepting_conditions_,
not by browsing the dictionary.  The dictionary also contains
accepting conditions from other automata...  This bug was a
consequence of the change from 2003-07-14.
* src/tgbaalgos/save.cc (save_bfs::start()): Likewise, do not
browse the dictionary to print accepting conditions.  Call
->all_accepting_conditions() instead.
* src/tgba/tgbaproduct.cc (tgba_product::tgba_product): Typo
from 2003-08-22 in the computation of all_accepting_conditions_.
* src/tgbatest/explpro3.test: New file.
* src/tgbatest/Makefile.am (TESTS): Add explpro3.test.
* src/tgbatest/explprod.test, src/tgbatest/explpro2.test,
 src/tgbatest/tripprod.test: Sort the output using Perl.
2003-08-29 15:48:23 +00:00
Alexandre Duret-Lutz
1955150999 Rewrite all std::map<const formula*, ...> as
Sgi::hash_map<const formula*, ...>.

* src/misc/hash.hh: New file.
* src/misc/Makefile.am (misc_HEADERS): Add it.
* src/ltlvisit/dotty.cc (dotty_visitor::map): Use a hash_map instead
of a map.
* src/tgba/bdddict.hh (bdd_dict::fv_map, bdd_dict::vf_map,
bdd_dict::ref_set, bdd_dict::var_map): Define as hash_map or
hash_set.
* src/tgbaalgos/ltl2tgba_fm.cc (translate_dict::fv_map,
translate_dict::vf_map): Likewise.
* src/tgba/tgbabddconcretefactory.hh
(tgba_bdd_concrete_factory::acc_map_): Likewise.
* src/tgba/tgbatba.hh, src/tgbaalgos/reachiter.hh: Include <map>.
2003-08-28 16:59:11 +00:00
Alexandre Duret-Lutz
51094329d8 * src/tgba/state.hh (state_ptr_less_than): Make sure left is
non-null.  Suggested by Denis Poitreneaud.
2003-08-25 19:21:02 +00:00
Alexandre Duret-Lutz
18a8037a3e * wrap/python/Makefile.am (MAINTAINERCLEANFILES): Add
buddy_wrap.cxx and buddy.py.
2003-08-23 19:49:35 +00:00
Alexandre Duret-Lutz
39b634641d * src/tgbaalgos/magic.cc (seen_with_magic, seen_without_magic): Remove. 2003-08-23 14:49:49 +00:00
Alexandre Duret-Lutz
1ac0b08695 * wrap/python/cgi/ltl2tgba.in: Fix display of relations for
tgba_bdd_concrete automata.
2003-08-22 12:41:36 +00:00
Alexandre Duret-Lutz
7db71d9afe Fix computation of product acceptance conditions, when the
two operands share some acceptance conditions.
* src/tgba/tgbaproduct.hh (tgba_product::left_acc_complement_,
tgba_product::right_acc_complement_): New attribute.
* src/tgba/tgbaproduct.cc (tgba_product::tgba_product): Set them.
(tgba_product::succ_iter): Use them.
* src/tgba/explpro2.test: New file.
* src/tgba/Makefile.am (TESTS): Add it.
2003-08-22 10:07:02 +00:00
Alexandre Duret-Lutz
8a44ed08ae * tgba/tgbaproduct.cc, tgba/tgbaproduct.hh:
(state_bdd_product, tgba_product_succ_iterator): Rename as ...
(state_product, tgba_succ_iterator_product): ... these.
2003-08-20 10:59:30 +00:00
Alexandre Duret-Lutz
e238135bc1 * iface/gspn/dcswavefm.test: New file.
* iface/gspn/Makefile.am (check_PROGRAMS): Add fmgspn-rg and
fmgspn-srg.
(fmgspn_rg_SOURCES, fmgspn_rg_CPPFLAGS, fmgspn_rg_LDADD,
fmgspn_srg_SOURCES, fmgspn_srg_CPPFLAGS, fmgspn_srg_LDADD):
New variables.
(TESTS): Add dcswavefm.test.
2003-08-20 09:56:12 +00:00
Alexandre Duret-Lutz
138ce95cca * src/ltlast/formula.hh: Make it clear that ref() and unref()
deals with one node, not a entire formula.
2003-08-19 14:01:48 +00:00
Alexandre Duret-Lutz
2113d090bb * configure.ac: Bump version to 0.0i. 2003-08-18 15:35:38 +00:00
Alexandre Duret-Lutz
1f0060b716 * configure.ac, NEWS: Bump version to 0.0h.
* wrap/python/cgi/Makefile.am (CLEANFILES): Clean ltl2tgba.py.
2003-08-18 15:24:21 +00:00
Alexandre Duret-Lutz
f4e9c1defa * wrap/python/tests/ltl2tgba.test: Run $srcdir/ltl2tgba.py, not
ltl2tgba.py.
2003-08-18 13:55:55 +00:00
Alexandre Duret-Lutz
2b9f17202c This implements Couvreur's FM'99 ltl2tgba translation.
* src/tgba/bdddict.cc (bdd_dict::is_registered): Split as ...
(bdd_dict::is_registered_proposition, bdd_dict::is_registered_state,
bdd_dict::is_registered_accepting_variable): ... these.
* src/tgba/bdddict.hh: Likewise.
* src/tgba/tgbaexplicit.cc (tgba_explicit::set_init_state): New method.
(tgba_explicit::declare_accepting_condition): Arrange so that this
function can be called during the construction of the automaton.
(tgba_explicit::complement_all_accepting_conditions): New method.
(tgba_explicit::has_accepting_condition): Adjust to call
bdd_dict::is_registered_accepting_variable.
* src/tgba/tgbaexplicit.hh (tgba_explicit::set_init_state,
tgba_explicit::complement_all_accepting_conditions): New methods.
* src/tgbaalgos/ltl2tgba_fm.cc, src/tgbaalgos/ltl2tgba_fm.hh:
New files.
* src/tgbaalgos/Makefile.am (tgbaalgos_HEADERS,
libtgbaalgos_la_SOURCES): Add them.
* src/tgbaalgos/ltl2tgba.hh: Add bibtex entry in comment.
* src/tgbatest/Makefile.am (check_PROGRAMS): Remove spotlbtt
and tbalbtt.
(tbalbtt_SOURCES, tbalbtt_CXXFLAGS, spotlbtt_SOURCES): Remove.
* src/tgbatest/spotlbtt.cc: Delete, superseded by "ltl2tgba -F -t".
* src/tgbatest/ltl2tgba.cc: Implement the -f and -F options.
* src/tgbatest/spotlbtt.test: Use "ltl2tgba -F -t" instead of
"spotlbtt", "ltl2tgba -F -t -D" instead of "tbalbtt", and add
also check the ltl2tgba_fm translator.
* wrap/python/spot.i: Wrap ltl2tgba_fm.
* wrap/python/cgi/ltl2tgba.in: Add radio buttons to select
between ltl2tgba and ltl2tgba_fm.
* wrap/python/tests/ltl2tgba.py: Add support for the -f option.
* wrap/python/tests/ltl2tgba.test: Try the -f option.
2003-08-15 01:33:09 +00:00
Alexandre Duret-Lutz
519a67babc * src/tgba/state.hh, src/tgba/statebdd.hh, src/tgba/statebdd.cc:
Remove the translate() method.  Useless since 2003-07-14.
2003-08-14 09:18:13 +00:00
Alexandre Duret-Lutz
a76344eef1 * wrap/python/Makefile.am (SUBDIRS): Build `.' first.
* wrap/python/cgi/Makefile.am (ltl2tgba.py): Depend on Makefile.
2003-08-11 11:12:53 +00:00
Alexandre Duret-Lutz
de6314ed74 Revamp the multop interface to allow some basic optimizations like
not constructing a single-child multop.
* src/ltlast/multop.hh (multop::instance(type)): Remove.
(multop::instance(type, formula*, formula*)): Return a formula*.
(multop::instance(type, vec*)): Make it public and return a formula*.
(multop::add_sorted, multop::add):
* src/ltlast/multop.cc (multop::instance(type, vec*)): Rewrite.
(multop::instance(type)): Delete.
(multop::instance(type, formula*, formula*)): Adjust.
(multop::add_sorted, multop::add): Remove.
* src/ltlvisit/clone.cc (clone_visitor::visit(multop*)) Adjust.
* src/ltlvisit/nenoform.cc
(negative_normal_form_visitor::::visit(multop*)) Adjust.
* src/ltltest/equals.test: Make sure `a & a' and `a' are equals.
* wrap/python/tests/ltlsimple.py: Adjust.
2003-08-10 16:29:49 +00:00
Alexandre Duret-Lutz
317fed597b * src/tgba/succiterconcrete.cc, src/tgba/tgbaexplicit.cc,
src/tgba/tgbatba.cc, src/tgbaalgos/lbtt.cc: Use `-' instead of `& !'
between two BDDs.  That's one less call to BuDDy.
2003-08-10 13:09:50 +00:00