Merge branch master (Spot 1.2.5) into next.

* src/bin/dstar2tgba.cc, src/bin/ltlcross.cc, src/bin/randltl.cc,
src/ltltest/reduccmp.test, src/neverparse/neverclaimparse.yy,
src/tgbatest/ltl2ta.test, src/tgbatest/ltl2tgba.cc,
src/tgbatest/ltlcross.test, src/tgbatest/neverclaimread.test,
wrap/python/ajax/ltl2tgba.html: Fix conflicts.
This commit is contained in:
Alexandre Duret-Lutz 2014-08-22 16:45:41 +02:00
commit 700cf88b06
30 changed files with 1029 additions and 163 deletions

View file

@ -389,26 +389,26 @@ in: Gq|Gr|(G(q|FGp)&G(r|FG!p))
-x -TA -DS -in | 33 | 152 | 25
-x -TA -DS -in -RT | 21 | 112 | 17
in: FG((WaitRight4 M (HasRight1 W GWaitLeft0)) M HasLeft4)
-TGTA | 35 | 543 | XXX
-TGTA -RT | 32 | 527 | XXX
-TA | 34 | 428 | 11
-TA -RT | 30 | 408 | 9
-TA -lv | 35 | 498 | 5
-TA -lv -RT | 32 | 485 | 4
-TA -sp | 34 | 490 | 4
-TA -sp -RT | 31 | 477 | 3
-TA -lv -sp | 35 | 498 | 5
-TA -lv -sp -RT | 32 | 485 | 4
-TA -DS | 44 | 504 | 21
-TA -DS -RT | 40 | 486 | 18
-TA -DS -lv | 45 | 578 | 15
-TA -DS -lv -RT | 41 | 560 | 12
-TA -DS -sp | 44 | 568 | 14
-TA -DS -sp -RT | 40 | 550 | 11
-TA -DS -lv -sp | 45 | 578 | 15
-TA -DS -lv -sp -RT | 41 | 560 | 12
-x -TA -DS -in | 45 | 558 | 11
-x -TA -DS -in -RT | 39 | 532 | 8
-TGTA | 45 | 717 | XXX
-TGTA -RT | 35 | 598 | XXX
-TA | 44 | 602 | 16
-TA -RT | 33 | 482 | 9
-TA -lv | 45 | 676 | 9
-TA -lv -RT | 35 | 566 | 4
-TA -sp | 44 | 654 | 8
-TA -sp -RT | 34 | 545 | 3
-TA -lv -sp | 45 | 676 | 9
-TA -lv -sp -RT | 35 | 566 | 4
-TA -DS | 54 | 722 | 26
-TA -DS -RT | 42 | 608 | 18
-TA -DS -lv | 55 | 800 | 19
-TA -DS -lv -RT | 44 | 702 | 13
-TA -DS -sp | 54 | 776 | 18
-TA -DS -sp -RT | 43 | 678 | 12
-TA -DS -lv -sp | 55 | 800 | 19
-TA -DS -lv -sp -RT | 44 | 702 | 13
-x -TA -DS -in | 55 | 694 | 11
-x -TA -DS -in -RT | 41 | 597 | 8
in: G(F(GWaitLeft7 U Idle4) U (WaitLeft2 M IsEating2))
-TGTA | 69 | 1539 | XXX
-TGTA -RT | 49 | 935 | XXX

View file

@ -36,6 +36,7 @@
#include "tgbaalgos/save.hh"
#include "tgbaalgos/dotty.hh"
#include "tgbaalgos/lbtt.hh"
#include "tgbaalgos/hoaf.hh"
#include "tgba/tgbasgba.hh"
#include "tgbaalgos/degen.hh"
#include "tgba/tgbaproduct.hh"
@ -385,6 +386,7 @@ checked_main(int argc, char** argv)
bool containment = false;
bool show_fc = false;
bool spin_comments = false;
const char* hoaf_opt = 0;
spot::ltl::environment& env(spot::ltl::default_environment::instance());
spot::ltl::atomic_prop_set* unobservables = 0;
spot::tgba_ptr system_aut = 0;
@ -553,6 +555,11 @@ checked_main(int argc, char** argv)
accepting_run = true;
graph_run_tgba_opt = true;
}
else if (!strncmp(argv[formula_index], "-H", 2))
{
output = 17;
hoaf_opt = argv[formula_index] + 2;
}
else if (!strcmp(argv[formula_index], "-k"))
{
output = 9;
@ -1693,7 +1700,11 @@ checked_main(int argc, char** argv)
}
break;
}
case 17:
{
hoaf_reachable(std::cout, a, hoaf_opt, f) << '\n';
break;
}
default:
SPOT_UNREACHABLE();
}

View file

@ -23,7 +23,21 @@ set -e
ltl2tgba=../ltl2tgba
../../bin/randltl -n 100 p1 p2 p3 p4 p5 p6 --tree-size 5..15 |
(
# Some formulas supplied by Joachim Klein. The first two were
# incorrectly translated by ltl_to_tgba_fm(), while the other have
# shown some bugs in other translators.
cat <<EOF
G(Fa & ((a M b) U ((c U !d) M d)))
XF(p2 R (!Fp1 W p1))
X p0 || ((X p0) V <>p0)
p0 xor (p0 W X!p0)
p0 & (!p0 W Xp0)
EOF
# Random formulas
../../bin/randltl -n 100 p1 p2 p3 p4 p5 p6 --tree-size 5..15
) |
../../bin/ltlcross --products=2 \
"$ltl2tgba -t -f %f > %T" \
"$ltl2tgba -t -f -y %f > %T" \
@ -44,4 +58,3 @@ ltl2tgba=../ltl2tgba
"$ltl2tgba -t -taa -r4 %f > %T" \
"$ltl2tgba -t -taa -r4 -c %f > %T" \
"$ltl2tgba -t -taa -r4 -R3 -RDS %f > %T"

