1#!/bin/sh
2# -*- coding: utf-8 -*-
3# Copyright (C) 2015-2017, 2019 Laboratoire de Recherche et
4# Développement de l'Epita (LRDE).
5#
6# This file is part of Spot, a model checking library.
7#
8# Spot is free software; you can redistribute it and/or modify it
9# under the terms of the GNU General Public License as published by
10# the Free Software Foundation; either version 3 of the License, or
11# (at your option) any later version.
12#
13# Spot is distributed in the hope that it will be useful, but WITHOUT
14# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
15# or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
16# License for more details.
17#
18# You should have received a copy of the GNU General Public License
19# along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
21. ./defs
22set -e
23
24test -n "$LTL2BA" || exit 77
25
26genltl --or-g=1..2 |
27    run 0 ltldo -d "$LTL2BA -f %s>%H" '{foo}ltl2ba' >output
28test 4 = `grep -c digraph output`
29
30
31test "ltl2tgba,4" = "`ltldo 'ltl2tgba -D' ltl2tgba \
32                      -f 'Ga | Gb | Gc' --stats='%T,%s' --smallest`"
33
34ltldo 'ltl2tgba -D' ltl2tgba -f 'Ga | Gb | Gc' --smallest=%n > aut1.hoa
35ltl2tgba -D 'Ga | Gb | Gc' > aut2.hoa
36diff aut1.hoa aut2.hoa
37
38test "ltl2tgba -D" = \
39  "`ltldo 'ltl2tgba -D' ltl2tgba -f 'Ga | Gb | Gc' --greatest=%e --stats=%T`"
40
41
42ltldo --negate 'ltl2tgba -D' -f FGa --stats=%f,%s >out.csv
43ltldo --negate 'ltl2tgba -D' --lbt-input -f 'F G a' --stats=%f,%s >>out.csv
44ltl2tgba --negate -D FGa --stats=%f,%s >>out.csv
45cat >expected <<EOF
46!FGa,1
47! F G "a",1
48GF!a,1
49EOF
50diff out.csv expected
51