Remove ltl2tgba_lacim and all supporting classes.

This translator algorithm is seldom used in practice because we work
with explicit automata everywhere, and this is only useful to build
symbolic automata.  Furthermore, the symbolic automata produced by this
algorithm are larger (when looked at explicitly) than those produced by
ltl2tgba_fm or other explicit translators.

The nice side effect of this removal is that we can also remove a lot of
supporting classes, that were relying a lot on BDDs.

* src/tgba/public.hh, src/tgba/statebdd.cc, src/tgba/statebdd.hh,
src/tgba/succiterconcrete.cc, src/tgba/succiterconcrete.hh,
src/tgba/tgbabddconcrete.cc, src/tgba/tgbabddconcrete.hh,
src/tgba/tgbabddconcretefactory.cc, src/tgba/tgbabddconcretefactory.hh,
src/tgba/tgbabddconcreteproduct.cc, src/tgba/tgbabddconcreteproduct.hh,
src/tgba/tgbabddcoredata.cc, src/tgba/tgbabddcoredata.hh,
src/tgba/tgbabddfactory.hh, src/tgbaalgos/ltl2tgba_lacim.cc,
src/tgbaalgos/ltl2tgba_lacim.hh, src/tgbatest/bddprod.test,
src/tgbatest/mixprod.cc, src/tgbatest/mixprod.test: Delete all these
files.
* bench/ltlcounter/Makefile.am, bench/ltlcounter/README,
bench/ltlcounter/plot.gnu, bench/ltlcounter/run, src/tgba/Makefile.am,
src/tgbaalgos/Makefile.am, src/tgbatest/Makefile.am,
src/tgbatest/cycles.test, src/tgbatest/dupexp.test,
src/tgbatest/emptchk.test, src/tgbatest/ltl2tgba.cc,
src/tgbatest/ltl2tgba.test, src/tgbatest/ltlcross.test,
src/tgbatest/ltlprod.cc, src/tgbatest/spotlbtt.test,
src/tgbatest/wdba.test, src/tgbatest/wdba2.test,
src/tgba/tgbaexplicit.hh, wrap/python/ajax/ltl2tgba.html,
wrap/python/ajax/spot.in, wrap/python/spot.i,
wrap/python/tests/interdep.py, wrap/python/tests/ltl2tgba.py,
wrap/python/tests/ltl2tgba.test: Adjust.
This commit is contained in:
Alexandre Duret-Lutz 2014-07-08 16:22:43 +02:00
parent 26b932828b
commit 116fe8654f
43 changed files with 111 additions and 2291 deletions

View file

@ -25,24 +25,33 @@
import buddy
import spot
import sys
simp = spot.ltl_simplifier()
e = spot.default_environment.instance()
p = spot.empty_parse_error_list()
f = spot.parse('GFa', p, e)
dict = spot.bdd_dict()
a = spot.ltl_to_tgba_lacim(f, dict)
d = simp.get_dict()
a = spot.ltl_to_tgba_fm(f, d)
g = spot.parse('b&c', p, e)
b = simp.as_bdd(g)
buddy.bdd_printset(b); spot.nl_cout()
del g
s0 = a.get_init_state()
b = s0.as_bdd()
sys.stdout.write("%s\n" % b)
iter = a.succ_iter(s0)
iter.first()
while not iter.done():
c = iter.current_condition()
it = a.succ_iter(s0)
it.first()
while not it.done():
c = it.current_condition()
sys.stdout.write("%s\n" % c)
b &= c # `&=' is defined only in buddy. So if this statement works
# it means buddy can grok spot's objects.
iter.next()
buddy.bdd_printset(c); spot.nl_cout()
it.next()
buddy.bdd_printset(b); spot.nl_cout()
sys.stdout.write("%s\n" % b)
del b
del c
del f
del a
del simp

View file

