Merge the core and python tests in the tests/ directory

* tests/: Rename as...
* tests/core/: ... this.
* python/tests/: Rename as...
* tests/python/: ... this.
* python/tests/run.in: Move as...
* tests/run.in: This, and adjust.
* tests/Makefile.am: Adjust to run both core and python tests.
* configure.ac, README, debian/python3-spot.examples, debian/rules,
doc/org/tut.org, python/Makefile.am, spot/ltsmin/Makefile.am,
spot/ltsmin/kripke.test, spot/sanity/ipynb.test: Adjust.
This commit is contained in:
Alexandre Duret-Lutz 2015-12-30 09:50:52 +01:00
parent 18572db39f
commit 5cb94a1a3f
197 changed files with 734 additions and 715 deletions

71
tests/.gitignore vendored
View file

@ -1,70 +1 @@
acc
apcollect
bddprod
bitvect
blue_counter
checkpsl
checkta
complement
consterm
defs
.deps
*.dot
eltl2tgba
emptchk
defs
equals
expect
expldot
explicit
explicit2
explicit3
explprod
graph
genltl
input
intvcomp
intvcmp2
kind
length
.libs
ikwiad
ltl2dot
ltl2text
ltlmagic
ltlprod
ltlrel
lunabbrev
Makefile
Makefile.in
maskacc
mixprod
nequals
nenoform
ngraph
output1
output2
parse_print
powerset
*.ps
randltl
randtgba
readsat
readsave
reduc
reduceu
reductau
reductaustr
reduccmp
reductgba
stdout
spotlbtt
syntimpl
taatgba
tgbagraph
tgbaread
tostring
tripprod
tunabbrev
tunenoform
unabbrevwm
*.dir

View file