View file

@ -1,6 +1,6 @@
#!/bin/sh
# -*- coding: utf-8 -*-
# Copyright (C) 2012, 2013 Laboratoire de Recherche et Développement
# Copyright (C) 2012, 2013, 2014 Laboratoire de Recherche et Développement
# de l'Epita (LRDE).
#
# This file is part of Spot, a model checking library.
@ -23,8 +23,8 @@ set -e
ltl2tgba=../../bin/ltl2tgba
../../bin/randltl -P -n 100 p1 p2 p3 p4 p5 p6 --tree-size 5..15 |
../../bin/ltlcross --products=3 \
../../bin/randltl -P -n 100 p1 p2 p3 p4 p5 p6 --tree-size 5..15 --seed=314 |
../../bin/ltlcross --products=3 --timeout=60 \
"$ltl2tgba --lbtt --any --low %f > %T" \
"$ltl2tgba --lbtt --any --medium %f > %T" \
"$ltl2tgba --lbtt --any --high %f > %T" \

View file

@ -1,6 +1,6 @@
#!/bin/sh
# -*- coding: utf-8 -*-
# Copyright (C) 2012, 2013 Laboratoire de Recherche et
# Copyright (C) 2012, 2013, 2014 Laboratoire de Recherche et
# Développement de l'Epita (LRDE).
#
# This file is part of Spot, a model checking library.
@ -55,13 +55,18 @@ test `grep '"exit code",1' out.csv | wc -l` -eq 0
check_csv out.csv
# Likewise for timeouts
echo foo >bug
run 0 ../../bin/ltlcross 'sleep 5; false %f >%N' \
--timeout 2 -f a --csv=out.csv 2>stderr
--timeout 2 -f a --csv=out.csv \
--save-bogus=bug 2>stderr
grep '"exit_status"' out.csv
grep '"exit_code"' out.csv
test `grep 'warning:.*timeout' stderr | wc -l` -eq 2
test `grep '"timeout",-1' out.csv | wc -l` -eq 2
check_csv out.csv
# 'bug' should exist but be empty
test -f bug
test -s bug && exit 1
run 0 ../../bin/ltlcross 'sleep 5; false %f >%N' \
--timeout 2 --omit-missing -f a --csv=out.csv 2>stderr
@ -115,12 +120,13 @@ test $q -eq `expr $p + 12`
# Check with Rabin/Streett output
run 1 ../../bin/ltlcross "$ltl2tgba -s %f >%N" 'false %f >%D' \
-f a --csv=out.csv 2>stderr
-f 'X a' --csv=out.csv --save-bogus=bug.txt 2>stderr
q=`sed 's/[^,]//g;q' out.csv | wc -c`
grep '"exit_status"' out.csv
grep '"exit_code"' out.csv
test `grep 'error:.*returned exit code 1' stderr | wc -l` -eq 2
test `grep '"exit code",1' out.csv | wc -l` -eq 2
check_csv out.csv
grep 'X a' bug.txt
test $q -eq `expr $p + 6`

View file

@ -1,7 +1,7 @@
#!/bin/sh
# -*- coding: utf-8 -*-
# Copyright (C) 2010, 2011, 2012, 2013, 2014 Laboratoire de Recherche et
# Développement de l'Epita (LRDE).
# Copyright (C) 2010, 2011, 2012, 2013, 2014 Laboratoire de Recherche
# et Développement de l'Epita (LRDE).
#
# This file is part of Spot, a model checking library.
#
@ -172,6 +172,40 @@ EOF
grep input: stderr >> stderrfilt
diff stderrfilt expected
# This output from MoDeLLa was not property parsed by Spot because of
# the missing parentheses around p0. Report from František Blahoudek.
cat >input <<EOF
never{
T0_init:
if
:: true -> goto T1
:: p0 -> goto T2
fi;
T1:
if
:: true -> goto T1
:: p0 -> goto accept_T3
fi;
T2:
if
:: p0 -> goto accept_T3
fi;
accept_T3:
if
:: p0 -> goto T2
fi;
}
EOF
cat >expected<<EOF
transitions: 6
states: 4
EOF
run 0 ../ltl2tgba -ks -XN input > output
diff output expected
cat >formulae<<EOF
a
FG a

View file

@ -1,5 +1,5 @@
#!/bin/sh
# Copyright (C) 2011, 2012 Laboratoire de Recherche et Développement
# Copyright (C) 2011, 2012, 2014 Laboratoire de Recherche et Développement
# de l'Epita (LRDE).
#
# This file is part of Spot, a model checking library.
@ -22,23 +22,10 @@
set -e
check_psl()
{
# Do not use "run", this is too slow.
# Make cross products with FM
../ltl2tgba -f -R3 -b "$1" > out.tgba
../ltl2tgba -f -R3 -Pout.tgba -E "!($1)"
# Also try with -x turned on.
../ltl2tgba -f -x -R3 -b "$1" > out.tgba
../ltl2tgba -f -x -R3 -Pout.tgba -E "!($1)"
}
# Generate 50 random unique PSL formula that do not simplify to LTL
# formulae, and that have a size of at lease 12.
../../bin/randltl -n -1 --tree-size 30 --seed 0 --psl a b c |
../../bin/ltlfilt -r --size-min 12 --unique |
../../bin/ltlfilt -v --ltl | head -n 50 |
while read formula; do
check_psl "$formula"
done
../../bin/ltlcross '../ltl2tgba -R3 -t %f >%T' '../ltl2tgba -x -R3 -t %f >%T' \
-F - -f '{{(p1)}[*]:{(p3) && {{!(p1)} xor {!(p3)}}}}'