* bench/ltl2tgba/Makefile.am, bench/ltl2tgba/README,

bench/ltl2tgba/algorithms, bench/ltl2tgba/big,
bench/ltl2tgba/defs.in, bench/ltl2tgba/formulae.ltl,
bench/ltl2tgba/known, bench/ltl2tgba/parseout.pl,
bench/ltl2tgba/small: New files.
* src/tgbatest/ltl2baw.pl: Move ...
* bench/ltl2tgba/ltl2baw.in: ... here.
* src/tgbatest/Makefile.am: Adjust.
* configure.ac: Adjust.
This commit is contained in:
Alexandre Duret-Lutz 2005-04-15 13:38:23 +00:00
parent 7753938fe9
commit a7cf769a24
14 changed files with 861 additions and 7 deletions

View file

@ -0,0 +1,7 @@
Makefile.in
Makefile
*.cfg
*.txt
*.log
defs
ltl2baw.pl

View file

@ -0,0 +1,11 @@
EXTRA_DIST = \
algorithms \
big \
formulae.ltl \
known \
parseout.pl \
small
CLEAN_FILES = \
big.cfg big.log big.txt \
small.cfg small.log small.txt \
known.cfg known.log known.txt

94
bench/ltl2tgba/README Normal file
View file

@ -0,0 +1,94 @@
This directory contains benchmark scripts for LTL-to-Büchi translators.
They are all based on lbtt.
==========
CONTENTS
==========
* algorithms
The lbtt configuration of all the algorithms. More about these below.
* small
* big
* known
Run lbtt on, respectively:
small formulae (size 10, 4 propositions)
big formulae (size 12..15, 8 propositions)
known formulae (96 formulae from formulae.ltl)
Each script generates 3 files:
xxxx.cfg: the configuration file for lbtt
xxxx.log: the log of lbtt's execution (also output when the script runs)
xxxx.txt: the sumary of the test (also output at the end of the script)
* ltl2baw.in
* ltl2baw.pl
ltl2baw.pl is generated from ltl2baw.in by configure. This perl
script converts the intermediate generalized automata computed by
ltl2ba into a form usable by lbtt.
* formulae.ltl
A list of LTL formulae used by the `known' check.
See ../emptchk/README for the sources.
* parseout.pl
This scripts is used to create *.txt files from *.log files.
====================
ALGORITHMS & TOOLS
====================
The page http://spot.lip6.fr/wiki/LtlTranslationBenchmark explains
all the keys used and the different tools involved in the benchmark.
Spot's configure script checks for the tools needed in the
benchmark, and the script in this directory should omit the tools
that are not available.
=======================
Reading the summaries
=======================
The files small.txt, big.txt, and known.txt contain a summary of the
results. Each algorithm is described as two lines formated as
follows.
18: FM, gen, +symb_merge, -exprop, LTLopt
494 / 975 / 100 / 4.25 98798 / 3935920 (100)
The first line presents the name of the algorithm ("FM, gen,
+symb_merge, -exprop, LTLopt") and its number for lbtt (18).
The number is useless. See http://spot.lip6.fr/wiki/LtlTranslationBenchmark
for the naming conventions.
The second line display 7 values:
1. the total number of states of all generated automata (494)
2. the total number of transitions of all generated automata (975)
3. the total number of acceptance conditions of all generated automata (100)
4. the cumulated translation time in seconds (4.25)
5. the total number of states in the synchronized products (98798)
6. the total number of transitions in the synchronized products (3935920)
7. the number of translated automata (100)
Notes:
* Small translation times are not accurate because most of the translators
are run through scripts that translate their input from and their ouput to
the format understood by lbtt. For fast translators, most of the time
is spent through these wrappers. (For instance Spot's ltl2tgba is
run through lbtt-translate, and depending on how Spot has been configured
w.r.t. to dynamic libraries, ltl2tgba itself is often a shell script that
run the real binary with the locally built libraries.)
* Some tools will appear to have translated fewer automata than the
others. This normally indicates bugs in the translator. In that
case it is harder to compare the results. (Normalizing the other
values accordingly may not be fair: maybe the translator precisely
failed to translate the largest automata.)

282
bench/ltl2tgba/algorithms Normal file
View file

@ -0,0 +1,282 @@
cat >"$conffile" <<EOF
Algorithm
{
Name = "LaCIM, degen"
Path = "$LBTT_TRANSLATE"
Parameters = "--spot '$LTL2TGBA -t -D -F'"
Enabled = yes
}
Algorithm
{
Name = "LaCIM, gen"
Path = "$LBTT_TRANSLATE"
Parameters = "--spot '$LTL2TGBA -t -F'"
Enabled = yes
}
Algorithm
{
Name = "LaCIM, degen, +pre"
Path = "$LBTT_TRANSLATE"
Parameters = "--spot '$LTL2TGBA -t -D -r4 -F'"
Enabled = yes
}
Algorithm
{
Name = "LaCIM, gen, +pre"
Path = "$LBTT_TRANSLATE"
Parameters = "--spot '$LTL2TGBA -t -r4 -F'"
Enabled = yes
}
Algorithm
{
Name = "FM, degen, +symb_merge, +exprop, LTLopt"
Path = "$LBTT_TRANSLATE"
Parameters = "--spot '$srcdir/ltl2baw.pl --spot=\"-f -t -x -D\" -F'"
Enabled = yes
}
Algorithm
{
Name = "FM, degen, +symb_merge, +exprop, +pre"
Path = "$LBTT_TRANSLATE"
Parameters = "--spot '$LTL2TGBA -r4 -f -t -x -D -F'"
Enabled = yes
}
Algorithm
{
Name = "FM, degen, +symb_merge, +exprop, +pre, +post"
Path = "$LBTT_TRANSLATE"
Parameters = "--spot '$LTL2TGBA -r4 -R1q -R1t -R3 -f -t -x -D -F'"
Enabled = yes
}
Algorithm
{
Name = "FM, degen, +symb_merge, +exprop, +pre, +post, +flapprox"
Path = "$LBTT_TRANSLATE"
Parameters = "--spot '$LTL2TGBA -r4 -R1q -R1t -R3 -L -f -t -x -D -F'"
Enabled = yes
}
Algorithm
{
Name = "FM, degen, +symb_merge, +exprop, +pre, +post, +flapprox, +post_branch"
Path = "$LBTT_TRANSLATE"
Parameters = "--spot '$LTL2TGBA -r4 -R1q -R1t -R3 -L -f -t -x -D -p -F'"
Enabled = yes
}
Algorithm
{
Name = "FM, degen, +symb_merge, +exprop, +post_branch, LTLopt"
Path = "$LBTT_TRANSLATE"
Parameters = "--spot '$srcdir/ltl2baw.pl --spot=\"-f -x -p -t -D\" -F'"
Enabled = yes
}
Algorithm
{
Name = "FM, degen, +symb_merge, +exprop, +flapprox, LTLopt"
Path = "$LBTT_TRANSLATE"
Parameters = "--spot '$srcdir/ltl2baw.pl --spot=\"-f -x -t -L -D\" -F'"
Enabled = yes
}
Algorithm
{
Name = "FM, degen, +symb_merge, +exprop, +post_branch, +flapprox, LTLopt"
Path = "$LBTT_TRANSLATE"
Parameters = "--spot '$srcdir/ltl2baw.pl --spot=\"-f -x -p -t -L -D\" -F'"
Enabled = yes
}
Algorithm
{
Name = "FM, gen, -symb_merge, -exprop"
Path = "$LBTT_TRANSLATE"
Parameters = "--spot '$LTL2TGBA -F -f -y -t'"
Enabled = yes
}
Algorithm
{
Name = "FM, gen, -symb_merge, +exprop"
Path = "$LBTT_TRANSLATE"
Parameters = "--spot '$LTL2TGBA -F -f -y -x -t'"
Enabled = yes
}
Algorithm
{
Name = "FM, gen, +symb_merge, -exprop"
Path = "$LBTT_TRANSLATE"
Parameters = "--spot '$LTL2TGBA -F -f -t'"
Enabled = yes
}
Algorithm
{
Name = "FM, gen, +symb_merge, +exprop"
Path = "$LBTT_TRANSLATE"
Parameters = "--spot '$LTL2TGBA -F -f -x -t'"
Enabled = yes
}
Algorithm
{
Name = "FM, gen, -symb_merge, -exprop, LTLopt"
Path = "$LBTT_TRANSLATE"
Parameters = "--spot './ltl2baw.pl --spot=\"-f -y -t\" -F'"
Enabled = yes
}
Algorithm
{
Name = "FM, gen, -symb_merge, +exprop, LTLopt"
Path = "$LBTT_TRANSLATE"
Parameters = "--spot './ltl2baw.pl --spot=\"-f -y -x -t\" -F'"
Enabled = yes
}
Algorithm
{
Name = "FM, gen, +symb_merge, -exprop, LTLopt"
Path = "$LBTT_TRANSLATE"
Parameters = "--spot './ltl2baw.pl --spot=\"-f -t\" -F'"
Enabled = yes
}
Algorithm
{
Name = "FM, gen, +symb_merge, +exprop, LTLopt"
Path = "$LBTT_TRANSLATE"
Parameters = "--spot './ltl2baw.pl --spot=\"-f -x -t\" -F'"
Enabled = yes
}
Algorithm
{
Name = "FM, gen, +symb_merge, +exprop, +post_branch, LTLopt"
Path = "$LBTT_TRANSLATE"
Parameters = "--spot './ltl2baw.pl --spot=\"-f -x -p -t\" -F'"
Enabled = yes
}
Algorithm
{
Name = "FM, gen, +symb_merge, +exprop, +flapprox, LTLopt"
Path = "$LBTT_TRANSLATE"
Parameters = "--spot './ltl2baw.pl --spot=\"-f -x -L -t\" -F'"
Enabled = yes
}
Algorithm
{
Name = "FM, gen, +symb_merge, +exprop, +post_branch, +flapprox, LTLopt"
Path = "$LBTT_TRANSLATE"
Parameters = "--spot './ltl2baw.pl --spot=\"-f -x -p -L -t\" -F'"
Enabled = yes
}
Algorithm
{
Name = "FM, gen, +symb_merge, +exprop, +pre"
Path = "$LBTT_TRANSLATE"
Parameters = "--spot '$LTL2TGBA -r4 -f -t -x -F'"
Enabled = yes
}
Algorithm
{
Name = "FM, gen, +symb_merge, +exprop, +pre, +post"
Path = "$LBTT_TRANSLATE"
Parameters = "--spot '$LTL2TGBA -r4 -R1q -R1t -R3 -f -t -x -F'"
Enabled = yes
}
Algorithm
{
Name = "FM, gen, +symb_merge, +exprop, +pre, +post, +flapprox"
Path = "$LBTT_TRANSLATE"
Parameters = "--spot '$LTL2TGBA -r4 -R1q -R1t -R3 -L -f -t -x -F'"
Enabled = yes
}
Algorithm
{
Name = "FM, gen, +symb_merge, +exprop, +pre, +post, +flapprox, +post_branch"
Path = "$LBTT_TRANSLATE"
Parameters = "--spot '$LTL2TGBA -r4 -R1q -R1t -R3 -L -f -t -x -p -F'"
Enabled = yes
}
Algorithm
{
Name = "Spin"
Path = "$LBTT_TRANSLATE"
Parameters = "--spin $SPIN"
Enabled = $HAVE_SPIN
}
Algorithm
{
Name = "LBT"
Path = "$LBTT_TRANSLATE"
Parameters = "--lbt $LBT"
Enabled = $HAVE_LBT
}
Algorithm
{
Name = "LTL2BA, degen"
Path = "$LBTT_TRANSLATE"
Parameters = "--spin $LTL2BA"
Enabled = $HAVE_LTL2BA
}
Algorithm
{
Name = "LTL2BA, gen (unfair)"
Path = "$LBTT_TRANSLATE"
Parameters = "--spot './ltl2baw.pl -F'"
Enabled = $HAVE_LTL2BA
}
Algorithm
{
Name = "Wring (Wring RewRule+BoolOpt+AutSempl)"
Path = "$WRING2LBTT"
Parameters = "--5"
Enabled = $HAVE_WRING2LBTT
}
Algorithm
{
Name = "Wring (Wring RewRule+BoolOpt+AutSempl), degen"
Path = "$WRING2LBTT"
Parameters = "-d --5"
Enabled = $HAVE_WRING2LBTT
}
Algorithm
{
Name = "Modella -o1 -g -e -r12"
Path = "$MODELLA"
Parameters = "-o1 -g -e -r12"
Enabled = $HAVE_MODELLA
}
Algorithm
{
Name = "NBA"
Path = "$LTL2NBA"
Enabled = $HAVE_LTL2NBA
}
EOF

78
bench/ltl2tgba/big Normal file
View file

@ -0,0 +1,78 @@
#!/bin/sh
# -*- shell-script -*-
# Copyright (C) 2005 Laboratoire d'Informatique de Paris 6 (LIP6),
# département Systèmes Répartis Coopératifs (SRC), Université Pierre
# et Marie Curie.
#
# This file is part of Spot, a model checking library.
#
# Spot is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# Spot is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
# License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Spot; see the file COPYING. If not, write to the Free
# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
. ./defs
conffile=big.cfg
logfile=big.log
sumfile=big.txt
. "$srcdir/algorithms"
cat >>"$conffile" <<EOF
GlobalOptions
{
Rounds = 100
Interactive = Never
# Verbosity = 5
# ComparisonCheck = no
ConsistencyCheck = no
# IntersectionCheck = no
}
StateSpaceOptions
{
Size = 200
Propositions = 8
}
FormulaOptions
{
Size = 15...20
Propositions = 8
AbbreviatedOperators = No
GenerateMode = Normal
OutputMode = NNF
PropositionPriority = 50
TruePriority = 1
FalsePriority = 1
AndPriority = 10
OrPriority = 10
XorPriority = 0
EquivalencePriority = 0
BeforePriority = 0
StrongReleasePriority = 0
WeakUntilPriority = 0
UntilPriority = 30
DefaultOperatorPriority = 15
}
EOF
"$LBTT" --configfile="$conffile" | tee "$logfile"
"$srcdir"/parseout.pl "$logfile" | tee "$sumfile"

54
bench/ltl2tgba/defs.in Normal file
View file

@ -0,0 +1,54 @@
# -*- shell-script -*-
# Copyright (C) 2005 Laboratoire d'Informatique de Paris 6 (LIP6),
# département Systèmes Répartis Coopératifs (SRC), Université Pierre
# et Marie Curie.
#
# This file is part of Spot, a model checking library.
#
# Spot is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# Spot is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
# License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Spot; see the file COPYING. If not, write to the Free
# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# Ensure we are running from the right directory.
test -f ./defs || {
echo "defs: not found in current directory" 1>&2
exit 1
}
srcdir='@srcdir@'
# Ensure $srcdir is set correctly.
test -f "$srcdir/defs.in" || {
echo "$srcdir/defs.in not found, check \$srcdir" 1>&2
exit 1
}
LBT='@LBT@'
LBTT='@LBTT@'
LBTT_TRANSLATE="@LBTT_TRANSLATE@"
LTL2BA='@LTL2BA@'
LTL2NBA='@LTL2NBA@'
LTL2TGBA='@top_builddir@/src/tgbatest/ltl2tgba@EXEEXT@'
MODELLA='@MODELLA@'
SPIN='@SPIN@'
WRING2LBTT='@WRING2LBTT@'
for var in LBT LTL2BA LTL2NBA MODELLA SPIN WRING2LBTT
do
if eval 'test -z "$'$var'"'; then
eval HAVE_$var=no
else
eval HAVE_$var=yes
fi
done

View file

@ -0,0 +1,94 @@
U p0 p1
U p0 U p1 p2
V ! p0 V ! p1 ! p2
| U t V f ! p0 V f U t p1
U U t p0 V f p1
U V f p0 p1
& & U t U t p0 V f ! p0 & U t p0 V f V f ! p0
& V f U t p0 U t V f ! p1
& & V f U t p0 U t V f ! p1 & V f U t p1 U t V f ! p0
V p0 | p0 p1
| U X p0 X p1 X V ! p0 ! p1
| U X p0 p1 X V ! p0 | ! p0 ! p1
& V f | ! p0 U t p1 | U X p0 p1 X V ! p0 | ! p0 ! p1
& V f | ! p0 U t p1 | U X p0 X p1 X V ! p0 ! p1
V f | ! p0 U t p1
U t & p0 X U ! p1 ! p2
& U t V f ! p0 V f U t ! p1
V f & U t p0 U t p1
& U t p0 U t ! p0
V & X p1 p2 X U V U p3 p0 p2 V p3 p2
| | & V f | p1 V f U t p0 V f | p2 V f U t ! p0 V f p1 V f p2
| | & V f | p1 U t V f p0 V f | p2 U t V f ! p0 V f p1 V f p2
& & | U t & ! p1 U t V f ! p0 U t & ! p2 U t V f p0 U t p1 U t p2
& & | U t & ! p1 V f U t ! p0 U t & ! p2 V f U t p0 U t p1 U t p2
& V f | p1 X V f p0 V f | p2 X V f ! p0
V f | p1 & X p0 X ! p0
| U p0 p0 U p1 p0
U p0 & p1 V f p2
U p0 & p1 X U p2 p3
U p0 & p1 X & p2 U t & p3 X U t & p4 X U t & p5 X U t p6
U t & p0 X V f p1
U t & p0 X & p1 X U t p2
U t & p0 X U p1 p2
| U t V f p0 U t V f p1
V f | ! p0 U p1 p2
U t & p0 X U t & p1 X U t & p2 X U t p3
& & & & V f U t p0 V f U t p1 V f U t p2 V f U t p3 V f U t p4
| | U p0 U p1 p2 U p1 U p2 p0 U p2 U p0 p1
V f | ! p0 U p1 | V f p2 V f p3
[](!p0)
<>p1 -> (!p0 U p1)
[](p2 -> [](!p0))
[]((p2 & !p1 & <>p1) -> (!p0 U p1))
[](p2 & !p1 -> (!p0 U (p1 | []!p0)))
<>(p0)
!p1 U ((p0 & !p1) | []!p1)
[](!p2) | <>(p2 & <>p0)
[](p2 & !p1 -> (!p1 U ((p0 & !p1) | []!p1)))
[](p2 & !p1 -> (!p1 U (p0 & !p1)))
<>p1 -> ((!p0 & !p1) U (p1 | ((p0 & !p1) U (p1 | ((!p0 & !p1) U (p1 | ((p0 & !p1) U (p1 | (!p0 U p1)))))))))
[]((p2 & <>p1) -> ((!p0 & !p1) U (p1 | ((p0 & !p1) U (p1 | ((!p0 & !p1) U (p1 | ((p0 & !p1) U (p1 | (!p0 U p1))))))))))
[](p2 -> ((!p0 & !p1) U (p1 | ((p0 & !p1) U (p1 | ((!p0 & !p1) U (p1 | ((p0 & !p1) U (p1 | (!p0 U (p1 | []!p0)) | []p0)))))))))
[](p0)
<>p1 -> (p0 U p1)
[](p2 -> [](p0))
[]((p2 & !p1 & <>p1) -> (p0 U p1))
[](p2 & !p1 -> (p0 U (p1 | [] p0)))
!p0 U (p3 | []!p0)
<>p1 -> (!p0 U (p3 | p1))
[]!p2 | <>(p2 & (!p0 U (p3 | []!p0)))
[]((p2 & !p1 & <>p1) -> (!p0 U (p3 | p1)))
[](p2 & !p1 -> (!p0 U ((p3 | p1) | []!p0)))
[](p0 -> <>p3)
<>p1 -> (p0 -> (!p1 U (p3 & !p1))) U p1
[](p2 -> [](p0 -> <>p3))
[]((p2 & !p1 & <>p1) -> (p0 -> (!p1 U (p3 & !p1))) U p1)
[](p2 & !p1 -> ((p0 -> (!p1 U (p3 & !p1))) U (p1 | [](p0 -> (!p1 U (p3 & !p1))))))
<>p0 -> (!p0 U (p3 & !p0 & X(!p0 U p4)))
<>p1 -> (!p0 U (p1 | (p3 & !p0 & X(!p0 U p4))))
([]!p2) | (!p2 U (p2 & <>p0 -> (!p0 U (p3 & !p0 & X(!p0 U p4)))))
[]((p2 & <>p1) -> (!p0 U (p1 | (p3 & !p0 & X(!p0 U p4)))))
[](p2 -> (<>p0 -> (!p0 U (p1 | (p3 & !p0 & X(!p0 U p4))))))
(<>(p3 & X<>p4)) -> ((!p3) U p0)
<>p1 -> ((!(p3 & (!p1) & X(!p1 U (p4 & !p1)))) U (p1 | p0))
([]!p2) | ((!p2) U (p2 & ((<>(p3 & X<>p4)) -> ((!p3) U p0))))
[]((p2 & <>p1) -> ((!(p3 & (!p1) & X(!p1 U (p4 & !p1)))) U (p1 | p0)))
[](p2 -> (!(p3 & (!p1) & X(!p1 U (p4 & !p1))) U (p1 | p0) | [](!(p3 & X<>p4))))
[] (p3 & X<> p4 -> X(<>(p4 & <> p0)))
<>p1 -> (p3 & X(!p1 U p4) -> X(!p1 U (p4 & <> p0))) U p1
[] (p2 -> [] (p3 & X<> p4 -> X(!p4 U (p4 & <> p0))))
[] ((p2 & <>p1) -> (p3 & X(!p1 U p4) -> X(!p1 U (p4 & <> p0))) U p1)
[] (p2 -> (p3 & X(!p1 U p4) -> X(!p1 U (p4 & <> p0))) U (p1 | [] (p3 & X(!p1 U p4) -> X(!p1 U (p4 & <> p0)))))
[] (p0 -> <>(p3 & X<>p4))
<>p1 -> (p0 -> (!p1 U (p3 & !p1 & X(!p1 U p4)))) U p1
[] (p2 -> [] (p0 -> (p3 & X<> p4)))
[] ((p2 & <>p1) -> (p0 -> (!p1 U (p3 & !p1 & X(!p1 U p4)))) U p1)
[] (p2 -> (p0 -> (!p1 U (p3 & !p1 & X(!p1 U p4)))) U (p1 | [] (p0 -> (p3 & X<> p4))))
[] (p0 -> <>(p3 & !p5 & X(!p5 U p4)))
<>p1 -> (p0 -> (!p1 U (p3 & !p1 & !p5 & X((!p1 & !p5) U p4)))) U p1
[] (p2 -> [] (p0 -> (p3 & !p5 & X(!p5 U p4))))
[] ((p2 & <>p1) -> (p0 -> (!p1 U (p3 & !p1 & !p5 & X((!p1 & !p5) U p4)))) U p1)
[] (p2 -> (p0 -> (!p1 U (p3 & !p1 & !p5 & X((!p1 & !p5) U p4)))) U (p1 | [] (p0 -> (p3 & !p5 & X(!p5 U p4)))))
!p0 U ((p0 U ((!p0 U ((p0 U ([]!p0 | []p0)) | []!p0)) | []!p0)) | []!p0)
<>p2 -> (!p2 U (p2 & (!p0 U ((p0 U ((!p0 U ((p0 U ([]!p0 | []p0)) | []!p0)) | []!p0)) | []!p0))))

63
bench/ltl2tgba/known Normal file
View file

@ -0,0 +1,63 @@
#!/bin/sh
# -*- shell-script -*-
# Copyright (C) 2005 Laboratoire d'Informatique de Paris 6 (LIP6),
# département Systèmes Répartis Coopératifs (SRC), Université Pierre
# et Marie Curie.
#
# This file is part of Spot, a model checking library.
#
# Spot is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# Spot is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
# License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Spot; see the file COPYING. If not, write to the Free
# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
. ./defs
conffile=known.cfg
logfile=known.log
sumfile=known.txt
ltlfile=formulae.ltl
. "$srcdir/algorithms"
cat >>"$conffile" <<EOF
GlobalOptions
{
Rounds = 100
Interactive = Never
# Verbosity = 5
# ComparisonCheck = no
ConsistencyCheck = no
# IntersectionCheck = no
}
StateSpaceOptions
{
Size = 200
Propositions = 6
}
FormulaOptions
{
Size = 10
Propositions = 4
AbbreviatedOperators = No
GenerateMode = Normal
OutputMode = NNF
DefaultOperatorPriority = 10
}
EOF
"$LBTT" --configfile="$conffile" --formulafile="$ltlfile" | tee "$logfile"
"$srcdir"/parseout.pl "$logfile" | tee "$sumfile"

224
bench/ltl2tgba/ltl2baw.in Normal file
View file

@ -0,0 +1,224 @@
#!/usr/bin/env @PERL@
# Copyright (C) 2004, 2005 Laboratoire d'Informatique de Paris 6 (LIP6),
# département Systèmes Répartis Coopératifs (SRC), Université Pierre
# et Marie Curie.
#
# This file is part of Spot, a model checking library.
#
# Spot is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# Spot is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
# License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Spot; see the file COPYING. If not, write to the Free
# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
use warnings;
# Usage:
# ------
#
# This script converts the intermediate generalized automata computed
# by ltl2ba into a form usable by lbtt. This is useful for statistics.
#
# It can also be used to simplify a formula using ltl2ba, and then hand
# the simplified formula over to spot. (This can be used to compare
# Spot's formulae simplification and ltl2ba's.)
#
# ltl2baw.pl --ltl2ba='options-A' options-B
# run `ltl2ba options-B', extract the optimized generalized automata,
# and pass this automata to `ltl2tgba options-A'.
# e.g., ltl2baw.pl --ltl2ba=-t -f 'a U b'
# will convert ltl2ba's generalized automata for `a U b' into
# a form readable by lbtt.
#
# ltl2baw.pl options-B
# this is a shorthand for `ltl2baw.pl --ltl2ba=-t options-B',
# e.g., ltl2baw.pl -f 'a U b'
#
# ltl2baw.pl --spot='options-A' options-B
# run `ltl2ba options-B', extract the simplified formula
# and pass this formula to `ltl2tgba options-A'.
# e.g., ltl2baw.pl ---spot=-f -f '(a U b) <-> true'
# will use the Couvreur/FM algorithm to translate the formula
# simplified by ltl2ba
#
# The initial state problem:
# --------------------------
# ltl2ba create a Transition-based Generalized Büchi Automaton in one
# of its intermediate steps. Unlike Spot's TGBAs, ltl2ba's TGBAs can
# have multiple initial state. This is a problem when using lbtt,
# because lbtt accepts only one initial state. When we detect such a
# situation, we create a new state whose successors are the union of
# the successors of all the initial states, and use this new state as
# initial state. Then we try to remove the original initial states:
# we can do this for states that have no input transition.
use constant {
PROLOGUE => 1,
INIT_STATES => 2,
STATES => 3,
EPILOGUE => 4,
};
sub dquote(@)
{
return map { "\"$_\"" } @_;
}
my $arg = $ARGV[0];
my $output_formula = 0;
if ($arg =~ '^--ltl2ba=(.*)$')
{
open(LTL2TGBA, "| @top_builddir@/src/tgbatest/ltl2tgba $1 -X -");
shift;
}
elsif ($arg =~ '--spot=(.*)$')
{
$output_formula = 1;
open(LTL2TGBA, "| @top_builddir@/src/tgbatest/ltl2tgba $1 -F -");
shift;
}
else
{
open(LTL2TGBA, "| @top_builddir@/src/tgbatest/ltl2tgba -t -X -");
}
END {
# This also waits for ltl2tgba's termination.
close(LTL2TGBA) || die "error closing pipe to ltl2tgba";
}
my @args = dquote @ARGV;
open(LTL2BA, "@LTL2BA@ -d @args |") || die "failed to run ltl2ba";
my $state = PROLOGUE;
my @init_states = ();
my $current_state;
my %states;
my %dests;
my %acc;
my $normalized;
while (<LTL2BA>)
{
chomp;
# print "$state: $_\n";
if ($state == PROLOGUE)
{
$normalized = $1
if m,Normlzd:\s*(.*?)\s*\*/,;
$state = INIT_STATES
if /Generalized Buchi automaton after simplification/;
}
elsif ($state == INIT_STATES)
{
next if /^init\s*:/;
if (/^\s*\d+\s*$/)
{
my $n = scalar($&);
push @init_states, $n;
$dests{$n} = 0;
}
else
{
$state = STATES;
}
}
# Not an elif.
if ($state == STATES)
{
if (/^state\s+(\d+)/)
{
$current_state = scalar($1);
}
elsif (/^(.+)\s+->\s+(\d+)\s+:\s+{(.*)}\s*$/)
{
my ($cond, $dest, $acc) = ($1, $2, $3);
++$dests{$dest} if exists $dests{$dest};
my @acc = dquote(split(',', $acc));
$acc{$_} = 1 foreach (@acc);
push @{$states{$current_state}}, [$dest, $cond, "@acc"];
}
else
{
$state = EPILOGUE;
}
}
}
die "parse error ($state)\n"
unless $state == EPILOGUE;
sub print_state($)
{
my ($src) = @_;
foreach my $v (@{$states{$src}})
{
my ($dst, $cond, $acc) = @$v;
print LTL2TGBA "\"$src\", \"$dst\", \"$cond\", $acc;\n";
}
}
if ($output_formula)
{
print LTL2TGBA $normalized;
}
else
{
print LTL2TGBA "acc = @{[keys %acc]};\n";
if ($#init_states > 0)
{
# Create a fake initial state, and try to remove the old ones.
# See the `The initial state problem' summary at the top of
# this file.
@succ = map {
my @out = @{$states{$_}};
delete $states{$_} if $dests{$_} == 0;
@out;
} @init_states;
@init_states = ('init');
$states{'init'} = \@succ;
}
elsif ($#init_states < 0)
{
print LTL2TGBA "\"false\", \"false\", \"false\", ;";
exit 0;
}
my $s = $init_states[0];
print_state($s);
delete $states{$s};
foreach my $src (keys %states)
{
print_state($src);
}
}
### Setup "GNU" style for perl-mode and cperl-mode.
## Local Variables:
## perl-indent-level: 2
## perl-continued-statement-offset: 2
## perl-continued-brace-offset: 0
## perl-brace-offset: 0
## perl-brace-imaginary-offset: 0
## perl-label-offset: -2
## cperl-indent-level: 2
## cperl-brace-offset: 0
## cperl-continued-brace-offset: 0
## cperl-label-offset: -2
## cperl-extra-newline-before-brace: t
## cperl-merge-trailing-else: nil
## cperl-continued-statement-offset: 2
## End:

69
bench/ltl2tgba/parseout.pl Executable file
View file

@ -0,0 +1,69 @@
#!/usr/bin/env perl
# Copyright (C) 2005 Laboratoire d'Informatique de Paris 6 (LIP6),
# département Systèmes Répartis Coopératifs (SRC), Université Pierre
# et Marie Curie.
#
# This file is part of Spot, a model checking library.
#
# Spot is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# Spot is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
# License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Spot; see the file COPYING. If not, write to the Free
# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
use warnings;
my $line = 0;
my $tool = 0;
my ($a, $b, $acc, $time);
format STDOUT2 =
||<:>@>>||@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<||<)>@>>>>>||<)>@>>>>>||<)>@>>>||<)>@#####.##||<)>@>>>>>>>>||<)>@>>>>>>>>||<)>@>>||
$num, $tool, $a, $b, $acc, $time, $2, $3, $1
.
format STDOUT =
@>>: @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$num, $tool
@>>>>> / @>>>>> / @>>> / @#####.## @>>>>>>>> / @>>>>>>>> (@>>)
$a, $b, $acc, $time, $2, $3, $1
.
$~ = STDOUT2 if (exists $ENV{'WIKI'});
my %impl;
while (<>)
{
if (/^\s{4}(\d+):\s`(.+)'\s*(?:\(disabled\))?\s*$/)
{
$impl{$1} = $2 unless exists $impl{$1};
}
if (/Pos\. formulae \|\s*([^|]*?)\s*\|\s*([^|]*?)\s*\|$/)
{
$acc = $1;
$time = $2;
}
next unless /Pos\. formulae \|\s*(.*?)\s*\|\s*(.*?)\s*\|\s*(.*?)\s*\|/;
if ($line % 2)
{
$num = $line >> 1;
$tool = $impl{$num};
write;
}
else
{
($a, $b) = ($2, $3);
}
++$line;
}

78
bench/ltl2tgba/small Normal file
View file

@ -0,0 +1,78 @@
#!/bin/sh
# -*- shell-script -*-
# Copyright (C) 2005 Laboratoire d'Informatique de Paris 6 (LIP6),
# département Systèmes Répartis Coopératifs (SRC), Université Pierre
# et Marie Curie.
#
# This file is part of Spot, a model checking library.
#
# Spot is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# Spot is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
# License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Spot; see the file COPYING. If not, write to the Free
# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
. ./defs
conffile=small.cfg
logfile=small.log
sumfile=small.txt
. "$srcdir/algorithms"
cat >>"$conffile" <<EOF
GlobalOptions
{
Rounds = 100
Interactive = Never
# Verbosity = 5
# ComparisonCheck = no
ConsistencyCheck = no
# IntersectionCheck = no
}
StateSpaceOptions
{
Size = 200
Propositions = 4
}
FormulaOptions
{
Size = 10
Propositions = 4
AbbreviatedOperators = No
GenerateMode = Normal
OutputMode = NNF
PropositionPriority = 50
TruePriority = 1
FalsePriority = 1
AndPriority = 10
OrPriority = 10
XorPriority = 0
EquivalencePriority = 0
BeforePriority = 0
StrongReleasePriority = 0
WeakUntilPriority = 0
UntilPriority = 30
DefaultOperatorPriority = 15
}
EOF
"$LBTT" --configfile="$conffile" | tee "$logfile"
"$srcdir"/parseout.pl "$logfile" | tee "$sumfile"