@ -20,234 +20,282 @@
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <http://www.gnu.org/licenses/>.
AUTOMAKE_OPTIONS = subdir-objects
AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) $(BUDDY_CPPFLAGS)
AM_CXXFLAGS = $(WARNING_CXXFLAGS)
LDADD = $(top_builddir)/spot/libspot.la
# These are the most used test programs, and they are also useful
# to run manually outside the test suite. Always build them.
noinst_PROGRAMS = ikwiad randtgba
noinst_PROGRAMS = core/ikwiad core/randtgba
TEST_EXTENTIONS = .test .py .ipynb
LOG_COMPILER = ./run
TEST_LOG_COMPILER = ./run
LOG_DRIVER = $(TEST_LOG_DRIVER)
# ensure run is rebuilt before the tests are run.
check_SCRIPTS = run core/defs
check_SCRIPTS = defs
# Keep this sorted alphabetically.
check_PROGRAMS = \
acc \
bitvect \
complement \
checkpsl \
checkta \
consterm \
emptchk \
equals \
graph \
kind \
length \
intvcomp \
intvcmp2 \
ltlprod \
ltl2dot \
ltl2text \
ltlrel \
lunabbrev \
nequals \
nenoform \
ngraph \
parse_print \
readsat \
reduc \
reduccmp \
reduceu \
reductaustr \
syntimpl \
taatgba \
tgbagraph \
tostring \
tunabbrev \
tunenoform
core/acc \
core/bitvect \
core/complement \
core/checkpsl \
core/checkta \
core/consterm \
core/emptchk \
core/equals \
core/graph \
core/kind \
core/length \
core/intvcomp \
core/intvcmp2 \
core/ltlprod \
core/ltl2dot \
core/ltl2text \
core/ltlrel \
core/lunabbrev \
core/nequals \
core/nenoform \
core/ngraph \
core/parse_print \
core/readsat \
core/reduc \
core/reduccmp \
core/reduceu \
core/reductaustr \
core/syntimpl \
core/taatgba \
core/tgbagraph \
core/tostring \
core/tunabbrev \
core/tunenoform
# Keep this sorted alphabetically.
acc_SOURCES = acc.cc
bitvect_SOURCES = bitvect.cc
checkpsl_SOURCES = checkpsl.cc
checkta_SOURCES = checkta.cc
complement_SOURCES = complementation.cc
emptchk_SOURCES = emptchk.cc
graph_SOURCES = graph.cc
ikwiad_SOURCES = ikwiad.cc
intvcomp_SOURCES = intvcomp.cc
intvcmp2_SOURCES = intvcmp2.cc
ltlprod_SOURCES = ltlprod.cc
ngraph_SOURCES = ngraph.cc
parse_print_SOURCES = parse_print_test.cc
randtgba_SOURCES = randtgba.cc
readsat_SOURCES = readsat.cc
taatgba_SOURCES = taatgba.cc
tgbagraph_SOURCES = twagraph.cc
consterm_SOURCES = consterm.cc
equals_SOURCES = equalsf.cc
kind_SOURCES = kind.cc
length_SOURCES = length.cc
ltl2dot_SOURCES = readltl.cc
ltl2dot_CPPFLAGS = $(AM_CPPFLAGS) -DDOTTY
ltl2text_SOURCES = readltl.cc
ltlrel_SOURCES = ltlrel.cc
lunabbrev_SOURCES = equalsf.cc
lunabbrev_CPPFLAGS = $(AM_CPPFLAGS) -DUNABBREV='"^ie"'
nenoform_SOURCES = equalsf.cc
nenoform_CPPFLAGS = $(AM_CPPFLAGS) -DNENOFORM
nequals_SOURCES = equalsf.cc
nequals_CPPFLAGS = $(AM_CPPFLAGS) -DNEGATE
reduc_SOURCES = reduc.cc
reduccmp_SOURCES = equalsf.cc
reduccmp_CPPFLAGS = $(AM_CPPFLAGS) -DREDUC
reduceu_SOURCES = equalsf.cc
reduceu_CPPFLAGS = $(AM_CPPFLAGS) -DREDUC -DEVENT_UNIV
reductaustr_SOURCES = equalsf.cc
reductaustr_CPPFLAGS = $(AM_CPPFLAGS) -DREDUC_TAUSTR
syntimpl_SOURCES = syntimpl.cc
tostring_SOURCES = tostring.cc
tunabbrev_SOURCES = equalsf.cc
tunabbrev_CPPFLAGS = $(AM_CPPFLAGS) -DUNABBREV='"^ieFG"'
tunenoform_SOURCES = equalsf.cc
tunenoform_CPPFLAGS = $(AM_CPPFLAGS) -DNENOFORM -DUNABBREV='"^ieFG"'
core_acc_SOURCES = core/acc.cc
core_bitvect_SOURCES = core/bitvect.cc
core_checkpsl_SOURCES = core/checkpsl.cc
core_checkta_SOURCES = core/checkta.cc
core_complement_SOURCES = core/complementation.cc
core_emptchk_SOURCES = core/emptchk.cc
core_graph_SOURCES = core/graph.cc
core_ikwiad_SOURCES = core/ikwiad.cc
core_intvcomp_SOURCES = core/intvcomp.cc
core_intvcmp2_SOURCES = core/intvcmp2.cc
core_ltlprod_SOURCES = core/ltlprod.cc
core_ngraph_SOURCES = core/ngraph.cc
core_parse_print_SOURCES = core/parse_print_test.cc
core_randtgba_SOURCES = core/randtgba.cc
core_readsat_SOURCES = core/readsat.cc
core_taatgba_SOURCES = core/taatgba.cc
core_tgbagraph_SOURCES = core/twagraph.cc
core_consterm_SOURCES = core/consterm.cc
core_equals_SOURCES = core/equalsf.cc
core_kind_SOURCES = core/kind.cc
core_length_SOURCES = core/length.cc
core_ltl2dot_SOURCES = core/readltl.cc
core_ltl2dot_CPPFLAGS = $(AM_CPPFLAGS) -DDOTTY
core_ltl2text_SOURCES = core/readltl.cc
core_ltlrel_SOURCES = core/ltlrel.cc
core_lunabbrev_SOURCES = core/equalsf.cc
core_lunabbrev_CPPFLAGS = $(AM_CPPFLAGS) -DUNABBREV='"^ie"'
core_nenoform_SOURCES = core/equalsf.cc
core_nenoform_CPPFLAGS = $(AM_CPPFLAGS) -DNENOFORM
core_nequals_SOURCES = core/equalsf.cc
core_nequals_CPPFLAGS = $(AM_CPPFLAGS) -DNEGATE
core_reduc_SOURCES = core/reduc.cc
core_reduccmp_SOURCES = core/equalsf.cc
core_reduccmp_CPPFLAGS = $(AM_CPPFLAGS) -DREDUC
core_reduceu_SOURCES = core/equalsf.cc
core_reduceu_CPPFLAGS = $(AM_CPPFLAGS) -DREDUC -DEVENT_UNIV
core_reductaustr_SOURCES = core/equalsf.cc
core_reductaustr_CPPFLAGS = $(AM_CPPFLAGS) -DREDUC_TAUSTR
core_syntimpl_SOURCES = core/syntimpl.cc
core_tostring_SOURCES = core/tostring.cc
core_tunabbrev_SOURCES = core/equalsf.cc
core_tunabbrev_CPPFLAGS = $(AM_CPPFLAGS) -DUNABBREV='"^ieFG"'
core_tunenoform_SOURCES = core/equalsf.cc
core_tunenoform_CPPFLAGS = $(AM_CPPFLAGS) -DNENOFORM -DUNABBREV='"^ieFG"'
# Keep this sorted by STRENGTH. Test basic things first,
# because such failures will be easier to diagnose and fix.
TESTS = $(TESTS_ltl) $(TESTS_graph) $(TESTS_kripke) $(TESTS_twa)
TESTS = $(TESTS_tl) $(TESTS_graph) $(TESTS_kripke) $(TESTS_twa) $(TESTS_python)
TESTS_ltl = \
bare.test \
parse.test \
parseerr.test \
utf8.test \
length.test \
equals.test \
tostring.test \
lunabbrev.test \
tunabbrev.test \
nenoform.test \
tunenoform.test \
unabbrevwm.test \
consterm.test \
kind.test \
remove_x.test \
ltlrel.test \
ltlgrind.test \
ltlcrossgrind.test \
ltlfilt.test \
exclusive-ltl.test \
latex.test \
lbt.test \
lenient.test \
rand.test \
isop.test \
syntimpl.test \
reduc.test \
reduc0.test \
reducpsl.test \
reduccmp.test \
uwrm.test \
eventuniv.test \
stutter-ltl.test
TESTS_tl = \
core/bare.test \
core/parse.test \
core/parseerr.test \
core/utf8.test \
core/length.test \
core/equals.test \
core/tostring.test \
core/lunabbrev.test \
core/tunabbrev.test \
core/nenoform.test \
core/tunenoform.test \
core/unabbrevwm.test \
core/consterm.test \
core/kind.test \
core/remove_x.test \
core/ltlrel.test \
core/ltlgrind.test \
core/ltlcrossgrind.test \
core/ltlfilt.test \
core/exclusive-ltl.test \
core/latex.test \
core/lbt.test \
core/lenient.test \
core/rand.test \
core/isop.test \
core/syntimpl.test \
core/reduc.test \
core/reduc0.test \
core/reducpsl.test \
core/reduccmp.test \
core/uwrm.test \
core/eventuniv.test \
core/stutter-ltl.test
TESTS_graph = \
graph.test \
ngraph.test \
tgbagraph.test
core/graph.test \
core/ngraph.test \
core/tgbagraph.test
TESTS_kripke = \
kripke.test
core/kripke.test
TESTS_twa = \
acc.test \
acc2.test \
intvcomp.test \
bitvect.test \
ltlcross3.test \
taatgba.test \
renault.test \
nondet.test \
det.test \
neverclaimread.test \
parseaut.test \
optba.test \
complete.test \
complement.test \
remfin.test \
dstar.test \
readsave.test \
ltldo.test \
ltldo2.test \
maskacc.test \
maskkeep.test \
prodor.test \
simdet.test \
sim2.test \
sim3.test \
ltl2tgba.test \
ltl2neverclaim.test \
ltl2neverclaim-lbtt.test \
ltlprod.test \
explprod.test \
explpro2.test \
explpro3.test \
explpro4.test \
tripprod.test \
dupexp.test \
exclusive-tgba.test \
remprop.test \
degendet.test \
degenid.test \
degenlskip.test \
randomize.test \
lbttparse.test \
scc.test \
sccdot.test \
sccsimpl.test \
sepsets.test \
dbacomp.test \
obligation.test \
wdba.test \
wdba2.test \
babiak.test \
monitor.test \
dra2dba.test \
unambig.test \
ltlcross4.test \
ltl3dra.test \
ltl2dstar.test \
ltl2dstar2.test \
ltl2dstar3.test \
ltl2dstar4.test \
ltl2ta.test \
ltl2ta2.test \
randaut.test \
randtgba.test \
isomorph.test \
uniq.test \
sbacc.test \
stutter-tgba.test \
strength.test \
emptchk.test \
emptchke.test \
dfs.test \
ltlcrossce.test \
ltlcrossce2.test \
emptchkr.test \
ltlcounter.test \
basimul.test \
satmin.test \
satmin2.test \
spotlbtt.test \
ltlcross.test \
spotlbtt2.test \
ltlcross2.test \
complementation.test \
randpsl.test \
cycles.test
EXTRA_DIST = $(TESTS)
core/acc.test \
core/acc2.test \
core/intvcomp.test \
core/bitvect.test \
core/ltlcross3.test \
core/taatgba.test \
core/renault.test \
core/nondet.test \
core/det.test \
core/neverclaimread.test \
core/parseaut.test \
core/optba.test \
core/complete.test \
core/complement.test \
core/remfin.test \
core/dstar.test \
core/readsave.test \
core/ltldo.test \
core/ltldo2.test \
core/maskacc.test \
core/maskkeep.test \
core/prodor.test \
core/simdet.test \
core/sim2.test \
core/sim3.test \
core/ltl2tgba.test \
core/ltl2neverclaim.test \
core/ltl2neverclaim-lbtt.test \
core/ltlprod.test \
core/explprod.test \
core/explpro2.test \
core/explpro3.test \
core/explpro4.test \
core/tripprod.test \
core/dupexp.test \
core/exclusive-tgba.test \
core/remprop.test \
core/degendet.test \
core/degenid.test \
core/degenlskip.test \
core/randomize.test \
core/lbttparse.test \
core/scc.test \
core/sccdot.test \
core/sccsimpl.test \
core/sepsets.test \
core/dbacomp.test \
core/obligation.test \
core/wdba.test \
core/wdba2.test \
core/babiak.test \
core/monitor.test \
core/dra2dba.test \
core/unambig.test \
core/ltlcross4.test \
core/ltl3dra.test \
core/ltl2dstar.test \
core/ltl2dstar2.test \
core/ltl2dstar3.test \
core/ltl2dstar4.test \
core/ltl2ta.test \
core/ltl2ta2.test \
core/randaut.test \
core/randtgba.test \
core/isomorph.test \
core/uniq.test \
core/sbacc.test \
core/stutter-tgba.test \
core/strength.test \
core/emptchk.test \
core/emptchke.test \
core/dfs.test \
core/ltlcrossce.test \
core/ltlcrossce2.test \
core/emptchkr.test \
core/ltlcounter.test \
core/basimul.test \
core/satmin.test \
core/satmin2.test \
core/spotlbtt.test \
core/ltlcross.test \
core/spotlbtt2.test \
core/ltlcross2.test \
core/complementation.test \
core/randpsl.test \
core/cycles.test
distclean-local:
rm -rf $(TESTS:.test=.dir)
TESTS_python = \
python/acc_cond.ipynb \
python/accparse.ipynb \
python/accparse2.py \
python/alarm.py \
python/automata.ipynb \
python/automata-io.ipynb \
python/bddnqueen.py \
python/decompose.ipynb \
python/formulas.ipynb \
python/implies.py \
python/interdep.py \
python/ltl2tgba.test \
python/ltlparse.py \
python/ltlsimple.py \
python/minato.py \
python/optionmap.py \
python/parsetgba.py \
python/piperead.ipynb \
python/product.ipynb \
python/randaut.ipynb \
python/randgen.py \
python/randltl.ipynb \
python/relabel.py \
python/remfin.py \
python/satmin.py \
python/setxor.py \
python/testingaut.ipynb
SUFFIXES = .ipynb .html
.ipynb.html:
$(IPYTHON) nbconvert $< --to html --stdout >$@
.PHONY: nb-html
nb-html: $(TESTS_python:.ipynb=.html)
EXTRA_DIST = \
$(TESTS) \
python/ltl2tgba.py \
python/ipnbdoctest.py

70
tests/core/.gitignore vendored Normal file
View file

@ -0,0 +1,70 @@
acc
apcollect
bddprod
bitvect
blue_counter
checkpsl
checkta
complement
consterm
defs
.deps
*.dot
eltl2tgba
emptchk
defs
equals
expect
expldot
explicit
explicit2
explicit3
explprod
graph
genltl
input
intvcomp
intvcmp2
kind
length
.libs
ikwiad
ltl2dot
ltl2text
ltlmagic
ltlprod
ltlrel
lunabbrev
Makefile
Makefile.in
maskacc
mixprod
nequals
nenoform
ngraph
output1
output2
parse_print
powerset
*.ps
randltl
randtgba
readsat
readsave
reduc
reduceu
reductau
reductaustr
reduccmp
reductgba
stdout
spotlbtt
syntimpl
taatgba
tgbagraph
tgbaread
tostring
tripprod
tunabbrev
tunenoform
unabbrevwm

