emptchk.test 3.39 KB
Newer Older
1
#!/bin/sh
2
# -*- coding: utf-8 -*-
3
# Copyright (C) 2008, 2009, 2010, 2014 Laboratoire de Recherche et
4
# Développement de l'Epita (LRDE).
5
# Copyright (C) 2003, 2004, 2005 Laboratoire d'Informatique de
6
7
# Paris 6 (LIP6), département Systèmes Répartis Coopératifs (SRC),
# Université Pierre et Marie Curie.
Alexandre Duret-Lutz's avatar
Alexandre Duret-Lutz committed
8
9
10
11
12
#
# 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
13
# the Free Software Foundation; either version 3 of the License, or
Alexandre Duret-Lutz's avatar
Alexandre Duret-Lutz committed
14
15
16
17
18
19
20
21
# (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
22
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
Alexandre Duret-Lutz's avatar
Alexandre Duret-Lutz committed
23

24
25
26
27
28

. ./defs

set -e

29
30
expect_ce_do()
{
31
32
  run 0 ../ltl2tgba "$@"
  run 0 ../ltl2tgba -g "$@"
33
34
}

35
36
expect_ce()
{
37
  expect_ce_do -CR -e -taa "$1"
38
  expect_ce_do -CR -e -taa -DT "$1"
39
  expect_ce_do -CR -e -f "$1"
40
  expect_ce_do -CR -e -f -DT "$1"
41
  expect_ce_do -CR -e'Cou99(shy)' -taa "$1"
42
  expect_ce_do -CR -e'Cou99(shy)' -taa -DT "$1"
43
  expect_ce_do -CR -e'Cou99(shy)' -f "$1"
44
  expect_ce_do -CR -e'Cou99(shy)' -f -DT "$1"
45
  expect_ce_do -CR -eCVWY90 -taa "$1"
46
  expect_ce_do -CR -eCVWY90 -f "$1"
47
  run 0 ../ltl2tgba -CR -e'CVWY90(bsh=10M)' -taa "$1"
48
  run 0 ../ltl2tgba -CR -e'CVWY90(bsh=10M)' -f "$1"
49
  run 0 ../ltl2tgba -CR -eSE05 -taa "$1"
50
  run 0 ../ltl2tgba -CR -eSE05 -f "$1"
51
  run 0 ../ltl2tgba -CR -e'SE05(bsh=10M)' -taa "$1"
52
53
54
  run 0 ../ltl2tgba -CR -e'SE05(bsh=10M)' -f "$1"
  run 0 ../ltl2tgba -CR -eTau03_opt -f "$1"
  run 0 ../ltl2tgba -CR -eGV04 -f "$1"
55
  # Expect multiple accepting runs
56
  test `../ltl2tgba -C -e'CVWY90(repeated)' -taa "$1" |
57
        grep Prefix: | wc -l` -ge $2
58
  test `../ltl2tgba -C -e'SE05(repeated)' -taa "$1" |
59
        grep Prefix: | wc -l` -ge $2
60
61
62
63
}

expect_no()
{
64
  run 0 ../ltl2tgba -CR -E -taa "$1"
65
  run 0 ../ltl2tgba -CR -E -taa -DT "$1"
66
  run 0 ../ltl2tgba -CR -E -f "$1"
67
  run 0 ../ltl2tgba -CR -E -f -DT "$1"
68
  run 0 ../ltl2tgba -CR -E'Cou99(shy)' -taa "$1"
69
  run 0 ../ltl2tgba -CR -E'Cou99(shy)' -taa -DT "$1"
70
  run 0 ../ltl2tgba -CR -E'Cou99(shy)' -f "$1"
71
  run 0 ../ltl2tgba -CR -E'Cou99(shy)' -f -DT "$1"
72
  run 0 ../ltl2tgba -CR -ECVWY90 -taa "$1"
73
  run 0 ../ltl2tgba -CR -ECVWY90 -f "$1"
74
  run 0 ../ltl2tgba -CR -E'CVWY90(bsh=10M)' -taa "$1"
75
  run 0 ../ltl2tgba -CR -E'CVWY90(bsh=10M)' -f "$1"
76
  run 0 ../ltl2tgba -CR -ESE05 -taa "$1"
77
  run 0 ../ltl2tgba -CR -ESE05 -f "$1"
78
  run 0 ../ltl2tgba -CR -E'SE05(bsh=10M)' -taa "$1"
79
80
81
  run 0 ../ltl2tgba -CR -E'SE05(bsh=10M)' -f "$1"
  run 0 ../ltl2tgba -CR -ETau03_opt -f "$1"
  run 0 ../ltl2tgba -CR -EGV04 -f "$1"
82
  test `../ltl2tgba -C -e'CVWY90(repeated)' -taa "!($1)" |
83
        grep Prefix: | wc -l` -ge $2
84
  test `../ltl2tgba -C -e'SE05(repeated)' -taa "!($1)" |
85
        grep Prefix: | wc -l` -ge $2
86
87
}

88
expect_ce 'a' 1
89
expect_ce 'a U b' 1
90
91
expect_ce 'X a' 1
expect_ce 'a & b & c' 1
92
expect_ce 'a | b | (c U (d & (g U (h ^ i))))' 1
93
94
95
96
expect_ce 'Xa & (b U !a) & (b U !a)' 1
expect_ce 'Fa & Xb & GFc & Gd' 1
expect_ce 'Fa & Xa & GFc & Gc' 2
expect_ce 'Fc & X(a | Xb) & GF(a | Xb) & Gc' 1
97
expect_ce '!((FF a) <=> (F x))' 2
98
99
expect_no 'Xa && (!a U b) && !b && X!b' 2
expect_no '(a U !b) && Gb' 2