#!/bin/sh # -*- coding: utf-8 -*- # Copyright (C) 2015-2019 Laboratoire de Recherche et Développement de # l'Epita (LRDE). # # 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 3 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 this program. If not, see . . ./defs set -e run 0 ltldo -f a -f 'a&b' -f 'a -> b' -t 'echo %f,%s,%[ei]w' >output cat >expected < (b),(a) -> (b),(a=0) + (b=1) EOF diff output expected # Renaming run 0 ltldo -f a -f 'a&_b' -t 'echo %f,%s' >output cat >expected <output 2>stderr test -z "`cat output`" test 4 = `grep -c warning: stderr` genltl --or-g=1..2 | run 0 ltldo -t 'sleep 10; echo %f' -T1 -t 'sleep 10; echo %f' \ --fail-on-timeout --error=warn >output 2>stderr test -z "`cat output`" test 4 = `grep -c error: stderr` grep -q 'aborting here' stderr && exit 1 genltl --or-g=1..2 | run 2 ltldo -t 'sleep 10; echo %f' -T1 -t 'sleep 10; echo %f' \ --fail-on-timeout >output 2>stderr test -z "`cat output`" test 1 = `grep -c error: stderr` grep -q 'aborting here' stderr test "`echo 1,a,3,4 | ltldo -F-/2 ltl2tgba --stats='%<,%s,%>'`" = '1,2,3,4' genltl --and-gf=1..3 | run 0 ltldo "{tgba}ltl2tgba %f -H >%H" "{ba}ltl2tgba >%N %f -s" \ --stats="%T,%#,%f,%s,%t,%e" >output cat output cat >expected <%H" -f GF_foo_ -H >output cat output # The HOA output uses _foo_ as atomic proposition, but the name shows # that GFp0 was actually given to ltl2tgba. cat >expected <%H" -f GF_foo_ -H --name=%f >output cat output cat >expected <%H" -f GF_foo_ -H --trust-hoa=no >output cat output cat >expected <%O' -f GFa 2>stderr && exit 1 test $? = 2 grep ':.*empty input' stderr grep 'ltldo: aborting' stderr ltldo ': %s; true>%O' --errors=ignore -f GFa 2>stderr test $? = 0 test -z "`cat stderr`" ltldo ': %s; true>%O' --errors=warn -f GFa 2>stderr test $? = 0 grep ':.*empty input' stderr ltldo '{name} foo/bar/ltl2baextended' -f GFa 2>stderr && exit 1 grep 'ltldo:.*foo/bar/ltl2baextended' stderr test 2 = `genltl --and-gf=1..4 | ltldo ltl2tgba -n2 | autfilt -c` test 3 = `genltl --and-gf=1..2 | ltldo ltl2tgba 'ltl2tgba -s' -n3 | autfilt -c` ltldo ltl2tgba -n2a 2>err && exit 1 grep "ltldo: failed to parse '2a'.*-n" err genltl --rv-counter=9 | ltldo ltl2tgba --stats=' print("%[up]R + %[uc]R + %[sp]R + %[sc]R - %R\n"); die if abs(%[up]R + %[uc]R + %[sp]R + %[sc]R - %R) > 0.02;' > code.pl perl code.pl # ltldo should not leave temporary files behind itself on errors ltldo -f a 'ltl2dstar --ltl2nba=spin:ltl2tgba@-DS' && exit 2 for i in lcr-*; do case $i in 'lcr-*');; *) echo $i should not be here; exit 2;; esac done