tgbagraph.test 2.9 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/sh
# -*- coding: utf-8 -*-
# Copyright (C) 2014 Laboratoire de Recherche et Développement de
# l'Epita (LRDE).
#
# 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 <http://www.gnu.org/licenses/>.

# While running some benchmark, Tomáš Babiak found that Spot took too
# much time (i.e. >1h) to translate those six formulae.  It turns out
# that the WDBA minimization was performed after the degeneralization
# algorithm, while this is not necessary (WDBA will produce a BA, so
# we may as well skip degeneralization).  Translating these formulae
# in the test-suite ensure that they don't take too much time (the
# buildfarm will timeout if it does).

. ./defs

set -e

run 0 ../tgbagraph | tee stdout

cat >expected <<EOF
digraph G {
37
38
  rankdir=LR
  0 [label="", style=invis, width=0]
39
40
  0 -> 1
  1 [label="0"]
41
42
43
  1 -> 1 [label="0"]
  1 -> 2 [label="p1"]
  1 -> 3 [label="p2\n{1}"]
44
  2 [label="1"]
45
  2 -> 3 [label="p1 & p2\n{0}"]
46
  3 [label="2"]
47
48
49
  3 -> 1 [label="p1 | p2\n{0,1}"]
  3 -> 2 [label="!p1 | p2"]
  3 -> 3 [label="1\n{0,1}"]
50
}
51
digraph G {
52
53
  rankdir=LR
  0 [label="", style=invis, width=0]
54
55
  0 -> 1
  1 [label="0"]
56
57
58
  1 -> 1 [label="0"]
  1 -> 2 [label="p1"]
  1 -> 3 [label="p2\n{1}"]
59
  2 [label="1"]
60
  2 -> 3 [label="p1 & p2\n{0}"]
61
  3 [label="2"]
62
  3 -> 1 [label="p1 | p2\n{0,1}"]
63
64
}
digraph G {
65
66
  rankdir=LR
  0 [label="", style=invis, width=0]
67
68
  0 -> 1
  1 [label="0"]
69
70
71
  1 -> 1 [label="0"]
  1 -> 2 [label="p1"]
  1 -> 3 [label="p2\n{1}"]
72
  2 [label="1"]
73
  2 -> 3 [label="p1 & p2\n{0}"]
74
75
76
  3 [label="2"]
}
digraph G {
77
78
  rankdir=LR
  0 [label="", style=invis, width=0]
79
80
  0 -> 1
  1 [label="0"]
81
82
83
  1 -> 1 [label="0"]
  1 -> 2 [label="p1"]
  1 -> 3 [label="p2\n{1}"]
84
  2 [label="1"]
85
  2 -> 3 [label="p1 & p2\n{0}"]
86
  3 [label="2"]
87
88
89
  3 -> 1 [label="p1 | p2\n{0,1}"]
  3 -> 2 [label="!p1 | p2"]
  3 -> 1 [label="1\n{0,1}"]
90
91
}
digraph G {
92
93
  rankdir=LR
  0 [label="", style=invis, width=0]
94
95
  0 -> 1
  1 [label="0"]
96
97
  1 -> 2 [label="p1"]
  1 -> 3 [label="p2\n{1}"]
98
  2 [label="1"]
99
  2 -> 3 [label="p1 & p2\n{0}"]
100
  3 [label="2"]
101
102
  3 -> 1 [label="1\n{0,1}"]
  3 -> 2 [label="!p1 | p2"]
103
}
104
digraph G {
105
106
  rankdir=LR
  0 [label="", style=invis, width=0]
107
108
  0 -> 1
  1 [label="0"]
109
110
  1 -> 2 [label="p1"]
  1 -> 3 [label="p2\n{1}"]
111
  2 [label="1"]
112
  2 -> 3 [label="p1 & p2\n{0}"]
113
  3 [label="2"]
114
115
  3 -> 1 [label="1\n{0,1}"]
  3 -> 2 [label="!p1 | p2"]
116
}
117
118
119
EOF

diff stdout expected