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

23
24
25
26
27

. ./defs

set -e

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

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

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

87
expect_ce 'a' 1
88
expect_ce 'a U b' 1
89
90
91
92
93
94
95
96
expect_ce 'X a' 1
expect_ce 'a & b & c' 1
expect_ce 'a | b | (c U (d & (g U (h ^ i))))' 2
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
expect_ce '!((FF a) <=> (F x))' 3
97
98
expect_no 'Xa && (!a U b) && !b && X!b' 2
expect_no '(a U !b) && Gb' 2