prodor.test 2.89 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
#!/bin/sh
# -*- coding: utf-8 -*-
# Copyright (C) 2015 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/>.

. ./defs
set -e

24
25
ltl2tgba=ltl2tgba
autfilt=autfilt
26
27
28
29
30
31
32
33
34
35
36
37
38

$ltl2tgba -DH 'GFa' > gfa.hoa
$ltl2tgba -DH 'FGb' > fgb.hoa
$autfilt --product-or gfa.hoa fgb.hoa -H > por.hoa
cat por.hoa

cat >exp <<EOF
HOA: v1
States: 3
Start: 0
AP: 2 "a" "b"
Acceptance: 2 Inf(0) | Inf(1)
properties: trans-labels explicit-labels trans-acc complete
39
properties: stutter-invariant
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
--BODY--
State: 0
[0&1] 1 {1}
[!0&1] 1
[0] 0 {1}
[!0] 0
State: 1
[0&1] 1 {0 1}
[!0&1] 1 {0}
[0&!1] 2 {0 1}
[!0&!1] 2 {0}
State: 2
[0] 2 {1}
[!0] 2
--END--
EOF
diff por.hoa exp

test 2 = `$autfilt -c --intersect por.hoa gfa.hoa fgb.hoa`

$autfilt --product-and gfa.hoa fgb.hoa -H > pand.hoa
cat pand.hoa

cat >exp <<EOF
HOA: v1
States: 2
Start: 0
AP: 2 "a" "b"
acc-name: generalized-Buchi 2
Acceptance: 2 Inf(0)&Inf(1)
70
properties: trans-labels explicit-labels trans-acc stutter-invariant
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
--BODY--
State: 0
[0&1] 1 {1}
[!0&1] 1
[0] 0 {1}
[!0] 0
State: 1
[0&1] 1 {0 1}
[!0&1] 1 {0}
--END--
EOF
diff pand.hoa exp

test 2 = `$autfilt -c --intersect pand.hoa gfa.hoa fgb.hoa`

$ltl2tgba -BDH 'GFa' > gfa.hoa
$ltl2tgba -BDH 'Xb' > xb.hoa
$autfilt --product-or gfa.hoa xb.hoa -H > por.hoa
cat por.hoa

cat >exp <<EOF
HOA: v1
States: 7
Start: 0
AP: 2 "a" "b"
Acceptance: 2 Inf(0) | Inf(1)
properties: trans-labels explicit-labels state-acc complete
properties: deterministic
--BODY--
100
State: 0 {1}
101
102
[0] 1
[!0] 2
103
State: 1 {1}
104
105
106
107
[0&1] 3
[!0&1] 4
[0&!1] 5
[!0&!1] 6
108
State: 2
109
110
111
112
113
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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
[0&1] 3
[!0&1] 4
[0&!1] 5
[!0&!1] 6
State: 3 {0 1}
[0] 3
[!0] 4
State: 4 {0}
[0] 3
[!0] 4
State: 5 {1}
[0] 5
[!0] 6
State: 6
[0] 5
[!0] 6
--END--
EOF
diff por.hoa exp

$ltl2tgba -BDH 'GFa' > gfa.hoa
$ltl2tgba -x '!wdba-minimize' -DH 'Xb' > xb.hoa
$autfilt --product-or gfa.hoa xb.hoa -H > por.hoa
cat por.hoa

cat >exp <<EOF
HOA: v1
States: 7
Start: 0
AP: 2 "a" "b"
Acceptance: 2 Inf(0) | Inf(1)
properties: trans-labels explicit-labels state-acc complete
properties: deterministic
--BODY--
State: 0 {0 1}
[0] 1
[!0] 2
State: 1 {0 1}
[0&1] 3
[!0&1] 4
[0&!1] 5
[!0&!1] 6
State: 2 {0}
[0&1] 3
[!0&1] 4
[0&!1] 5
[!0&!1] 6
State: 3 {0 1}
[0] 3
[!0] 4
State: 4 {0}
[0] 3
[!0] 4
State: 5 {1}
[0] 5
[!0] 6
State: 6
[0] 5
[!0] 6
--END--
EOF
diff por.hoa exp