View file

@ -23,10 +23,10 @@
set -e
../../bin/ltl2tgba -H 'GFa & GFb' > in
ltl2tgba -H 'GFa & GFb' > in
grep 'Acceptance:' in > expected
../../bin/ltl2tgba -H 'GFa & GFb' --stats='Acceptance: %a %g' > out1
../../bin/autfilt -H in --stats='Acceptance: %A %G' > out2
ltl2tgba -H 'GFa & GFb' --stats='Acceptance: %a %g' > out1
autfilt -H in --stats='Acceptance: %A %G' > out2
diff out1 expected
diff out2 expected
@ -64,7 +64,7 @@ EOF
while IFS=, read a b
do
(cat header; echo 'Acceptance:' $a; cat body) |
../../bin/autfilt -H --dnf-acc --stats '%A %G, %a %g'
autfilt -H --dnf-acc --stats '%A %G, %a %g'
done < acceptances > output
diff acceptances output
@ -86,7 +86,7 @@ EOF
while IFS=, read a b
do
(cat header; echo 'Acceptance:' $a; cat body) |
../../bin/autfilt -H --cnf-acc --stats '%A %G, %a %g'
autfilt -H --cnf-acc --stats '%A %G, %a %g'
done < acceptances > output
diff acceptances output
@ -109,7 +109,7 @@ EOF
while IFS=, read a b
do
(cat header; echo 'Acceptance:' $a; cat body) |
../../bin/autfilt -H --complement-acc --stats '%A %G, %a %g'
autfilt -H --complement-acc --stats '%A %G, %a %g'
done < acceptances > output
diff acceptances output

View file

@ -41,7 +41,7 @@ EOF
ltl2tgba=../ikwiad
../../bin/ltlcross <formulae \
ltlcross <formulae \
"$ltl2tgba -t %f >%T" \
"$ltl2tgba -N -r4 -R3f %f >%N" \
"$ltl2tgba -N -r7 -R3 -x -Rm %f >%N" \

View file

@ -21,13 +21,13 @@
. ./defs
set -e
test "`../../bin/ltlfilt -p -f 'GFP_0.b_c'`" = "G(F(P_0.b_c))"
test "`../../bin/ltlfilt -f 'GFP_0.b_c'`" = "GFP_0.b_c"
foo=`../../bin/ltlfilt -p -f 'GF"P_0.b_c"'`
test "`ltlfilt -p -f 'GFP_0.b_c'`" = "G(F(P_0.b_c))"
test "`ltlfilt -f 'GFP_0.b_c'`" = "GFP_0.b_c"
foo=`ltlfilt -p -f 'GF"P_0.b_c"'`
test "$foo" = "G(F(P_0.b_c))"
foo=`../../bin/ltlfilt -p -f '"a.b" U c.d.e'`
foo=`ltlfilt -p -f '"a.b" U c.d.e'`
test "$foo" = "(a.b) U (c.d.e)"
foo=`../../bin/ltlfilt -f '"a.b" U c.d.e'`
foo=`ltlfilt -f '"a.b" U c.d.e'`
test "$foo" = "a.b U c.d.e"

View file

@ -22,7 +22,7 @@
set -e
ltl2tgba=../../bin/ltl2tgba
ltl2tgba=ltl2tgba
# This bug was found while working on the state-based acceptance
@ -54,7 +54,7 @@ ltl2tgba=../../bin/ltl2tgba
# --spin -x ba-simul=2
# --spin -x ba-simul=3
../../bin/ltlcross --seed=0 --products=5 --json=out.json \
ltlcross --seed=0 --products=5 --json=out.json \
-f 'X((F(Xa | b) W c) U (Xc W (a & d)))' \
-f '((<> p5 V ((p0 U p1) <-> (p5 \/ p1))) -> ((<> p4 V p2) M p2))' \
-f '!p2 & (Fp5 R (((p0 U p1) & (p5 | p1)) | (!p5 & (!p0 R !p1))))' \

View file

@ -22,9 +22,9 @@
set -e
autfilt=../../bin/autfilt
ltl2tgba=../../bin/ltl2tgba
randaut=../../bin/randaut
autfilt=autfilt
ltl2tgba=ltl2tgba
randaut=randaut
$randaut -H -A 'random 0..4' -Q1..10 -D -n 50 0..2 >aut
run 0 $autfilt --complement -H aut >/dev/null

View file

@ -66,4 +66,4 @@ run 0 ../complement -H -a x.hoa > nx.hoa
run 0 ../ikwiad -XH -e nx.hoa
# however the intersection of both should not
# accept any run.
run 1 ../../bin/autfilt -q nx.hoa --intersect x.hoa
run 1 autfilt -q nx.hoa --intersect x.hoa

View file

@ -114,6 +114,6 @@ State: 1
--END--
EOF
run 0 ../../bin/autfilt -CH automaton >out
run 0 autfilt -CH automaton >out
cat out
diff out expected

View file

@ -56,4 +56,4 @@ EOF
# Check emptiness of product with complement.
run 0 ../ikwiad -H -DC -C -XH input.hoa > output.hoa
run 1 ../../bin/autfilt -q input.hoa --intersect output.hoa
run 1 autfilt -q input.hoa --intersect output.hoa

View file

@ -58,14 +58,13 @@ case $srcdir in
esac
DOT='@DOT@'
top_builddir='../@top_builddir@'
LBTT="@LBTT@"
LBTT_TRANSLATE="@LBTT_TRANSLATE@"
VALGRIND='@VALGRIND@'
SPIN='@SPIN@'
LTL2BA='@LTL2BA@'
PYTHON='@PYTHON@'
top_srcdir='../@top_srcdir@'
top_srcdir='@abs_top_srcdir@'
# The test cases assume these variable are undefined
unset SPOT_DOTEXTRA
@ -83,9 +82,16 @@ run()
shift
exitcode=0
if test -n "$VALGRIND"; then
# Replace the command name by a full path after lookup in $PATH, so
# that valgrind will find it.
cmd=`command -v $1`
shift
test -n "$cmd" || exit 1
set $cmd "$@"
# Run valgrind.
exec 6>valgrind.err
GLIBCPP_FORCE_NEW=1 \
../../libtool --mode=execute \
GLIBCXX_FORCE_NEW=1 \
@abs_top_builddir@/libtool --mode=execute \
$VALGRIND --tool=memcheck --leak-check=yes --log-fd=6 -q "$@" ||
exitcode=$?
cat valgrind.err 1>&2

View file

@ -133,7 +133,7 @@ grep 'states: 8' out
# This automaton should have a 3-state BA, but it's really
# easy to obtain a 4-state BA when tweaking the degeneralization
# to ignore arc entering an SCC.
test 3 = "`../../bin/ltl2tgba -B 'G(a|G(b|Fc))' --stats=%s`"
test 3 = "`ltl2tgba -B 'G(a|G(b|Fc))' --stats=%s`"
# This 7-state DRA (built with
@ -220,12 +220,12 @@ Acc-Sig:
0
EOF
run 0 ../../bin/dstar2tgba in.dra -BD --stats=%s > out.stat
run 0 dstar2tgba in.dra -BD --stats=%s > out.stat
test 5 = "`cat out.stat`"
# Only one state should be accepting. In spot 1.2.x an initial state
# in a trivial SCC was marked as accepting: this is superfluous.
../../bin/ltl2tgba -BH 'a & GFb & GFc' > out
ltl2tgba -BH 'a & GFb & GFc' > out
cat out
cat >expected<<EOF
HOA: v1

View file

