#!/bin/sh # -*- coding: utf-8 -*- # Copyright (C) by the Spot authors, see the AUTHORS file for details. # # 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 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 ltl2tgba --lbtt "$f" > out s=`wc -l < out` 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 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 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 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 autfilt --lbtt out4 > out5 run 0 autfilt out4 --are-isomorphic out5 # ... unless --lbtt=t is used. 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 autfilt --lbtt out6 > out7 run 0 autfilt out6 --are-isomorphic out7 done # multiple inputs (from different tools) cat >input < output cat >expected< input <expected < stderr && exit 1 cat stderr diff stderr expected