forked from aibasel/downward-benchmarks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathp03-phil4.pddl
191 lines (136 loc) · 4.26 KB
/
p03-phil4.pddl
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
37
38
39
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
70
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
100
101
102
103
104
105
106
107
108
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
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
;; This problem instance specifies a
;; particular communication protocol
;; that is compiled from Promela source
;; (c) Stefan Edelkamp, 2004
(define (problem instance)
(:domain protocol)
(:objects
;; available processes
philosopher-0
philosopher-1
philosopher-2
philosopher-3
- process
;; available comunication channels
forks-0-
forks-1-
forks-2-
forks-3-
- queue
;; available comunication channels types
queue-1
- queuetype
;; available queue cells
qs-0
- queue-state
;; available message types
empty
fork
- message
;; available number tags
zero
one
- number_
;; available process types
philosopher
- proctype
;; possible local states
state-1
state-6
state-3
state-4
state-5
- state
;; possible state transitions
forks--pid-Wfork
forks--pid-Rfork
forks-__-pidp1__4_-Rfork
forks-__-pidp1__4_-Wfork
- transition
)
(:init
(queue-next queue-1 qs-0 qs-0)
(is-not-max queue-1 zero)
(is-max queue-1 one)
;; process declaration: activeness, start state, type
(pending philosopher-0)
(at-process philosopher-0 state-1)
(is-a-process philosopher-0 philosopher)
(pending philosopher-1)
(at-process philosopher-1 state-1)
(is-a-process philosopher-1 philosopher)
(pending philosopher-2)
(at-process philosopher-2 state-1)
(is-a-process philosopher-2 philosopher)
(pending philosopher-3)
(at-process philosopher-3 state-1)
(is-a-process philosopher-3 philosopher)
;; numerics
(is-zero zero)
(dec one zero)
(inc zero one)
(is-not-zero one)
;; queue configuration
(is-a-queue forks-0- queue-1)
(queue-head forks-0- qs-0)
(queue-tail forks-0- qs-0)
(queue-head-msg forks-0- empty)
(queue-size forks-0- zero)
(settled forks-0-)
(is-a-queue forks-1- queue-1)
(queue-head forks-1- qs-0)
(queue-tail forks-1- qs-0)
(queue-head-msg forks-1- empty)
(queue-size forks-1- zero)
(settled forks-1-)
(is-a-queue forks-2- queue-1)
(queue-head forks-2- qs-0)
(queue-tail forks-2- qs-0)
(queue-head-msg forks-2- empty)
(queue-size forks-2- zero)
(settled forks-2-)
(is-a-queue forks-3- queue-1)
(queue-head forks-3- qs-0)
(queue-tail forks-3- qs-0)
(queue-head-msg forks-3- empty)
(queue-size forks-3- zero)
(settled forks-3-)
;; special operations
;; queue access operations
(writes philosopher-0 forks-0- forks--pid-Wfork)
(trans-msg forks--pid-Wfork fork)
(reads philosopher-0 forks-0- forks--pid-Rfork)
(trans-msg forks--pid-Rfork fork)
(reads philosopher-0 forks-1- forks-__-pidp1__4_-Rfork)
(trans-msg forks-__-pidp1__4_-Rfork fork)
(writes philosopher-0 forks-1- forks-__-pidp1__4_-Wfork)
(trans-msg forks-__-pidp1__4_-Wfork fork)
(writes philosopher-1 forks-1- forks--pid-Wfork)
(reads philosopher-1 forks-1- forks--pid-Rfork)
(reads philosopher-1 forks-2- forks-__-pidp1__4_-Rfork)
(writes philosopher-1 forks-2- forks-__-pidp1__4_-Wfork)
(writes philosopher-2 forks-2- forks--pid-Wfork)
(reads philosopher-2 forks-2- forks--pid-Rfork)
(reads philosopher-2 forks-3- forks-__-pidp1__4_-Rfork)
(writes philosopher-2 forks-3- forks-__-pidp1__4_-Wfork)
(writes philosopher-3 forks-3- forks--pid-Wfork)
(reads philosopher-3 forks-3- forks--pid-Rfork)
(reads philosopher-3 forks-0- forks-__-pidp1__4_-Rfork)
(writes philosopher-3 forks-0- forks-__-pidp1__4_-Wfork)
;; state transition function: state x trans -> state
(trans philosopher forks--pid-Wfork state-1 state-6)
(trans philosopher forks--pid-Rfork state-6 state-3)
(trans philosopher forks-__-pidp1__4_-Rfork state-3 state-4)
(trans philosopher forks--pid-Wfork state-4 state-5)
(trans philosopher forks-__-pidp1__4_-Wfork state-5 state-6)
)
(:goal
(and
;; deadlock, all local processes are blocked
(blocked philosopher-0)
(blocked philosopher-1)
(blocked philosopher-2)
(blocked philosopher-3)
)
)
)