-
Notifications
You must be signed in to change notification settings - Fork 1
/
pnet.xsd
357 lines (317 loc) · 15 KB
/
pnet.xsd
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
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright (C) 2023 Fraunhofer ITWM -->
<!-- SPDX-License-Identifier: GPL-3.0-or-later -->
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:annotation>
<xsd:documentation>
petri nets with
typed ports
typed places
typed tokens
user defined types
hierarchical structure
hierarchical properties
</xsd:documentation>
</xsd:annotation>
<xsd:element name="defun" type="function_type"/>
<xsd:element name="props" type="property_map_list_type"/>
<xsd:element name="structs" type="struct_list_type"/>
<xsd:element name="template" type="template_type"/>
<xsd:complexType name="transition_include_type">
<xsd:attribute name="href" type="xsd:anyURI" use="required"/>
</xsd:complexType>
<xsd:complexType name="struct_include_type">
<xsd:attribute name="href" type="xsd:anyURI" use="required"/>
</xsd:complexType>
<xsd:complexType name="function_include_type">
<xsd:attribute name="href" type="xsd:anyURI" use="required"/>
</xsd:complexType>
<xsd:complexType name="properties_include_type">
<xsd:attribute name="href" type="xsd:anyURI" use="required"/>
</xsd:complexType>
<xsd:complexType name="cinclude_type">
<xsd:attribute name="href" type="xsd:anyURI" use="required"/>
</xsd:complexType>
<xsd:complexType name="flag_type">
<xsd:attribute name="flag" type="xsd:string" use="required"/>
</xsd:complexType>
<xsd:complexType name="property_type">
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="key" type="xsd:NCName" use="required"/>
<xsd:attribute name="value" type="xsd:string" use="optional"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="property_map_type">
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element name="property" type="property_type"/>
<xsd:element name="properties" type="property_map_type"/>
<xsd:element name="include-properties" type="properties_include_type"/>
</xsd:choice>
<xsd:attribute name="name" type="xsd:NCName" use="required"/>
</xsd:complexType>
<xsd:complexType name="property_map_list_type">
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element name="properties" type="property_map_type"/>
<xsd:element name="include-properties" type="properties_include_type"/>
</xsd:choice>
</xsd:complexType>
<xsd:complexType name="struct_list_type">
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element name="struct" type="struct_type"/>
<xsd:element name="include-structs" type="struct_include_type"/>
</xsd:choice>
</xsd:complexType>
<xsd:complexType name="struct_field_type">
<xsd:attribute name="name" type="xsd:NCName" use="required"/>
<xsd:attribute name="type" type="xsd:string" use="required"/>
</xsd:complexType>
<xsd:complexType name="struct_type">
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element name="field" type="struct_field_type"/>
<xsd:element name="struct" type="struct_type"/>
</xsd:choice>
<xsd:attribute name="name" type="xsd:NCName" use="required"/>
</xsd:complexType>
<!-- \todo make simple content to avoid
<token><value>0</value></token> and allow just <token>0</token>
-->
<xsd:complexType name="token_type">
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element name="value" type="xsd:string"/>
</xsd:choice>
</xsd:complexType>
<xsd:complexType name="mod_type">
<xsd:sequence>
<xsd:element minOccurs="0" maxOccurs="1" name="eureka-group" type="xsd:string"/>
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element name="cinclude" type="cinclude_type"/>
<xsd:element name="ld" type="flag_type"/>
<xsd:element name="cxx" type="flag_type"/>
</xsd:choice>
<xsd:element minOccurs="0" maxOccurs="1" name="code" type="xsd:string"/>
</xsd:sequence>
<xsd:attribute name="name" type="xsd:NCName" use="required"/>
<xsd:attribute name="function" type="xsd:string" use="required"/>
<xsd:attribute name="eureka-group" type="xsd:string" use="optional"/>
<xsd:attribute name="pass_context" type="xsd:boolean"
use="optional" default="false"/>
<xsd:attribute name="require_function_unloads_without_rest"
type="xsd:boolean" use="optional" default="true"/>
<xsd:attribute name="require_module_unloads_without_rest"
type="xsd:boolean" use="optional" default="true"/>
</xsd:complexType>
<xsd:complexType name="mod_type_with_target">
<xsd:complexContent>
<xsd:extension base="mod_type">
<xsd:attribute name="target" type="xsd:string" use="required"/>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="type_map_type">
<xsd:attribute name="replace" type="xsd:NCName" use="required"/>
<xsd:attribute name="with" type="xsd:string" use="required"/>
</xsd:complexType>
<xsd:complexType name="type_get_type">
<xsd:attribute name="name" type="xsd:NCName" use="required"/>
</xsd:complexType>
<xsd:complexType name="template_use_type">
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element name="type-map" type="type_map_type"/>
<xsd:element name="type-get" type="type_get_type"/>
</xsd:choice>
<xsd:attribute name="name" type="xsd:NCName" use="required"/>
<xsd:attribute name="use" type="xsd:string" use="required"/>
</xsd:complexType>
<xsd:complexType name="use_type">
<xsd:attribute name="name" type="xsd:NCName" use="required"/>
</xsd:complexType>
<xsd:complexType name="require_type">
<xsd:attribute name="key" type="xsd:string" use="required"/>
</xsd:complexType>
<xsd:complexType name="template_parameter_type">
<xsd:attribute name="type" type="xsd:NCName" use="required"/>
</xsd:complexType>
<xsd:complexType name="place_type">
<xsd:sequence>
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element name="properties" type="property_map_type"/>
<xsd:element name="include-properties" type="properties_include_type"/>
</xsd:choice>
<xsd:element minOccurs="0" maxOccurs="unbounded" name="token" type="token_type"/>
</xsd:sequence>
<xsd:attribute name="name" type="xsd:NCName" use="required"/>
<xsd:attribute name="type" type="xsd:string" use="required"/>
<xsd:attribute name="virtual" type="xsd:boolean" use="optional"
default="false"/>
<xsd:attribute name="put_token" type="xsd:boolean" use="optional"
default="false"/>
</xsd:complexType>
<xsd:complexType name="port_type">
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element name="properties" type="property_map_type"/>
<xsd:element name="include-properties" type="properties_include_type"/>
</xsd:choice>
<xsd:attribute name="name" type="xsd:NCName" use="required"/>
<xsd:attribute name="type" type="xsd:string" use="required"/>
<xsd:attribute name="place" type="xsd:string" use="optional"/>
</xsd:complexType>
<xsd:complexType name="preferences_type">
<xsd:choice minOccurs="1" maxOccurs="unbounded">
<xsd:element name="target" type="xsd:string"/>
</xsd:choice>
</xsd:complexType>
<xsd:complexType name="memory_buffer_type">
<xsd:sequence>
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element name="properties" type="property_map_type"/>
<xsd:element name="include-properties" type="properties_include_type"/>
</xsd:choice>
<xsd:element minOccurs="1" maxOccurs="1" name="size" type="xsd:string"/>
<xsd:element minOccurs="0" maxOccurs="1" name="alignment" type="xsd:string"/>
</xsd:sequence>
<xsd:attribute name="name" type="xsd:NCName" use="required"/>
<xsd:attribute name="read-only" type="xsd:boolean" use="optional"
default="false"/>
</xsd:complexType>
<xsd:complexType name="memory_transfer_get_type">
<xsd:sequence>
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element name="properties" type="property_map_type"/>
<xsd:element name="include-properties" type="properties_include_type"/>
</xsd:choice>
<xsd:element minOccurs="1" maxOccurs="1" name="global" type="xsd:string"/>
<xsd:element minOccurs="1" maxOccurs="1" name="local" type="xsd:string"/>
</xsd:sequence>
<xsd:attribute name="allow-empty-ranges" type="xsd:boolean"
use="optional" default="false"/>
</xsd:complexType>
<xsd:complexType name="memory_transfer_put_type">
<xsd:sequence>
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element name="properties" type="property_map_type"/>
<xsd:element name="include-properties" type="properties_include_type"/>
</xsd:choice>
<xsd:element minOccurs="1" maxOccurs="1" name="global" type="xsd:string"/>
<xsd:element minOccurs="1" maxOccurs="1" name="local" type="xsd:string"/>
</xsd:sequence>
<xsd:attribute name="not-modified-in-module-call"
type="xsd:boolean" use="optional" default="false"/>
<xsd:attribute name="allow-empty-ranges" type="xsd:boolean"
use="optional" default="false"/>
</xsd:complexType>
<xsd:complexType name="connect_type">
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element name="properties" type="property_map_type"/>
<xsd:element name="include-properties" type="properties_include_type"/>
</xsd:choice>
<xsd:attribute name="place" type="xsd:string" use="required"/>
<xsd:attribute name="port" type="xsd:NCName" use="required"/>
</xsd:complexType>
<xsd:complexType name="connect_response_type">
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element name="properties" type="property_map_type"/>
<xsd:element name="include-properties" type="properties_include_type"/>
</xsd:choice>
<xsd:attribute name="to" type="xsd:NCName" use="required"/>
<xsd:attribute name="port" type="xsd:NCName" use="required"/>
</xsd:complexType>
<xsd:complexType name="connect_eureka_type">
<xsd:attribute name="port" type="xsd:NCName" use="required"/>
</xsd:complexType>
<xsd:complexType name="place_map_type">
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element name="properties" type="property_map_type"/>
<xsd:element name="include-properties" type="properties_include_type"/>
</xsd:choice>
<xsd:attribute name="virtual" type="xsd:string" use="required"/>
<xsd:attribute name="real" type="xsd:NCName" use="required"/>
</xsd:complexType>
<xsd:complexType name="template_type">
<xsd:sequence>
<xsd:element minOccurs="0" maxOccurs="unbounded" name="template-parameter" type="template_parameter_type"/>
<xsd:element minOccurs="1" maxOccurs="1" name="defun" type="function_type"/>
</xsd:sequence>
<xsd:attribute name="name" type="xsd:ID" use="optional"/>
</xsd:complexType>
<xsd:complexType name="modules_type">
<xsd:sequence>
<xsd:element name="preferences" type="preferences_type"/>
<xsd:element minOccurs="1" maxOccurs="unbounded" name="module" type="mod_type_with_target"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="function_type">
<xsd:sequence>
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element name="properties" type="property_map_type"/>
<xsd:element name="include-properties" type="properties_include_type"/>
<xsd:element name="require" type="require_type"/>
<xsd:element name="struct" type="struct_type"/>
<xsd:element name="include-structs" type="struct_include_type"/>
</xsd:choice>
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element name="in" type="port_type"/>
<xsd:element name="out" type="port_type"/>
<xsd:element name="inout" type="port_type"/>
<xsd:element name="tunnel" type="port_type"/>
</xsd:choice>
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element name="memory-buffer" type="memory_buffer_type"/>
<xsd:element name="memory-get" type="memory_transfer_get_type"/>
<xsd:element name="memory-put" type="memory_transfer_put_type"/>
<xsd:element name="memory-getput" type="memory_transfer_put_type"/>
</xsd:choice>
<xsd:choice>
<xsd:element minOccurs="1" maxOccurs="1" name="expression" type="xsd:string"/>
<xsd:element minOccurs="1" maxOccurs="1" name="module" type="mod_type"/>
<xsd:element name="modules" type="modules_type"/>
<xsd:element minOccurs="1" maxOccurs="1" name="net" type="net_type"/>
</xsd:choice>
<xsd:element minOccurs="0" maxOccurs="unbounded" name="condition" type="xsd:string"/>
</xsd:sequence>
<xsd:attribute name="name" type="xsd:NCName" use="optional"/>
</xsd:complexType>
<xsd:complexType name="transition_type">
<xsd:sequence>
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element name="properties" type="property_map_type"/>
<xsd:element name="include-properties" type="properties_include_type"/>
<xsd:element name="require" type="require_type"/>
</xsd:choice>
<xsd:choice minOccurs="1" maxOccurs="1">
<xsd:element name="defun" type="function_type"/>
<xsd:element name="include-function" type="transition_include_type"/>
<xsd:element name="use" type="use_type"/>
</xsd:choice>
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element name="connect-in" type="connect_type"/>
<xsd:element name="connect-out" type="connect_type"/>
<xsd:element name="connect-out-many" type="connect_type"/>
<xsd:element name="connect-inout" type="connect_type"/>
<xsd:element name="connect-read" type="connect_type"/>
<xsd:element name="connect-response" type="connect_response_type"/>
<xsd:element name="connect-eureka" type="connect_eureka_type"/>
<xsd:element name="place-map" type="place_map_type"/>
<xsd:element name="condition" type="xsd:string"/>
</xsd:choice>
</xsd:sequence>
<xsd:attribute name="name" type="xsd:NCName" use="required"/>
<xsd:attribute name="priority" type="xsd:nonNegativeInteger" use="optional"/>
<xsd:attribute name="inline" type="xsd:boolean" use="optional"
default="false"/>
</xsd:complexType>
<xsd:complexType name="net_type">
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element name="include-properties" type="properties_include_type"/>
<xsd:element name="include-structs" type="struct_include_type"/>
<xsd:element name="include-template" type="function_include_type"/>
<xsd:element name="place" type="place_type"/>
<xsd:element name="properties" type="property_map_type"/>
<xsd:element name="specialize" type="template_use_type"/>
<xsd:element name="struct" type="struct_type"/>
<xsd:element name="template" type="template_type"/>
<xsd:element name="transition" type="transition_type"/>
</xsd:choice>
</xsd:complexType>
</xsd:schema>