@ -25,11 +25,11 @@ set -e
# Make sure degen-skip=0 and degen-skip=1 produce the expected
# automata for 'GFa & GFb'
../../bin/ltl2tgba -B 'GFa & GFb' --hoa > out1
../../bin/ltl2tgba -B -x degen-lskip=1 'GFa & GFb' --hoa > out2
../../bin/ltl2tgba -B -x degen-lskip=0 'GFa & GFb' --hoa > out3
../../bin/ltl2tgba -B -x degen-lskip=1,degen-lowinit=1 'GFa & GFb' --hoa > out4
../../bin/ltl2tgba -B -x degen-lskip=0,degen-lowinit=1 'GFa & GFb' --hoa > out5
ltl2tgba -B 'GFa & GFb' --hoa > out1
ltl2tgba -B -x degen-lskip=1 'GFa & GFb' --hoa > out2
ltl2tgba -B -x degen-lskip=0 'GFa & GFb' --hoa > out3
ltl2tgba -B -x degen-lskip=1,degen-lowinit=1 'GFa & GFb' --hoa > out4
ltl2tgba -B -x degen-lskip=0,degen-lowinit=1 'GFa & GFb' --hoa > out5
diff out1 out2
cmp out2 out3 && exit 1
@ -122,13 +122,13 @@ State: 2
EOF
run 0 ../../bin/autfilt -q -F out2 --isomorph expected2
run 0 ../../bin/autfilt -q -F out3 --isomorph expected3
run 0 autfilt -q -F out2 --isomorph expected2
run 0 autfilt -q -F out3 --isomorph expected3
cat out4 out5
../../bin/autfilt -q out4 --isomorph expected2 && exit 1
../../bin/autfilt -q out5 --isomorph expected3 && exit 1
autfilt -q out4 --isomorph expected2 && exit 1
autfilt -q out5 --isomorph expected3 && exit 1
../../bin/autfilt -q out4 --isomorph expected4
../../bin/autfilt -q out5 --isomorph expected5
autfilt -q out4 --isomorph expected4
autfilt -q out5 --isomorph expected5

View file

@ -21,7 +21,7 @@
. ./defs
set -e
ltl2tgba=../../bin/ltl2tgba
ltl2tgba=ltl2tgba
cat >formulas <<'EOF'
1,13,X((a M F((!b & !c) | (b & c))) W (G!c U b))
@ -111,8 +111,8 @@ State: 4 {0}
EOF
run 0 ../ikwiad -H -DC -XH in.hoa > out.hoa
run 1 ../../bin/autfilt -q --are-isomorph in.hoa out.hoa
run 0 ../../bin/autfilt -q --are-isomorph ex.hoa out.hoa
run 1 autfilt -q --are-isomorph in.hoa out.hoa
run 0 autfilt -q --are-isomorph ex.hoa out.hoa
run 0 ../ikwiad -x -DC 'GFa & XGFb' > out.tgba
cat >ex.tgba <<EOF
@ -138,7 +138,7 @@ diff out.tgba ex.tgba
# This formula produce a co-deterministic automaton that is not deterministic,
# and a bug in the cosimulation caused the result to be marked as deterministic.
run 0 ../../bin/ltl2tgba -H '(0 R Xa) R (a xor Fa)' > out.hoa
run 0 ltl2tgba -H '(0 R Xa) R (a xor Fa)' > out.hoa
grep deterministic out.hoa && exit 1
@ -154,7 +154,7 @@ G(!a | XXXXXXa),64
G(!a | XXXXXXXa),128
G(!a | XXXXXXXXa),256
EOF
run 0 ../../bin/ltl2tgba -D -F input/1 --stats='%f,%s' > output
run 0 ltl2tgba -D -F input/1 --stats='%f,%s' > output
cat output
diff input output

View file

@ -329,5 +329,5 @@ Acc-Sig: +2
13
EOF
test `../../bin/dstar2tgba -D in.dra --stats="%d:%s:%e"` = "1:23:143"
test `dstar2tgba -D in.dra --stats="%d:%s:%e"` = "1:23:143"

View file