@ -31,14 +31,11 @@ def usage(prog):
sys.stderr.write("""Usage: %s [OPTIONS...] formula
Options:
-a display the acceptance_conditions BDD, not the reachability graph
-A same as -a, but as a set
-d turn on traces during parsing
-D degeneralize the automaton
-f use Couvreur's FM algorithm for translation
-r display the relation BDD, not the reachability graph
-R same as -r, but as a set
-t display reachable states in LBTT's format
-T use ltl2taa for translation
-v display the BDD variables used by the automaton
""" % prog)
sys.exit(2)
@ -46,7 +43,7 @@ Options:
prog = sys.argv[0]
try:
opts, args = getopt.getopt(sys.argv[1:], 'aAdDfrRtv')
opts, args = getopt.getopt(sys.argv[1:], 'dDftTv')
except getopt.GetoptError:
usage(prog)
@ -55,24 +52,19 @@ debug_opt = False
degeneralize_opt = None
output = 0
fm_opt = 0
taa_opt = 0
for o, a in opts:
if o == '-a':
output = 2
elif o == '-A':
output = 4
elif o == '-d':
if o == '-d':
debug_opt = True
elif o == '-D':
degeneralize_opt = 1
elif o == '-f':
fm_opt = 1
elif o == '-r':
output = 1
elif o == '-R':
output = 3
elif o == '-t':
output = 6
elif o == '-T':
taa_opt = 1
elif o == '-v':
output = 5
else:
@ -98,8 +90,10 @@ if f:
if fm_opt:
a = spot.ltl_to_tgba_fm(f, dict)
concrete = 0
elif taa_opt:
a = concrete = spot.ltl_to_taa(f, dict)
else:
a = concrete = spot.ltl_to_tgba_lacim(f, dict)
assert "unspecified translator"
f.destroy()
del f
@ -109,24 +103,6 @@ if f:
if output == 0:
spot.dotty_reachable(cout, a)
elif output == 1:
if concrete:
spot.bdd_print_dot(cout, concrete.get_dict(),
concrete.get_core_data().relation)
elif output == 2:
if concrete:
spot.bdd_print_dot(cout, concrete.get_dict(),
concrete.get_core_data().acceptance_conditions)
elif output == 3:
if concrete:
spot.bdd_print_set(cout, concrete.get_dict(),
concrete.get_core_data().relation)
spot.nl_cout()
elif output == 4:
if concrete:
spot.bdd_print_set(cout, concrete.get_dict(),
concrete.get_core_data().acceptance_conditions)
spot.nl_cout()
elif output == 5:
a.get_dict().dump(cout)
elif output == 6:

View file

@ -1,4 +1,6 @@
#!/bin/sh
# Copyright (C) 2014 Laboratoire de Recherche et
# Développement de l'EPITA.
# Copyright (C) 2003 Laboratoire d'Informatique de Paris 6 (LIP6),
# département Systèmes Répartis Coopératifs (SRC), Université Pierre
# et Marie Curie.
@ -24,15 +26,15 @@ set -e
# We don't check the output, but just running these might be enough to
# trigger assertions.
./run $srcdir/ltl2tgba.py a
./run $srcdir/ltl2tgba.py 'a U b'
./run $srcdir/ltl2tgba.py 'X a'
./run $srcdir/ltl2tgba.py 'a & b & c'
./run $srcdir/ltl2tgba.py 'a | b | (c U (d & (g U (h ^ i))))'
./run $srcdir/ltl2tgba.py 'Xa & (b U !a) & (b U !a)'
./run $srcdir/ltl2tgba.py 'Fa & Xb & GFc & Gd'
./run $srcdir/ltl2tgba.py 'Fa & Xa & GFc & Gc'
./run $srcdir/ltl2tgba.py 'Fc & X(a | Xb) & GF(a | Xb) & Gc'
./run $srcdir/ltl2tgba.py -T a
./run $srcdir/ltl2tgba.py -T 'a U b'
./run $srcdir/ltl2tgba.py -T 'X a'
./run $srcdir/ltl2tgba.py -T 'a & b & c'
./run $srcdir/ltl2tgba.py -T 'a | b | (c U (d & (g U (h ^ i))))'
./run $srcdir/ltl2tgba.py -T 'Xa & (b U !a) & (b U !a)'
./run $srcdir/ltl2tgba.py -T 'Fa & Xb & GFc & Gd'
./run $srcdir/ltl2tgba.py -T 'Fa & Xa & GFc & Gc'
./run $srcdir/ltl2tgba.py -T 'Fc & X(a | Xb) & GF(a | Xb) & Gc'
./run $srcdir/ltl2tgba.py -f a
./run $srcdir/ltl2tgba.py -f 'a U b'