complete.test 3.4 KB
Newer Older
1
2
#! /bin/sh
# -*- coding: utf-8 -*-
Alexandre Duret-Lutz's avatar
Alexandre Duret-Lutz committed
3
4
# Copyright (C) 2015, 2016 Laboratoire de Recherche et Développement
# de l'Epita (LRDE).
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#
# 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/>.


. ./defs || exit 1

set -e

cat >automaton <<EOF
HOA: v1
States: 2
Start: 0
AP: 1 "a"
Acceptance: 1 Fin(0)
--BODY--
State: 0
[0] 1
State: 1
[0] 1
--END--
HOA: v1
States: 2
Start: 0
AP: 1 "a"
Acceptance: 2 t
--BODY--
State: 0
[0] 1
State: 1
[0] 1
--END--
HOA: v1
States: 2
Start: 0
AP: 1 "a"
Acceptance: 0 f
--BODY--
State: 0
[0] 1
State: 1
[0] 1
--END--
Alexandre Duret-Lutz's avatar
Alexandre Duret-Lutz committed
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
/* This example comes from Alexandre Lewkowicz */
HOA: v1
States: 2
Start: 0
AP: 1 "a"
Acceptance: 2 Fin(0)&Inf(1)
--BODY--
State: 0
[0] 1
State: 1
[0] 1 {0}
[!0] 1 {1}
--END--
HOA: v1
States: 2
Start: 0
AP: 1 "a"
Acceptance: 2 Fin(0)&Inf(1)
--BODY--
State: 0
[0] 1
State: 1
[0] 1 {0}
[!0] 1 {0}
--END--
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
HOA: v1
States: 2
Start: 0
AP: 2 "a" "b"
Acceptance: 1 Fin(0)
properties: very-weak
--BODY--
State: 0
[!0 | 1] 0
[0&!1] 1&0
State: 1 {0}
[0&!1] 1
--END--
HOA: v1
States: 2
Start: 0&1
Acceptance: 1 Fin(0)
--BODY--
State: 0
State: 1 {0}
--END--
106
107
108
109
110
111
112
EOF

cat >expected <<EOF
HOA: v1
States: 3
Start: 0
AP: 1 "a"
113
acc-name: co-Buchi
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
Acceptance: 1 Fin(0)
properties: trans-labels explicit-labels state-acc complete
properties: deterministic
--BODY--
State: 0
[0] 1
[!0] 2
State: 1
[0] 1
[!0] 2
State: 2 {0}
[t] 2
--END--
HOA: v1
States: 3
Start: 0
AP: 1 "a"
acc-name: Buchi
Acceptance: 1 Inf(0)
properties: trans-labels explicit-labels state-acc complete
properties: deterministic
--BODY--
State: 0 {0}
[0] 1
[!0] 2
State: 1 {0}
[0] 1
[!0] 2
State: 2
[t] 2
--END--
HOA: v1
States: 2
Start: 0
AP: 1 "a"
149
acc-name: none
150
151
152
153
154
155
156
157
158
159
160
Acceptance: 0 f
properties: trans-labels explicit-labels state-acc complete
properties: deterministic
--BODY--
State: 0
[0] 1
[!0] 1
State: 1
[0] 1
[!0] 1
--END--
Alexandre Duret-Lutz's avatar
Alexandre Duret-Lutz committed
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
HOA: v1
States: 3
Start: 0
AP: 1 "a"
acc-name: Rabin 1
Acceptance: 2 Fin(0) & Inf(1)
properties: trans-labels explicit-labels trans-acc complete
properties: deterministic
--BODY--
State: 0
[0] 1
[!0] 2
State: 1
[0] 1 {0}
[!0] 1 {1}
State: 2
[t] 2
--END--
HOA: v1
States: 2
Start: 0
AP: 1 "a"
acc-name: Rabin 1
Acceptance: 2 Fin(0) & Inf(1)
properties: trans-labels explicit-labels state-acc complete
properties: deterministic
--BODY--
State: 0
[0] 1
[!0] 1
State: 1 {0}
[0] 1
[!0] 1
--END--
195
196
197
198
199
200
201
202
203
204
205
HOA: v1
States: 2
Start: 0
AP: 2 "a" "b"
acc-name: co-Buchi
Acceptance: 1 Fin(0)
properties: univ-branch trans-labels explicit-labels state-acc complete
properties: deterministic very-weak
--BODY--
State: 0
[!0 | 1] 0
206
[0&!1] 0&1
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
State: 1 {0}
[0&!1] 1
[!0 | 1] 1
--END--
HOA: v1
States: 2
Start: 0&1
AP: 0
acc-name: co-Buchi
Acceptance: 1 Fin(0)
properties: univ-branch trans-labels explicit-labels state-acc complete
properties: deterministic
--BODY--
State: 0
[t] 0
State: 1
[t] 0
--END--
225
226
EOF

227
run 0 autfilt -CH automaton >out
228
229
cat out
diff out expected