@ -148,8 +148,8 @@ EOF
diff expected stdout
# These one could be reduced to 2 5 0 0 and 3 8 1 0
test "`../../bin/dstar2tgba -D dsa.dstar --stats '%s %t %p %d'`" = "4 8 0 0"
test "`../../bin/dstar2tgba -DC dsa.dstar --stats '%s %t %p %d'`" = "5 11 1 0"
test "`dstar2tgba -D dsa.dstar --stats '%s %t %p %d'`" = "4 8 0 0"
test "`dstar2tgba -DC dsa.dstar --stats '%s %t %p %d'`" = "5 11 1 0"
@ -212,7 +212,7 @@ State: 3 "str\n\"ing" Acc-Sig: -0 +1 3 3 3 3
State: 4 "more\"string\"" Acc-Sig: +0 +1 3 4 3 4
EOF
run 0 ../../bin/autfilt -B dra.dstar | tee stdout
run 0 autfilt -B dra.dstar | tee stdout
cat >expected <<EOF
digraph G {
@ -262,7 +262,7 @@ cat >expected <<EOF
2 4 0 1 dra.dstar:43.1-54.1
EOF
../../bin/dstar2tgba --name=%F:%L -D dra.dstar --stats '%s %t %p %d %m' > out
dstar2tgba --name=%F:%L -D dra.dstar --stats '%s %t %p %d %m' > out
cat out
diff expected out
@ -281,7 +281,7 @@ State: 0
Acc-Sig:
0
EOF
run 0 ../../bin/dstar2tgba --name=%F --dot=nt aut.dsa | tee stdout
run 0 dstar2tgba --name=%F --dot=nt aut.dsa | tee stdout
cat >expected<<EOF
digraph G {

View file

@ -39,18 +39,18 @@ GFa
(a U (b U (c U (d U e)))) & G(!(a & b) & !(a & c) & !(b & c) & !(d & e))
EOF
run 0 ../../bin/ltlfilt --exclusive-ap=a,b,c --exclusive-ap=d,e formulas >out
run 0 ltlfilt --exclusive-ap=a,b,c --exclusive-ap=d,e formulas >out
cat out
diff out expected
run 0 ../../bin/ltlfilt --exclusive-ap='"a" ,b, "c" ' --exclusive-ap=' d , e' \
run 0 ltlfilt --exclusive-ap='"a" ,b, "c" ' --exclusive-ap=' d , e' \
formulas >out
cat out
diff out expected
../../bin/ltlfilt --exclusive-ap='"a","b' 2>stderr && exit 1
ltlfilt --exclusive-ap='"a","b' 2>stderr && exit 1
grep 'missing closing ."' stderr
../../bin/ltlfilt --exclusive-ap='a,,b' 2>stderr && exit 1
ltlfilt --exclusive-ap='a,,b' 2>stderr && exit 1
grep "unexpected ',' in a,,b" stderr
../../bin/ltlfilt --exclusive-ap='"a"b' 2>stderr && exit 1
ltlfilt --exclusive-ap='"a"b' 2>stderr && exit 1
grep "unexpected character 'b' in \"a\"b" stderr

View file

@ -82,12 +82,12 @@ State: 2 {0}
--END--
EOF
run 0 ../../bin/autfilt -H --exclusive-ap=a,b,c --exclusive-ap=d,e \
run 0 autfilt -H --exclusive-ap=a,b,c --exclusive-ap=d,e \
automaton >out
cat out
diff out expected
run 0 ../../bin/autfilt -H --exclusive-ap=a,b,c --exclusive-ap=d,e \
run 0 autfilt -H --exclusive-ap=a,b,c --exclusive-ap=d,e \
--simplify-exclusive-ap automaton >out2
cat out2
diff out2 expected-simpl
@ -151,12 +151,12 @@ State: 2 {0}
--END--
EOF
run 0 ../../bin/autfilt -H --exclusive-ap=a,b,c --exclusive-ap=d,e \
run 0 autfilt -H --exclusive-ap=a,b,c --exclusive-ap=d,e \
automaton >out
cat out
diff out expected
run 0 ../../bin/autfilt -H --exclusive-ap=a,b,c --exclusive-ap=d,e \
run 0 autfilt -H --exclusive-ap=a,b,c --exclusive-ap=d,e \
--simplify-exclusive-ap automaton >out2
cat out2
diff out2 expected-simpl

View file

@ -77,7 +77,7 @@ State: 2
--END--
EOF
run 0 ../../bin/autfilt input1 --product input2 --hoa | tee stdout
run 0 ../../bin/autfilt -F stdout --isomorph expected
run 0 autfilt input1 --product input2 --hoa | tee stdout
run 0 autfilt -F stdout --isomorph expected
rm input1 input2 stdout expected

View file

@ -77,6 +77,6 @@ State: 2
--END--
EOF
run 0 ../../bin/autfilt input1 --product input2 --hoa | tee stdout
run 0 ../../bin/autfilt -F stdout --isomorph expected
run 0 autfilt input1 --product input2 --hoa | tee stdout
run 0 autfilt -F stdout --isomorph expected
rm input1 input2 stdout expected

View file

@ -84,8 +84,8 @@ State: 0
--END--
EOF
run 0 ../../bin/autfilt input1 --product input2 --hoa | tee stdout
run 0 ../../bin/autfilt -q stdout --isomorph expected
run 1 ../../bin/autfilt -q stdout --isomorph unexpected
run 0 autfilt input1 --product input2 --hoa | tee stdout
run 0 autfilt -q stdout --isomorph expected
run 1 autfilt -q stdout --isomorph unexpected
true

View file

@ -80,7 +80,7 @@ State: 3
--END--
EOF
run 0 ../../bin/autfilt input1 --product input2 --hoa | tee stdout
run 0 autfilt input1 --product input2 --hoa | tee stdout
diff stdout expected
cat >expected <<EOF
@ -96,7 +96,7 @@ State: 0
--END--
EOF
run 0 ../../bin/autfilt input1 --product input2 --hoa --small | tee stdout
run 0 ../../bin/autfilt -F stdout --isomorph expected
run 0 autfilt input1 --product input2 --hoa --small | tee stdout
run 0 autfilt -F stdout --isomorph expected
rm input1 input2 stdout expected

View file

@ -23,17 +23,17 @@
set -e
for i in 0 1 2; do
../../bin/randaut a b --seed=$i -Q10 --hoa >iso$i
../../bin/autfilt iso$i --randomize --hoa >aut$i
randaut a b --seed=$i -Q10 --hoa >iso$i
autfilt iso$i --randomize --hoa >aut$i
done
for i in 3 4 5; do
../../bin/randaut a b --seed=$i -Q10 -D --hoa >iso$i
../../bin/autfilt iso$i --randomize --hoa >aut$i
randaut a b --seed=$i -Q10 -D --hoa >iso$i
autfilt iso$i --randomize --hoa >aut$i
done
cat aut0 aut1 aut2 aut3 aut4 aut5 > all
(for i in 0 1 2 3 4 5; do
run 0 ../../bin/autfilt all --are-isomorphic iso$i --hoa
run 0 autfilt all --are-isomorphic iso$i --hoa
done) > output
diff all output
@ -104,8 +104,8 @@ State: 2 [t] 2 [t] 2
--END--
EOF
run 0 ../../bin/autfilt aut1 --are-isomorphic aut2
run 0 ../../bin/autfilt aut3 --are-isomorphic aut4
run 0 autfilt aut1 --are-isomorphic aut2
run 0 autfilt aut3 --are-isomorphic aut4
run 0 ../../bin/autfilt -u aut1 aut2 aut2 aut3 -c >out
run 0 autfilt -u aut1 aut2 aut2 aut3 -c >out
test 2 = "`cat out`"

View file

@ -29,7 +29,7 @@ GF((a | b) & (b | d))
EOF
# Make sure --boolean-to-isop works as expected...
run 0 ../../bin/ltlfilt --boolean-to-isop input > output
run 0 ltlfilt --boolean-to-isop input > output
cat> expected<<EOF
(!a & !b) | (b & d)
@ -42,7 +42,7 @@ cat output
diff output expected
# Make sure it would not give the same output without the option...
run 0 ../../bin/ltlfilt input > output
run 0 ltlfilt input > output
cat> expected<<EOF
(a -> b) & (b -> d)

View file

@ -48,8 +48,8 @@ cat <<\EOF
\begin{document}
\begin{tabular}{ll}
EOF
( ../../bin/ltlfilt --latex input --format='\texttt{%F:%L} & $%f$ \\';
../../bin/genltl --go-theta=1..3 --latex \
( ltlfilt --latex input --format='\texttt{%F:%L} & $%f$ \\';
genltl --go-theta=1..3 --latex \
--format='\texttt{--%F:%L} & $%f$ \\')
cat <<\EOF
\end{tabular}

View file

@ -21,9 +21,9 @@
. ./defs
set -e
ltlfilt=../../bin/ltlfilt
randltl=../../bin/randltl
genltl=../../bin/genltl
ltlfilt=ltlfilt
randltl=randltl
genltl=genltl
# Some example formulas taken from Ruediger Ehlers's dbaminimizer
# http://react.cs.uni-saarland.de/tools/dbaminimizer

View file

@ -25,38 +25,38 @@ set -e
for f in 'p0 U p1 U p2' 'Gp00 | Gp13 | Gp42' '{(1;1)*}[]->p1'
do
# Make sure Spot can read the LBTT it produces
run 0 ../../bin/ltl2tgba --lbtt "$f" > out
run 0 ltl2tgba --lbtt "$f" > out
s=`wc -l < out`
if ../../bin/ltl2tgba -H "$f" | grep 'properties:.*state-acc'; then
if ltl2tgba -H "$f" | grep 'properties:.*state-acc'; then
head -n 1 out | grep t && exit 1
else
head -n 1 out | grep t
fi
run 0 ../../bin/autfilt --lbtt out > out2
run 0 autfilt --lbtt out > out2
s2=`wc -l < out2`
test "$s" -eq "$s2"
# The LBTT output use 2 lines par state, one line per transition,
# and one extra line for header.
run 0 ../../bin/ltl2tgba "$f" --stats 'expr %s \* 2 + %e + 1' > size
run 0 ltl2tgba "$f" --stats 'expr %s \* 2 + %e + 1' > size
l=$(eval "$(cat size)")
test "$s" -eq "$l"
# Make sure we output the state-based format
# for BA...
run 0 ../../bin/ltl2tgba --ba --lbtt --low --any "$f" >out4
run 0 ltl2tgba --ba --lbtt --low --any "$f" >out4
head -n 1 out4 | grep t && exit 1
s4=`wc -l < out4`
test "$s" -eq "$s4"
run 0 ../../bin/autfilt --lbtt out4 > out5
run 0 ../../bin/autfilt out4 --are-isomorphic out5
run 0 autfilt --lbtt out4 > out5
run 0 autfilt out4 --are-isomorphic out5
# ... unless --lbtt=t is used.
run 0 ../../bin/ltl2tgba --ba --lbtt=t --low --any "$f" >out6
run 0 ltl2tgba --ba --lbtt=t --low --any "$f" >out6
head -n 1 out6 | grep t
s6=`wc -l < out6`
test "$s" -eq "$s6"
run 0 ../../bin/autfilt --lbtt out6 > out7
run 0 ../../bin/autfilt out6 --are-isomorphic out7
run 0 autfilt --lbtt out6 > out7
run 0 autfilt out6 --are-isomorphic out7
done
@ -148,7 +148,7 @@ cat >input <<EOF
-1
EOF
run 0 ../../bin/autfilt --stats '%s %t %e %a' input > output
run 0 autfilt --stats '%s %t %e %a' input > output
cat >expected<<EOF
4 16 6 1
4 16 6 1
@ -175,6 +175,6 @@ input:3.5-20: failed to parse guard: & ! "a" ! "b" !
input:3.20: syntax error, unexpected '!', expecting end of formula
input:3.20: ignoring trailing garbage
EOF
../../bin/autfilt -q input 2> stderr && exit 1
autfilt -q input 2> stderr && exit 1
cat stderr
diff stderr expected

View file

@ -22,7 +22,7 @@
set -e
ltlfilt=../../bin/ltlfilt
ltlfilt=ltlfilt
cat >input <<EOF
(a < b) U (b == c - 1)

View file

@ -28,12 +28,12 @@ set -e
# Skip this test if ltl2dstar is not installed.
(ltl2dstar --version) || exit 77
ltlfilt=../../bin/ltlfilt
ltl2tgba=../../bin/ltl2tgba
ltlcross=../../bin/ltlcross
randltl=../../bin/randltl
ltlfilt=../../bin/ltlfilt
dstar2tgba=../../bin/dstar2tgba
ltlfilt=ltlfilt
ltl2tgba=ltl2tgba
ltlcross=ltlcross
randltl=randltl
ltlfilt=ltlfilt
dstar2tgba=dstar2tgba
$ltlfilt -f 'a U b' -l |
ltl2dstar --ltl2nba=spin:$ltl2tgba@-s - - |
@ -70,7 +70,7 @@ test `grep -c 'info: check_empty.*Comp' err` = 2
# Make sure ltldo preserve the Rabin acceptance by default
../../bin/ltldo \
ltldo \
"ltl2dstar --ltl2nba=spin:$ltl2tgba@-s --output-format=hoa %L %O" \
-f 'GFa -> GFb' -Hi > out.hoa
cat >expected <<EOF

View file

@ -28,10 +28,10 @@ set -e
# Skip this test if ltl2dstar is not installed.
(ltl2dstar --version) || exit 77
ltlfilt=../../bin/ltlfilt
ltl2tgba=../../bin/ltl2tgba
dstar2tgba=../../bin/dstar2tgba
randltl=../../bin/randltl
ltlfilt=ltlfilt
ltl2tgba=ltl2tgba
dstar2tgba=dstar2tgba
randltl=randltl
# Make sure all recurrence formulas are translated into deterministic

View file

@ -26,12 +26,12 @@ set -e
# Skip this test if ltl2dstar is not installed.
(ltl2dstar --version) || exit 77
ltlfilt=../../bin/ltlfilt
ltl2tgba=../../bin/ltl2tgba
ltlcross=../../bin/ltlcross
randltl=../../bin/randltl
ltlfilt=../../bin/ltlfilt
dstar2tgba=../../bin/dstar2tgba
ltlfilt=ltlfilt
ltl2tgba=ltl2tgba
ltlcross=ltlcross
randltl=randltl
ltlfilt=ltlfilt
dstar2tgba=dstar2tgba
RAB='--automata=rabin --output-format=hoa'
STR='--automata=streett --output-format=hoa'

View file

@ -28,12 +28,12 @@ set -e
# Skip this test if ltl2dstar is not installed.
(ltl2dstar --version) || exit 77
ltlfilt=../../bin/ltlfilt
ltl2tgba=../../bin/ltl2tgba
ltlcross=../../bin/ltlcross
randltl=../../bin/randltl
autfilt=../../bin/autfilt
ltldo=../../bin/ltldo
ltlfilt=ltlfilt
ltl2tgba=ltl2tgba
ltlcross=ltlcross
randltl=randltl
autfilt=autfilt
ltldo=ltldo
STR='--automata=streett --output-format=hoa'

View file

@ -27,8 +27,8 @@ set -e
ltl2tgba=../ikwiad
../../bin/randltl -n 100 p1 p2 p3 p4 p5 p6 --tree-size 5..15 |
../../bin/ltlcross \
randltl -n 100 p1 p2 p3 p4 p5 p6 --tree-size 5..15 |
ltlcross \
"$ltl2tgba -t %f > %T" \
"$ltl2tgba -t -r4 -R3f %f > %T" \
"$ltl2tgba -N %f > %N" \

View file

@ -25,4 +25,4 @@ set -e
# This used to trigger an assert because of BA simulation not
# returning an instance of spot::sba.
run 0 ../../bin/ltl2tgta --ta 'G(F(a U b) U (c M d))'
run 0 ltl2tgta --ta 'G(F(a U b) U (c M d))'

View file

@ -98,7 +98,7 @@ EOF
run 0 ../checkpsl check.txt
# Make sure False has one acceptance set when generating Büchi automata
test 1 -eq `../../bin/ltl2tgba -B false --stats %a`
test 1 -eq `ltl2tgba -B false --stats %a`
# In particular, Spot 0.9 would incorrectly reject the sequence:
# (a̅b;a̅b;a̅b̅);(a̅b;a̅b;a̅b̅);(a̅b;a̅b;a̅b̅);... in 'G!{(b;1)*;a}'
@ -194,28 +194,28 @@ grep 'states: 4$' stdout
# A bug in the translation of !{xxx} when xxx reduces to false caused
# the following formula to be considered equivalent to anything...
../../bin/ltlfilt -f '!{[*2] && [*0..1]}' --equivalent-to 'false' && exit 1
../../bin/ltlfilt -f '!{[*2] && [*0..1]}' --equivalent-to 'true'
ltlfilt -f '!{[*2] && [*0..1]}' --equivalent-to 'false' && exit 1
ltlfilt -f '!{[*2] && [*0..1]}' --equivalent-to 'true'
# Test some equivalences fixed in Spot 1.1.4
../../bin/ltlfilt -f '{{a;b}[*]}' --equivalent-to 'a & Xb'
../../bin/ltlfilt -r -f '{{a;b}[*]}' --equivalent-to 'a & Xb'
../../bin/ltlfilt -f '!{{a;b}[*]}' --equivalent-to '!a | X!b'
../../bin/ltlfilt -r -f '!{{a;b}[*]}' --equivalent-to '!a | X!b'
../../bin/ltlfilt -f '{a[*];b[*]}' --equivalent-to 'a | b'
../../bin/ltlfilt -r -f '{a[*];b[*]}' --equivalent-to 'a | b'
ltlfilt -f '{{a;b}[*]}' --equivalent-to 'a & Xb'
ltlfilt -r -f '{{a;b}[*]}' --equivalent-to 'a & Xb'
ltlfilt -f '!{{a;b}[*]}' --equivalent-to '!a | X!b'
ltlfilt -r -f '!{{a;b}[*]}' --equivalent-to '!a | X!b'
ltlfilt -f '{a[*];b[*]}' --equivalent-to 'a | b'
ltlfilt -r -f '{a[*];b[*]}' --equivalent-to 'a | b'
# A couple of tests for the [:*i..j] operator
../../bin/ltlfilt -q -f '{{a;b}[:*1..2];c}' \
ltlfilt -q -f '{{a;b}[:*1..2];c}' \
--equivalent-to '(a&X(b&Xc)) | a&(X(b&a&X(b&Xc)))'
../../bin/ltlfilt -q -r -f '{{a;b}[:*1..2];c}' \
ltlfilt -q -r -f '{{a;b}[:*1..2];c}' \
--equivalent-to '(a&X(b&Xc)) | a&(X(b&a&X(b&Xc)))'
../../bin/ltlfilt -q -f '{{a*}[:+];c}' --equivalent-to 'Xc R a'
../../bin/ltlfilt -q -r -f '{{a*}[:+];c}' --equivalent-to 'Xc R a'
../../bin/ltlfilt -q -f '{c && {b | [*0]}[:+]}' --equivalent-to 'c & b'
../../bin/ltlfilt -q -r -f '{c && {b | [*0]}[:+]}' --equivalent-to 'c & b'
ltlfilt -q -f '{{a*}[:+];c}' --equivalent-to 'Xc R a'
ltlfilt -q -r -f '{{a*}[:+];c}' --equivalent-to 'Xc R a'
ltlfilt -q -f '{c && {b | [*0]}[:+]}' --equivalent-to 'c & b'
ltlfilt -q -r -f '{c && {b | [*0]}[:+]}' --equivalent-to 'c & b'
# test unknown dot options
../../bin/ltl2tgba --dot=@ a 2>stderr && exit 1
ltl2tgba --dot=@ a 2>stderr && exit 1
grep 'ltl2tgba: unknown option.*@' stderr

View file

@ -30,7 +30,7 @@ set -e
# This used to crash ltlcross because the number of
# acceptance sets generated was to high.
../../bin/ltlcross '../../bin/ltl2tgba' 'ltl3dra' -f '(<>((((p0) &&
ltlcross 'ltl2tgba' 'ltl3dra' -f '(<>((((p0) &&
(!(<>(p2)))) || ((!(p0)) && (<>(p2)))) U ((<>(((p0) && (!([](((!(p1))
&& ([](p3))) || ((p1) && (!([](p3)))))))) || ((!(p0)) && ([](((!(p1))
&& ([](p3))) || ((p1) && (!([](p3))))))))) && (((p0) && (!(<>(p2))))

View file

@ -24,7 +24,7 @@
set -e
pwd
lc="../../bin/genltl"
lc="genltl"
run='run 0'

View file

@ -36,9 +36,9 @@ 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
randltl -n 100 p1 p2 p3 p4 p5 p6 --tree-size 5..15
) |
../../bin/ltlcross --products=2 \
ltlcross --products=2 \
"$ltl2tgba -t -f %f > %T" \
"$ltl2tgba -t -f -y %f > %T" \
"$ltl2tgba -t -f -fu %f > %T" \

View file

@ -21,10 +21,10 @@
. ./defs
set -e
ltl2tgba=../../bin/ltl2tgba
ltl2tgba=ltl2tgba
../../bin/randltl -P -n 100 p1 p2 p3 p4 p5 p6 --tree-size 5..15 --seed=314 |
../../bin/ltlcross --products=3 --timeout=60 \
randltl -P -n 100 p1 p2 p3 p4 p5 p6 --tree-size 5..15 --seed=314 |
ltlcross --products=3 --timeout=60 \
"$ltl2tgba --lbtt --any --low %f > %T" \
"$ltl2tgba --lbtt --any --medium %f > %T" \
"$ltl2tgba --hoa --any --high %f > %H" \

View file

@ -31,21 +31,21 @@ check_csv()
done)
}
ltl2tgba=../../bin/ltl2tgba
ltl2tgba=ltl2tgba
# Make sure ltlcross quotes formulas correctly
cat >formula <<\EOF
G"a'-'>'b"
EOF
run 0 ../../bin/ltlcross -F formula --csv=out.csv \
run 0 ltlcross -F formula --csv=out.csv \
"$ltl2tgba -s %f >%N" \
"$ltl2tgba --lenient -s %s >%N"
run 2 ../../bin/ltlcross "$ltl2tgba -s %f >%N" 'foo bar' 2>stderr -f a
run 2 ltlcross "$ltl2tgba -s %f >%N" 'foo bar' 2>stderr -f a
grep 'ltlcross.*no input.*in.*foo bar' stderr
# Make sure non-zero exit codes are reported...
run 1 ../../bin/ltlcross "$ltl2tgba -s %f >%N" 'false %f >%N' \
run 1 ltlcross "$ltl2tgba -s %f >%N" 'false %f >%N' \
-f a --csv=out.csv 2>stderr
grep '"exit_status"' out.csv
grep '"exit_code"' out.csv
@ -54,7 +54,7 @@ test `grep '"exit code",1' out.csv | wc -l` -eq 2
check_csv out.csv
# ... unless --omit-missing is supplied.
run 1 ../../bin/ltlcross "$ltl2tgba -s %f >%N" 'false %f >%N' \
run 1 ltlcross "$ltl2tgba -s %f >%N" 'false %f >%N' \
-f a --csv=out.csv --omit-missing 2>stderr
grep '"exit_status"' out.csv && exit 1
grep '"exit_code"' out.csv && exit 1
@ -64,7 +64,7 @@ check_csv out.csv
# Likewise for timeouts
echo foo >bug
run 0 ../../bin/ltlcross 'sleep 5; false %f >%N' 'false %f >%N' \
run 0 ltlcross 'sleep 5; false %f >%N' 'false %f >%N' \
--timeout 2 -f a --csv=out.csv \
--ignore-execution-failures \
--save-bogus=bug 2>stderr
@ -83,7 +83,7 @@ check_csv out.csv
test -f bug
test -s bug && exit 1
run 0 ../../bin/ltlcross 'sleep 5; false %f >%N' \
run 0 ltlcross 'sleep 5; false %f >%N' \
--timeout 2 --omit-missing -f a --csv=out.csv 2>stderr
grep '"exit_status"' out.csv && exit 1
grep '"exit_code"' out.csv && exit 1
@ -92,7 +92,7 @@ test `wc -l < out.csv` -eq 1
check_csv out.csv
# Check with --products=5 --automata
run 1 ../../bin/ltlcross "$ltl2tgba -s %f >%N" 'false %f >%N' \
run 1 ltlcross "$ltl2tgba -s %f >%N" 'false %f >%N' \
-f a --csv=out.csv --products=5 --automata 2>stderr
p=`sed 's/[^,]//g;q' out.csv | wc -c`
grep '"exit_status"' out.csv
@ -103,7 +103,7 @@ test `grep '"HOA:.*--BODY--.*--END--"' out.csv | wc -l` -eq 2
check_csv out.csv
# ... unless --omit-missing is supplied.
run 1 ../../bin/ltlcross "$ltl2tgba -s %f >%N" 'false %f >%N' \
run 1 ltlcross "$ltl2tgba -s %f >%N" 'false %f >%N' \
-f a --csv=out.csv --omit-missing --products=5 2>stderr
grep '"exit_status"' out.csv && exit 1
grep '"exit_code"' out.csv && exit 1
@ -113,7 +113,7 @@ check_csv out.csv
# Check with --products=+5
run 1 ../../bin/ltlcross "$ltl2tgba -s %f >%N" 'false %f >%N' \
run 1 ltlcross "$ltl2tgba -s %f >%N" 'false %f >%N' \
-f a --csv=out.csv --products=+5 --automata 2>stderr
q=`sed 's/[^,]//g;q' out.csv | wc -c`
grep '"exit_status"' out.csv
@ -124,7 +124,7 @@ test `grep '"HOA:.*--BODY--.*--END--"' out.csv | wc -l` -eq 2
check_csv out.csv
# ... unless --omit-missing is supplied.
run 1 ../../bin/ltlcross "$ltl2tgba -s %f >%N" 'false %f >%N' \
run 1 ltlcross "$ltl2tgba -s %f >%N" 'false %f >%N' \
-f a --csv=out.csv --omit-missing --products=+5 2>stderr
grep '"exit_status"' out.csv && exit 1
grep '"exit_code"' out.csv && exit 1
@ -138,7 +138,7 @@ test $q -eq `expr $p + 12`
# Check with Rabin/Streett output
first="should not be erased"
echo "$first" > bug.txt
run 1 ../../bin/ltlcross "$ltl2tgba -s %f >%N" 'false %f >%D' \
run 1 ltlcross "$ltl2tgba -s %f >%N" 'false %f >%D' \
-f 'X a' --csv=out.csv --save-bogus='>>bug.txt' 2>stderr
q=`sed 's/[^,]//g;q' out.csv | wc -c`
test $q -eq `expr $p - 1`
@ -152,7 +152,7 @@ test "`head -n 1 bug.txt`" = "$first"
# Support for --ABORT-- in HOA.
run 1 ../../bin/ltlcross 'echo HOA: --ABORT-- %f > %H' \
run 1 ltlcross 'echo HOA: --ABORT-- %f > %H' \
-f a --csv=out.csv 2>stderr
grep '"exit_status"' out.csv
grep '"exit_code"' out.csv
@ -162,7 +162,7 @@ test 3 = `wc -l < out.csv`
check_csv out.csv
# The header of CSV file is not output in append mode
run 1 ../../bin/ltlcross 'echo HOA: --ABORT-- %f > %H' \
run 1 ltlcross 'echo HOA: --ABORT-- %f > %H' \
-f a --csv='>>out.csv' 2>stderr
grep '"exit_status"' out.csv
grep '"exit_code"' out.csv
@ -173,7 +173,7 @@ check_csv out.csv
# Diagnose empty automata, and make sure %% is correctly replaced by %
run 1 ../../bin/ltlcross ': %f >%O; echo %%>foo' -f a 2>stderr
run 1 ltlcross ': %f >%O; echo %%>foo' -f a 2>stderr
test 2 = `grep -c ':.*empty input' stderr`
cat foo
cat >expected<<EOF

