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

@ -565,7 +565,6 @@ an identifier: <span class="formula">aUb</span> is an atomic proposition, unlike
<ul class="head">
<li>Translator Algorithm:</li>
<li><a href="#tabs-tfm" class="btip" title="A tableau construction that uses BDDs to symbolically represent each state of the automaton. This is the best algorithm of the three, and the only one that has been extended to support PSL operators.">Couvreur/FM</a></li>
<li><a href="#tabs-tla" class="btip" title="Builds a purely symbolic automaton, using BDDs to encode the transition relation. The translation itself is fast (it uses a number of BDD operations that is linear in the size of the formula), but the resulting symbolic encoding is better used symbolically. If you develop it explicitly (e.g. to draw it, as on this page) the result can easily have an exponential number of states.">Couvreur/LaCIM</a></li>
<li><a href="#tabs-tta" class="btip" title="An implementation of Heikki Tauriainen's Ph.D. thesis algorithm to translate LTL formulas via very weak alternating automata with transition-based generalized acceptance conditions.">Tauriainen/TAA</a></li>
<li><a href="#tabs-tl3" class="btip" title="An improved version of LTL2BA, overhauled by Tomáš Babiak during his Ph.D., and described at TACAS'12.<br>LTL3BA is not part of Spot. Options in this tab correspond to options offered by LTL3BA, and have some overlap with the options offered by Spot upstream and downstream.">LTL3BA</a></li>
<li><a href="#tabs-tcs" class="btip" title="Compositionnal suspension.<br>To be presented at Spin'13. Suspendable formulas are formulas such as <span class='formula'>GFa</span> or <span class='formula'>FGb</span> whose verification can always be postponed by a finite number of step. In this approach, we extract all suspendable subformulas, translate them separately from the main, skeleton automaton, only to merge them back in the accepting SCC.">Comp.Susp.</a></li>
@ -591,12 +590,6 @@ an identifier: <span class="formula">aUb</span> is an atomic proposition, unlike
fair-loop approximations
</label><br>
</div>
<div id="tabs-tla">
<label class="rtip" title="The automaton built by Couvreur/LaCIM is represented symbolically using BDDs. Useless SCCs can be removed using a series of fix-point operations. You may want to disable the <b>prune unaccepting SCCs</b> automaton simplification.">
<INPUT type="checkbox" name="la" value="sp" checked>
symbolically prune unaccepting SCCs
</label><br>
</div>
<div id="tabs-tta">
<label class="rtip" title="Enable a refined set of translation rules, based on language inclusion between subformulas. Because language inclusion between formula is tested using automata operations on translations for subformulas, this option can be slow.">
<INPUT type="checkbox" name="ta" value="lc" checked>

View file

@ -1,6 +1,6 @@
#!@PYTHON@
# -*- mode: python; coding: utf-8 -*-
# Copyright (C) 2011, 2012, 2013 Laboratoire de Recherche et
# Copyright (C) 2011, 2012, 2013, 2014 Laboratoire de Recherche et
# Développement de l'Epita (LRDE).
#
# This file is part of Spot, a model checking library.
@ -518,10 +518,6 @@ if translator == 'fm':
automaton = spot.ltl_to_tgba_fm(f, dict,
exprop, symb_merge,
branching_postponement, fair_loop_approx)
elif translator == 'la':
automaton = spot.ltl_to_tgba_lacim(f, dict)
if form.getfirst('la', '') == 'sp':
automaton.delete_unaccepting_scc()
elif translator == 'ta':
refined_rules = False
if form.getfirst('ta', '') == 'lc':
@ -594,6 +590,9 @@ elif translator == 'cs':
automaton = spot.compsusp(f, dict, cs_nowdba, cs_nosimul,
cs_early_start, donot_inject)
else:
unbufprint('''<div class="error">unsupported translator</div>''')
finish()
# Monitor output
if output_type == 'm':

View file

