-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathproject.schema.json
More file actions
519 lines (519 loc) · 20.4 KB
/
project.schema.json
File metadata and controls
519 lines (519 loc) · 20.4 KB
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
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://soar.eecs.umich.edu/VisualSoar/project_schema.json",
"title": "Project",
"type": "object",
"version": "9.7.0",
"description": "A Soar project description consisting of the working memory layout (datamap) and the file/operator layout. This is used by VisualSoar to manage the project.",
"properties": {
"version": {
"type": "string",
"description": "The version of the project format.",
"enum": ["6"]
},
"datamap": {
"$ref": "#/definitions/Datamap",
"description": "The datamap associated with the project."
},
"layout": {
"$ref": "#/definitions/LayoutNode",
"description": "The root of the project's operator/file layout tree."
}
},
"required": ["version", "datamap", "layout"],
"additionalProperties": false,
"definitions": {
"Datamap": {
"type": "object",
"description": "A datamap is a graph structure that specifies the shape and contents of an agent's working memory.",
"properties": {
"rootId": {
"type": "string",
"description": "The ID of the root vertex in the datamap."
},
"vertices": {
"type": "array",
"description": "A list of vertices in the datamap.",
"items": {
"$ref": "#/definitions/DMVertex"
}
}
},
"required": ["rootId", "vertices"],
"additionalProperties": false
},
"DMVertex": {
"type": "object",
"description": "A datamap vertex maps to a Soar working memory element (WME), and can be of various types. See ((https://soar.eecs.umich.edu/soar_manual/03_SyntaxOfSoarPrograms/#working-memory).",
"required": ["id", "type"],
"oneOf": [
{
"$ref": "#/definitions/SoarIdVertex"
},
{
"$ref": "#/definitions/EnumerationVertex"
},
{
"$ref": "#/definitions/IntegerRangeVertex"
},
{
"$ref": "#/definitions/FloatRangeVertex"
},
{
"$ref": "#/definitions/StringVertex"
},
{
"$ref": "#/definitions/ForeignVertex"
}
]
},
"SoarIdVertex": {
"type": "object",
"description": "A vertex that represents a Soar identifier (https://soar.eecs.umich.edu/soar_manual/03_SyntaxOfSoarPrograms/#symbols). This is the basis for all others vertex types.",
"properties": {
"id": {
"type": "string",
"description": "The unique identifier for the vertex. This is used within the project JSON to refer to this vertex. This is not the same as the Soar identifier, and it has no meaning outside of this JSON document. This may be a unique human-readable string, but VisualSoar generates UUIDs for this purpose."
},
"type": {
"type": "string",
"const": "SOAR_ID",
"description": "The type of the vertex."
},
"outEdges": {
"type": "array",
"items": {
"$ref": "#/definitions/OutEdge"
},
"description": "The outgoing edges from this vertex. These correspond to WME attributes (https://soar.eecs.umich.edu/soar_manual/03_SyntaxOfSoarPrograms/#working-memory). Null/missing is treated the same as an empty list."
}
},
"required": ["id", "type"],
"additionalProperties": false
},
"EnumerationVertex": {
"type": "object",
"description": "A vertex that represents an enumeration of possible string values.",
"properties": {
"id": {
"type": "string",
"description": "The unique identifier for the vertex. This is used within the project JSON to refer to this vertex. This is not the same as the Soar identifier, and it has no meaning outside of this JSON document. This may be a unique human-readable string, but VisualSoar generates UUIDs for this purpose."
},
"type": {
"type": "string",
"const": "ENUMERATION",
"description": "The type of the vertex."
},
"choices": {
"type": "array",
"items": {
"type": "string"
},
"description": "The list of choices for this enumeration vertex."
}
},
"required": ["id", "type", "choices"],
"additionalProperties": false
},
"IntegerRangeVertex": {
"type": "object",
"description": "A vertex that represents a range of integer values. Soar uses 64-bit integers, but VisualSoar currently uses 32-bit integers, meaning that the range of acceptable values is in [-2147483648, 2147483647].",
"properties": {
"id": {
"type": "string",
"description": "The unique identifier for the vertex. This is used within the project JSON to refer to this vertex. This is not the same as the Soar identifier, and it has no meaning outside of this JSON document. This may be a unique human-readable string, but VisualSoar generates UUIDs for this purpose."
},
"type": {
"type": "string",
"const": "INTEGER",
"description": "The type of the vertex."
},
"min": {
"type": "integer",
"description": "The minimum value for this integer range vertex. If null, there is no minimum value."
},
"max": {
"type": "integer",
"description": "The maximum value for this integer range vertex. If null, there is no maximum value."
}
},
"required": ["id", "type"],
"additionalProperties": false
},
"FloatRangeVertex": {
"type": "object",
"description": "A vertex that represents a range of float values. These are 64-bit doubles.",
"properties": {
"id": {
"type": "string",
"description": "The unique identifier for the vertex. This is used within the project JSON to refer to this vertex. This is not the same as the Soar identifier, and it has no meaning outside of this JSON document. This may be a unique human-readable string, but VisualSoar generates UUIDs for this purpose."
},
"type": {
"type": "string",
"const": "FLOAT",
"description": "The type of the vertex."
},
"min": {
"type": "number",
"description": "The minimum value for this float range vertex. If null, there is no minimum value."
},
"max": {
"type": "number",
"description": "The maximum value for this float range vertex. If null, there is no maximum value."
}
},
"required": ["id", "type"],
"additionalProperties": false
},
"StringVertex": {
"type": "object",
"description": "A vertex that represents a string value.",
"properties": {
"id": {
"type": "string",
"description": "The unique identifier for the vertex. This is used within the project JSON to refer to this vertex. This is not the same as the Soar identifier, and it has no meaning outside of this JSON document. This may be a unique human-readable string, but VisualSoar generates UUIDs for this purpose."
},
"type": {
"type": "string",
"const": "STRING",
"description": "The type of the vertex."
}
},
"required": ["id", "type"],
"additionalProperties": false
},
"ForeignVertex": {
"type": "object",
"description": "A vertex that is copied from a datamap in another project...",
"properties": {
"id": {
"type": "string",
"description": "The unique identifier for the vertex..."
},
"type": {
"type": "string",
"const": "FOREIGN",
"description": "The type of the vertex."
},
"foreignDMPath": {
"type": "string",
"description": "The path to the external datamap."
},
"importedVertex": {
"$ref": "#/definitions/DMVertex",
"description": "The imported vertex from the external datamap..."
}
},
"required": ["id", "type", "foreignDMPath", "importedVertex"],
"additionalProperties": false
},
"OutEdge": {
"type": "object",
"description": "An outgoing edge from a vertex in the datamap. This corresponds to a WME attribute (https://soar.eecs.umich.edu/soar_manual/03_SyntaxOfSoarPrograms/#working-memory).",
"properties": {
"name": {
"type": "string",
"description": "The name of the edge, corresponding to the WME attribute name."
},
"toId": {
"type": "string",
"description": "The ID of the vertex this edge points to, which will describe the attribute value."
},
"comment": {
"type": "string",
"description": "An optional comment describing this WME attribute."
},
"generated": {
"type": "boolean",
"description": "Indicates whether this edge was generated automatically by VisualSoar. This is marked graphically until the user approves it, at which point this value is set to false.",
"default": false
}
},
"required": ["name", "toId"]
},
"LayoutNode": {
"type": "object",
"description": "Each layout node is file or folder, and may also be linked to an operator. The project layout is a tree structure containing both the operator and file hierarchies, so that high-level operators have corresponding folders containing further folders corresponding to each sub-operator. Some of the descriptions here may be inaccurate; please file an issue if you find one: https://github.com/SoarGroup/VisualSoar/issues",
"properties": {
"type": {
"type": "string",
"description": "The type of the layout node. This specifies which more specific definition below applies to the layout node.",
"enum": [
"FILE",
"FILE_OPERATOR",
"FOLDER",
"HIGH_LEVEL_FILE_OPERATOR",
"HIGH_LEVEL_IMPASSE_OPERATOR",
"HIGH_LEVEL_OPERATOR",
"IMPASSE_OPERATOR",
"LINK",
"OPERATOR",
"OPERATOR_ROOT"
]
},
"id": {
"type": "string",
"description": "The unique identifier for the layout node. This is used within the project JSON to refer to this node and is not used in display. This may be a unique human-readable string, but VisualSoar generates UUIDs for this purpose."
},
"children": {
"type": "array",
"items": {
"$ref": "#/definitions/LayoutNode"
},
"description": "The child nodes of this layout node. This is null/missing if this node is a file or operator, and is an empty list if this node has no children."
}
},
"required": ["type", "id"],
"allOf": [
{
"if": {
"properties": {
"type": {
"const": "FILE"
}
}
},
"then": {
"$ref": "#/definitions/File"
}
},
{
"if": {
"properties": {
"type": {
"const": "FILE_OPERATOR"
}
}
},
"then": {
"$ref": "#/definitions/FileOperator"
}
},
{
"if": {
"properties": {
"type": {
"const": "FOLDER"
}
}
},
"then": {
"$ref": "#/definitions/Folder"
}
},
{
"if": {
"properties": {
"type": {
"const": "HIGH_LEVEL_FILE_OPERATOR"
}
}
},
"then": {
"$ref": "#/definitions/HighLevelFileOperator"
}
},
{
"if": {
"properties": {
"type": {
"const": "HIGH_LEVEL_OPERATOR"
}
}
},
"then": {
"$ref": "#/definitions/HighLevelOperator"
}
}
]
},
"File": {
"type": "object",
"description": "A file node in the layout. The associated file is assumed not to contain Soar source code, and VisualSoar does not attempt to parse it. This is used for files such as .txt, .png, etc.",
"properties": {
"name": {
"type": "string",
"description": "The display name for the file."
},
"file": {
"type": "string",
"description": "The file path for the file. This is relative to the parent node's directory."
}
},
"required": ["name", "file"]
},
"FileOperator": {
"type": "object",
"description": "A file node in the layout that contains Soar source code and is associated with an operator, but uses the datamap vertex of its operator parent instead of having its own. It supports sub-filing as well.",
"properties": {
"name": {
"type": "string",
"description": "The display name for the file."
},
"file": {
"type": "string",
"description": "The file path for the file. This is relative to the parent node's directory. This should normally be the same as the name property, but with a .soar prefix."
}
},
"required": ["name", "file"]
},
"Folder": {
"type": "object",
"description": "A folder node in the layout. This folder may contain other folders and files. It does not correspond to its own operator, but rather uses the datamap vertex of its operator parent instead.",
"properties": {
"name": {
"type": "string",
"description": "The display name for the folder"
},
"folder": {
"type": "string",
"description": "The directory that this folder is associated with, relative to the parent node's directory."
}
},
"required": ["name", "folder"]
},
"HighLevelFileOperator": {
"type": "object",
"description": "A high-level operator has sub-operators, and is associated with a folder that contains further files/folders corresponding to each sub-operator.",
"properties": {
"name": {
"type": "string",
"description": "The name of the operator"
},
"file": {
"type": "string",
"description": "The root file to source the operator from. This is relative to the folder. This should normally be the same as the operator name, but with a .soar prefix"
},
"dmId": {
"type": "string",
"description": "The ID of the datamap vertex that this operator is associated with. This is used to link the operator to the datamap."
},
"folder": {
"type": "string",
"description": "The directory that this operator is associated with, relative to the parent node's directory. This should normally be the same as the operator name."
}
},
"required": ["name", "file", "dmId", "folder"]
},
"HighLevelImpasseOperator": {
"type": "object",
"description": "An impasse operator is a special type of operator that is used to handle impasses in the Soar architecture. A high-level impasse operator has sub-operators, and is associated with a folder that contains further files/folders corresponding to each sub-operator. It is displayed differently in the UI from other high-level operators, and only has a limited number of possible naming options.",
"properties": {
"name": {
"enum": [
"Impasse__Operator_Tie",
"Impasse__Operator_Conflict",
"Impasse__Operator_Constraint-Failure",
"Impasse__State_No-Change"
],
"description": "The name of the operator."
},
"file": {
"type": "string",
"description": "The root file to source the operator from. This is relative to the folder. This should normally be the same as the operator name, but with a .soar prefix"
},
"dmId": {
"type": "string",
"description": "The ID of the datamap vertex that this operator is associated with. This is used to link the operator to the datamap."
},
"folder": {
"type": "string",
"description": "The directory that this operator is associated with, relative to the parent node's directory. This should normally be the same as the operator name."
}
},
"required": ["name", "file", "dmId", "folder"]
},
"HighLevelOperator": {
"type": "object",
"description": "A high-level operator has sub-operators, and is associated with a folder that contains further files/folders corresponding to each sub-operator.",
"properties": {
"name": {
"type": "string",
"description": "The name of the operator."
},
"file": {
"type": "string",
"description": "The root file to source the operator from. This is relative to the folder. This should normally be the same as the operator name, but with a .soar prefix."
},
"dmId": {
"type": "string",
"description": "The ID of the datamap vertex that this operator is associated with. This is used to link the operator to the datamap."
},
"folder": {
"type": "string",
"description": "The directory that this operator is associated with, relative to the parent node's directory. This should normally be the same as the operator name."
}
},
"required": ["name", "file", "dmId", "folder"]
},
"ImpasseOperator": {
"type": "object",
"description": "An impasse operator is a special type of operator that is used to handle impasses in the Soar architecture. It is displayed differently in the VisualSoar UI from other operators, and only has a limited number of possible naming options.",
"properties": {
"name": {
"description": "The name of the operator.",
"enum": [
"Impasse__Operator_Tie",
"Impasse__Operator_Conflict",
"Impasse__Operator_Constraint-Failure",
"Impasse__State_No-Change"
]
},
"file": {
"type": "string",
"description": "The file path for the file. This is relative to the parent node's directory. This should normally be the same as the operator name, but with a .soar prefix."
}
},
"required": ["name", "file"]
},
"Link": {
"type": "object",
"description": "Points to a layout node in a non-standard location. In previous versions of VisualSoar, links could be created via drag and drop, but this is no longer supported. This is here for backwards compatibility.",
"properties": {
"name": {
"type": "string",
"description": "The display name for the link."
},
"file": {
"type": "string",
"description": "The file path for the file. This is relative to the parent node's directory."
},
"linkedNodeId": {
"type": "string",
"description": "The ID of the node that this link points to."
}
},
"required": ["name", "file", "linkedNodeId"]
},
"Operator": {
"type": "object",
"description": "An operator node in the layout with an associated file. This is used for operators that are not high-level operators, and do not have sub-operators.",
"properties": {
"name": {
"type": "string",
"description": "The name of the operator."
},
"file": {
"type": "string",
"description": "The file path for the file. This is relative to the parent node's directory. This should normally be the same as the operator name, but with a .soar prefix."
}
},
"required": ["name", "file"]
},
"OperatorRoot": {
"type": "object",
"description": "The root node of the operator tree. This is not a real node in the layout, but is used to represent the root of the operator tree.",
"properties": {
"name": {
"type": "string",
"description": "The display name for the operator root. This is normally the same as the project name."
},
"folder": {
"type": "string",
"description": "The directory to use for the project root, relative to the location of this JSON document."
}
},
"required": ["name", "folder"]
}
}
}