View file

@ -23,14 +23,14 @@ set -e
test -z "$PYTHON" && exit 77
ltl2tgba=../../bin/ltl2tgba
ltl2tgba=ltl2tgba
cat >formulas.txt <<EOF
GFa & GFb
GFa -> GFb
EOF
../../bin/ltlcross -F formulas.txt \
ltlcross -F formulas.txt \
"{ltl2tgba any} $ltl2tgba --lbtt --any %f > %T" \
"{ltl2tgba det} $ltl2tgba --lbtt --deterministic %f > %T" \
"{ltl2tgba sma} $ltl2tgba --lbtt --small %f > %T" \

View file

@ -21,7 +21,7 @@
. ./defs
set -e
ltl2tgba=../../bin/ltl2tgba
ltl2tgba=ltl2tgba
# The following "fake" script behaves as
# version 1.5.9 of modella, when run as
@ -85,7 +85,7 @@ esac
EOF
chmod +x fake
run 1 ../../bin/ltlcross -f 'G(F(p0) & F(G(!p1))) | (F(G(!p0)) & G(F(p1)))' \
run 1 ltlcross -f 'G(F(p0) & F(G(!p1))) | (F(G(!p0)) & G(F(p1)))' \
"$ltl2tgba --lbtt %f >%T" "./fake %l >%T" 2> errors
cat errors
grep 'error: P0\*N1 is nonempty' errors