@ -62,6 +62,8 @@ namespace std {
#include "ltlparse/public.hh"
#include "tgba/bdddict.hh"
#include "ltlvisit/dotty.hh"
#include "ltlvisit/dump.hh"
#include "ltlvisit/lunabbrev.hh"
@ -71,17 +73,12 @@ namespace std {
#include "ltlvisit/tunabbrev.hh"
#include "ltlvisit/apcollect.hh"
#include "tgba/bdddict.hh"
#include "tgba/bddprint.hh"
#include "tgba/state.hh"
#include "tgba/succiter.hh"
#include "tgba/tgba.hh"
#include "tgba/sba.hh"
#include "tgba/statebdd.hh"
#include "tgba/taatgba.hh"
#include "tgba/tgbabddcoredata.hh"
#include "tgba/succiterconcrete.hh"
#include "tgba/tgbabddconcrete.hh"
#include "tgba/tgbaexplicit.hh"
#include "tgba/tgbaproduct.hh"
#include "tgba/tgbatba.hh"
@ -95,7 +92,6 @@ namespace std {
#include "tgbaalgos/lbtt.hh"
#include "tgbaalgos/ltl2taa.hh"
#include "tgbaalgos/ltl2tgba_fm.hh"
#include "tgbaalgos/ltl2tgba_lacim.hh"
#include "tgbaalgos/compsusp.hh"
#include "tgbaalgos/magic.hh"
#include "tgbaalgos/minimize.hh"
@ -175,6 +171,8 @@ using namespace spot;
%include "ltlparse/public.hh"
%include "tgba/bdddict.hh"
%include "ltlvisit/dotty.hh"
%include "ltlvisit/dump.hh"
%include "ltlvisit/lunabbrev.hh"
@ -192,7 +190,6 @@ using namespace spot;
%feature("new") spot::explicit_se05_search;
%feature("new") spot::ltl_to_taa;
%feature("new") spot::ltl_to_tgba_fm;
%feature("new") spot::ltl_to_tgba_lacim;
%feature("new") spot::compsusp;
%feature("new") spot::minimize_wdba;
%feature("new") spot::minimize_monitor;
@ -218,17 +215,12 @@ using namespace spot;
// Help SWIG with namespace lookups.
#define ltl spot::ltl
%include "tgba/bdddict.hh"
%include "tgba/bddprint.hh"
%include "tgba/state.hh"
%include "tgba/succiter.hh"
%include "tgba/tgba.hh"
%include "tgba/sba.hh"
%include "tgba/statebdd.hh"
%include "tgba/taatgba.hh"
%include "tgba/tgbabddcoredata.hh"
%include "tgba/succiterconcrete.hh"
%include "tgba/tgbabddconcrete.hh"
%include "tgba/tgbaexplicit.hh"
%include "tgba/tgbaproduct.hh"
%include "tgba/tgbatba.hh"
@ -241,6 +233,13 @@ namespace spot {
};
}
%template(tgba_explicit_succ_iterator__string)
spot::tgba_explicit_succ_iterator<state_explicit_string>;
%template(tgba_explicit_succ_iterator__number)
spot::tgba_explicit_succ_iterator<state_explicit_number>;
%template(tgba_explicit_succ_iterator__formula)
spot::tgba_explicit_succ_iterator<state_explicit_formula>;
%template(explicit_graph__string_tgba)
spot::explicit_graph<state_explicit_string, tgba>;
%template(explicit_graph__number_tgba)
@ -298,7 +297,6 @@ namespace spot {
%include "tgbaalgos/lbtt.hh"
%include "tgbaalgos/ltl2taa.hh"
%include "tgbaalgos/ltl2tgba_fm.hh"
%include "tgbaalgos/ltl2tgba_lacim.hh"
%include "tgbaalgos/compsusp.hh"
%include "tgbaalgos/magic.hh"
%include "tgbaalgos/minimize.hh"

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'