#!/bin/sh # -*- coding: utf-8 -*- # Copyright (C) 2009-2020 Laboratoire de Recherche et Développement de # l'Epita (LRDE). # Copyright (C) 2003, 2004 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 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 # If the size of automata produced by ltl2tgba on the formulas we # commonly use as benchmark change, we want to notice it. set -e genltl --dac --eh --sb --hkrss --p --format=%F,%L,%f >pos (cat pos; ltlfilt --negate pos/3 --format='!%<,%f') | ltlfilt -u -F-/3 >formulas ltl2tgba -Fformulas/3 --stats='%<,%f, %s,%t' | ltl2tgba -D -F-/3 --stats='%<,%f,%>, %s,%t' | ltl2tgba -B -F-/3 --stats='%<,%f,%>, %s,%t' | ltl2tgba -BD -F-/3 --stats='%<,%>, %s,%t' > output cat >expected <formulas <. Issue #380. ltlfilt -Fformulas/1 --stats='%f,%f,%>' | ltl2tgba -F-/2 --stats='%<,%<, %s,%t' | ltl2tgba -D -F-/2 --stats='%<,%<,%>, %s,%t' | perl -p -e 's/$/\r/' | ltl2tgba -B -F-/2 --stats='%<,%<,%>, %s,%t' | ltl2tgba -BD -F-/2 --stats='%<,%<,%>, %s,%t' | ltl2tgba -GD -F-/2 --stats='%<,%>, %s,%t' > output diff formulas output # Issue #367. test 4 = `ltl2tgba 'GF(a<->XXa)' --stats=%s` test 9 = `ltl2tgba --low 'GF(a<->XXa)' --stats=%s` test 9 = `ltl2tgba -x gf-guarantee=0 'GF(a<->XXa)' --stats=%s` test 4 = `ltl2tgba --low -x gf-guarantee=1 'GF(a<->XXa)' --stats=%s` # Regression test for issue #357. The second formula used to # incorrectly produce 13 edges when translated after the first one # because the transition were explored in a different order. ltl2tgba -D 'a | Fb' 'GF(d & (!c | XXc))' --stats=%s,%e,%d >out cat >expected <in <out cat >expected < c) W d))' | grep '\[f\]' && exit 1 # Reported by Jens Kreber ltl2tgba '!b & e U (a & b & c)' | grep '\[f\]' && exit 1 ltl2tgba '!b & e U (a & b & c)' --stats=%w | grep 0 && exit 1 ltl2tgba 'X!c & X(b & c & d & a U e)' | grep '\[f\]' && exit 1 ltl2tgba 'X!c & X(b & c & d & a U e)' --stats=%w | grep 0 && exit 1 # This caused issue at some point, because simplify_acceptance would # leave some undeclared acceptance set in the automaton, which would # cause simulation-based reduction to produce garbage output, which # would in turn cause the HOA printer to choke. ltlcross -f 'G(F(Gb ^ Fa) & FG!a)' 'ltl2tgba -G -D' # Issue #402, reported by Juraj Major. f='(GFp0 | FGp1) & (GF!p1 | FGp2) & (GF!p2 | FG!p0)' test 1,8,3 = `ltl2tgba -G -D "$f" --stats=%s,%e,%a` test 1,3,2 = `ltl2tgba -G -D "(GFp0 | FGp1)" --stats=%s,%e,%a` # Handling of Xor and <-> by ltl-split and -D -G. res=`ltl2tgba -D -G 'X((Fa & Fb & Fc & Fd) <-> GFe)' --stats='%s %g'` test "$res" = "17 (Inf(0) & Fin(1)) | (Fin(0) & Inf(1))" res=`ltl2tgba -D -G 'X((Fa & Fb & Fc & Fd) ^ GFe)' --stats='%s %g'` test "$res" = "17 (Inf(0)&Inf(1)) | (Fin(0) & Fin(1))" ltlcross 'ltl2tgba -D -G' 'ltl2tgba -G' -f '(Fa & Fb & Fc & Fd) ^ GFe' f='G(p1 | G!p0) M Xp1' test "6,1" = `ltl2tgba "$f" --stats=%s,%d` test "6,0" = `ltl2tgba -x wdba-minimize=2 "$f" --stats=%s,%d` test "6,0" = `ltl2tgba -x wdba-minimize=0 "$f" --stats=%s,%d` test "6,0" = `ltl2tgba --med "$f" --stats=%s,%d` f='X((p1 & Xp1) M Fp1)' test "4,1" = `ltl2tgba -D "$f" --stats=%s,%d` test "4,1" = `ltl2tgba -D -x wdba-minimize=2 "$f" --stats=%s,%d` test "4,0" = `ltl2tgba -D -x wdba-minimize=0 "$f" --stats=%s,%d` test "4,1" = `ltl2tgba -D --med "$f" --stats=%s,%d` :