View file

@ -21,7 +21,7 @@
. ./defs
set -e
ltl2tgba=../../bin/ltl2tgba
ltl2tgba=ltl2tgba
cat >fake <<\EOF
#!/bin/sh
@ -62,7 +62,7 @@ esac
EOF
chmod +x fake
run 1 ../../bin/ltlcross -f 'G(a <-> Fb) U c' \
run 1 ltlcross -f 'G(a <-> Fb) U c' \
"$ltl2tgba --lbtt %f >%T" "./fake %l >%T" 2> errors
cat errors
grep 'error: P0\*N1 is nonempty' errors

View file

@ -24,13 +24,13 @@ set -e
cat >fake <<EOF
#!/bin/sh
../../bin/ltl2tgba -s -f "\$1" | sed 's/p0/p1/g'
ltl2tgba -s -f "\$1" | sed 's/p0/p1/g'
EOF
chmod +x fake
run 1 ../../bin/ltlcross -f 'p0 U p1' "./fake %f >%N" \
"../../bin/ltl2tgba -s -f %f >%N" --grind=bogus.grind
run 1 ltlcross -f 'p0 U p1' "./fake %f >%N" \
"ltl2tgba -s -f %f >%N" --grind=bogus.grind
echo p0 >exp
diff bogus.grind exp

View file

@ -21,9 +21,9 @@
. ./defs
set -e
ltldo=../../bin/ltldo
ltl2tgba=../../bin/ltl2tgba
genltl=../../bin/genltl
ltldo=ltldo
ltl2tgba=ltl2tgba
genltl=genltl
run 0 $ltldo -f a -f 'a&b' -t 'echo %f,%s' >output
cat >expected <<EOF

View file

@ -21,8 +21,8 @@
. ./defs
set -e
ltldo=../../bin/ltldo
genltl=../../bin/genltl
ltldo=ltldo
genltl=genltl
test -n "$LTL2BA" || exit 77

View file

@ -25,7 +25,7 @@
set -e
ltlfilt=../../bin/ltlfilt
ltlfilt=ltlfilt
checkopt()
{

View file

@ -25,7 +25,7 @@ set -e
checkopt_noparse()
{
cat >exp
run 0 ../../bin/ltlgrind --sort "$@" > out
run 0 ltlgrind --sort "$@" > out
diff exp out
}
@ -33,7 +33,7 @@ checkopt()
{
checkopt_noparse "$@"
# The result must be parsable
../../bin/ltlfilt out
ltlfilt out
}
checkopt -f 'Xp1 U (p4 | (p3 xor (p4 W p0)))' <<EOF

View file

@ -65,7 +65,7 @@ State: 3
--END--
EOF
run 0 ../../bin/autfilt --mask-acc=0 input1 -H >output
run 0 autfilt --mask-acc=0 input1 -H >output
diff output expect1
cat >expect2 <<EOF
@ -88,7 +88,7 @@ State: 3
--END--
EOF
run 0 ../../bin/autfilt --mask-acc=1 input1 -H >output
run 0 autfilt --mask-acc=1 input1 -H >output
diff output expect2
cat >expect3 <<EOF
@ -104,10 +104,10 @@ State: 0
--END--
EOF
run 0 ../../bin/autfilt --mask-acc=0,1,2 input1 -H >output
run 0 autfilt --mask-acc=0,1,2 input1 -H >output
diff output expect3
run 0 ../../bin/autfilt --mask-acc=0 --mask-acc=1 input1 -H >output
run 0 autfilt --mask-acc=0 --mask-acc=1 input1 -H >output
diff output expect3
cat >input4 <<EOF
@ -152,10 +152,10 @@ State: 3
--END--
EOF
run 0 ../../bin/autfilt --mask-acc=1 input4 -H >output
run 0 autfilt --mask-acc=1 input4 -H >output
diff output expect4
# Errors
run 2 ../../bin/autfilt --mask-acc=a3 input1
run 2 ../../bin/autfilt --mask-acc=3-2 input1
run 2 ../../bin/autfilt --mask-acc=0,9999,1 input1
run 2 autfilt --mask-acc=a3 input1
run 2 autfilt --mask-acc=3-2 input1
run 2 autfilt --mask-acc=0,9999,1 input1

View file

@ -59,10 +59,10 @@ State: 0
--END--
EOF
run 0 ../../bin/autfilt --keep-states=0 input1 -H >output
run 0 autfilt --keep-states=0 input1 -H >output
diff output expect1
run 0 ../../bin/autfilt --keep-states=1 input1 -H >output
run 0 autfilt --keep-states=1 input1 -H >output
diff output expect1
cat >expect3 <<EOF
@ -100,14 +100,14 @@ State: 1
--END--
EOF
run 0 ../../bin/autfilt --keep-states=0,1,2 input1 -H >output
run 0 autfilt --keep-states=0,1,2 input1 -H >output
diff output expect3
run 0 ../../bin/autfilt --keep-states=0,9999,1,2 input1 -H >output
run 0 autfilt --keep-states=0,9999,1,2 input1 -H >output
diff output expect3
run 0 ../../bin/autfilt --keep-states=1,2,0 input1 -H >output
run 0 autfilt --keep-states=1,2,0 input1 -H >output
diff output expect4
# Errors
run 2 ../../bin/autfilt --keep-states=a3 input1
run 2 ../../bin/autfilt --keep-states=3-2 input1
run 2 autfilt --keep-states=a3 input1
run 2 autfilt --keep-states=3-2 input1

View file

@ -31,7 +31,7 @@ expect()
diff output.out output.exp
}
expect ../../bin/ltl2tgba --monitor a <<EOF
expect ltl2tgba --monitor a <<EOF
digraph G {
rankdir=LR
node [shape="circle"]
@ -44,7 +44,7 @@ digraph G {
}
EOF
expect ../../bin/ltl2tgba --monitor a --hoa<<EOF
expect ltl2tgba --monitor a --hoa<<EOF
HOA: v1
name: "a"
States: 2
@ -62,7 +62,7 @@ State: 1
--END--
EOF
expect ../../bin/ltl2tgba --monitor GFa --hoa<<EOF
expect ltl2tgba --monitor GFa --hoa<<EOF
HOA: v1
name: "GFa"
States: 1

View file

@ -67,7 +67,7 @@ State: 2 {0}
--END--
EOF
run 0 ../../bin/autfilt -F stdout --isomorph expected
run 0 autfilt -F stdout --isomorph expected
rm input stdout expected
@ -112,7 +112,7 @@ State: 2 {0}
--END--
EOF
run 0 ../../bin/autfilt -F stdout --isomorph expected
run 0 autfilt -F stdout --isomorph expected
rm input stdout expected
@ -323,7 +323,7 @@ accept_all:
skip
}
EOF
../../bin/autfilt --name=%F --dot=nsc <input >stdout 2>stderr && exit 1
autfilt --name=%F --dot=nsc <input >stdout 2>stderr && exit 1
cat >expected <<EOF
digraph G {
rankdir=LR
@ -372,8 +372,8 @@ GF("(a + b) == 42" U "process@foo")
EOF
while read f
do
run 0 ../../bin/ltl2tgba -H "!($f)" > f.hoa
run 0 ../../bin/ltl2tgba -s -f "$f" > f.spot
run 0 ltl2tgba -H "!($f)" > f.hoa
run 0 ltl2tgba -s -f "$f" > f.spot
# Make sure there is no `!x' occurring in the
# output. Because `x' is usually #define'd, we
# should use `!(x)' in guards.
@ -382,7 +382,7 @@ do
cp f.spot f.spin
cp f.spot f.ltl2ba
sf=`../../bin/ltlfilt -sf "$f"`
sf=`ltlfilt -sf "$f"`
if test -n "$SPIN"; then
# Old spin versions cannot parse formulas such as ((a + b) == 42).
@ -396,7 +396,7 @@ do
fi
esac
run 0 ../../bin/autfilt --count -v --intersect=f.hoa \
run 0 autfilt --count -v --intersect=f.hoa \
f.spot f.spin f.ltl2ba >out
test 3 = `cat out`
done <formulae

View file

@ -29,7 +29,7 @@ G(!r | Fa) | Fx, 0 1
EOF
# also test the filename/COL syntax
run 0 ../../bin/ltl2tgba -F expected.1/1 --stats='%f, %d %p' >out.1
run 0 ltl2tgba -F expected.1/1 --stats='%f, %d %p' >out.1
diff out.1 expected.1
cat >expected.2<<EOF
@ -40,7 +40,7 @@ G(!r | Fa) | Fx, 0 1
EOF
# filename/COL should also work when filename=-
run 0 ../../bin/ltl2tgba -C -F-/1 --stats='%f, %d %p' <expected.2 >out.2
run 0 ltl2tgba -C -F-/1 --stats='%f, %d %p' <expected.2 >out.2
diff out.2 expected.2
# Test multi-line CSV fields.
@ -52,11 +52,11 @@ a U b, 1 1
|
Fx", 0 1
EOF
run 0 ../../bin/ltl2tgba -C -Fin.2b/1 --stats='%f, %d %p' >out.2b
run 0 ltl2tgba -C -Fin.2b/1 --stats='%f, %d %p' >out.2b
diff out.2b expected.2
run 0 ../../bin/ltl2tgba FGa GFa --stats='%f %d %n %s %p' >out.3
run 0 ltl2tgba FGa GFa --stats='%f %d %n %s %p' >out.3
cat >expected.3<<EOF
FGa 0 1 2 0
GFa 1 0 1 1
@ -65,7 +65,7 @@ EOF
diff out.3 expected.3
run 0 ../../bin/ltl2tgba -DC FGa GFa --stats='%f %d %n %s %p' >out.4
run 0 ltl2tgba -DC FGa GFa --stats='%f %d %n %s %p' >out.4
cat >expected.4<<EOF
FGa 0 1 3 1
GFa 1 0 1 1

View file

@ -23,7 +23,7 @@
# This is a case where autfilt is used to optimize BA, but used to
# produce a larger one. See issue #79.
autfilt=../../bin/autfilt
autfilt=autfilt
# ltldo -s -f '!(((p1 W c1) U Gp2) || (GXc2 <-> F!F!c1))' 'ltl3ba -M0'
cat >input <<EOF

Some files were not shown because too many files have changed in this diff Show more