aboutsummaryrefslogtreecommitdiff
path: root/html/Kit/dtd/pgip.dtd
blob: 8210331d3977e907510aaf22eb855fcc080fa887 (plain)
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
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
<?xml encoding="UTF-8"?>

<!--

RELAX NG Schema for PGIP, the Proof General Interface Protocol                   

Authors:  David Aspinall, LFCS, University of Edinburgh       
          Christoph Lueth, University of Bremen       

Version: pgip.dtd,v 1.27 2003/09/23 23:17:18 da Exp    

Status:  Experimental.                                           
For additional commentary, see the Proof General Kit white paper,
available from http://www.proofgeneral.org/kit

Advertised version: 1.0

-->

<!ENTITY % pgml SYSTEM "pgml.dtd">
%pgml;

<!-- include PGML grammar -->

<!-- ========== PGIP MESSAGES ========== -->

<!-- complete construction of the currently open theory -->

<!ENTITY % improperfilecmd "aborttheory|retracttheory|openfile|closefile
                            |abortfile|loadfile|changecwd">

<!ENTITY % properfilecmd "opentheory|closetheory">

<!-- a "literate" comment: text processed by prover, but no sidefx -->

<!ENTITY % improperproofcmd "undostep|abortgoal|forget|restoregoal">

<!ENTITY % properproofcmd "opengoal|proofstep|closegoal|postponegoal
                           |giveupgoal|comment|litcomment">

<!-- change prover's working directory (or load path) for files -->

<!ENTITY % fileinfomsg "informfileloaded|informfileretracted">

<!-- ========== GENERAL PROVER OUTPUT/RESPONSES ========== -->

<!ENTITY % proveroutput "ready|cleardisplay|normalresponse|errorresponse
                         |scriptinsert|metainforesponse|parseresult
                         |unparseresult">

<!--  ========== INTERFACE CONFIGURATION ========== -->

<!ENTITY % kitconfig "usespgip|usespgml|pgmlconfig|proverinfo|hasprefs
                      |prefval|guiconfig|setids|addids|delids|idvalue
                      |menuadd|menudel">

<!-- ========== THEORY/FILE HANDLING COMMANDS ========== -->

<!ENTITY % filecmd "%properfilecmd;|%improperfilecmd;">

<!-- ========= PROOF CONTEXT/ETC COMMANDS =========== -->

<!ENTITY % proofctxt "askids|showid|setid|parsescript|unparsecmds
                      |showproofstate|showctxt|searchtheorems
                      |setlinewidth|viewdoc">

<!-- data values -->

<!-- ========== PROOF CONTROL COMMANDS ========== -->

<!ENTITY % proofcmd "%properproofcmd;|%improperproofcmd;">

<!-- text is arg to "viewdoc" -->

<!-- ========== PROVER CONTROL ========== -->

<!ENTITY % provercontrol "proverinit|proverexit|startquiet|stopquiet
                          |pgmlsymbolson|pgmlsymbolsoff">

<!-- information messages concerning  -->

<!--  ========== PROVER CONFIGURATION ========== -->

<!ENTITY % proverconfig "askpgip|askpgml|askconfig|askprefs|setpref
                         |getpref">

<!-- issue a file command -->

<!ENTITY % kitmsg "%kitconfig;|%proveroutput;|%fileinfomsg;">

<!-- for a message sent TO proof general -->

<!ENTITY % provermsg "%proverconfig;|%provercontrol;|%proofcmd;
                      |%proofctxt;|%filecmd;">

<!--
pgips is the type of a log between
two components.
-->

<!ELEMENT pgip (%provermsg;|%kitmsg;)>

<!-- or an interface message -->

<!ELEMENT pgips (pgip)+>

<!-- sequence number of this message -->

<!ENTITY % pgip_class "pa|pg">

<!ATTLIST pgip
  origin CDATA #IMPLIED
  id CDATA #REQUIRED
  class (%pgip_class;) #REQUIRED
  refseq CDATA #IMPLIED
  refid CDATA #IMPLIED
  seq CDATA #REQUIRED>

<!-- please tell me this preference value -->

<!ENTITY % name_attr "
  name CDATA #REQUIRED">

<!-- identifiers must be XML tokens -->

<!ENTITY % prefcat_attr "
  prefcategory CDATA #REQUIRED">

<!--
e.g. "expert", "internal", etc.
could be used for tabs in dialog
-->

<!ELEMENT askpgip EMPTY>

<!ELEMENT askpgml EMPTY>

<!ELEMENT askconfig EMPTY>

<!ELEMENT askprefs EMPTY>
<!ATTLIST askprefs
  prefcategory CDATA #IMPLIED>

<!ELEMENT setpref (#PCDATA)>
<!ATTLIST setpref
  %name_attr;
  prefcategory CDATA #IMPLIED>

<!ELEMENT getpref EMPTY>
<!ATTLIST getpref
  %name_attr;
  prefcategory CDATA #IMPLIED>

<!-- remove a menu entry -->

<!-- version reporting -->

<!ENTITY % version_attr "
  version CDATA #REQUIRED">

<!ELEMENT usespgml EMPTY>
<!ATTLIST usespgml
  %version_attr;>

<!ELEMENT usespgip EMPTY>
<!ATTLIST usespgip
  %version_attr;>

<!-- PGML configuration -->

<!ELEMENT pgmlconfig (%pgmlconfigure;)+>

<!--
Types for config settings: corresponding data values should conform
to representation for corresponding XML Schema 1.0 Datatypes.
(This representation is verbose but helps for error checking later)
-->

<!ENTITY % pgiptype "pgipbool|pgipint|pgipstring|pgipchoice">

<!ELEMENT pgipbool EMPTY>

<!ELEMENT pgipint EMPTY>
<!ATTLIST pgipint
  min CDATA #IMPLIED
  max CDATA #IMPLIED>

<!ENTITY % min_attr "
  min CDATA #REQUIRED">

<!ENTITY % max_attr "
  max CDATA #REQUIRED">

<!ELEMENT pgipstring EMPTY>

<!ELEMENT pgipchoice (pgipchoiceitem)+>

<!ELEMENT pgipchoiceitem (#PCDATA)>

<!ELEMENT icon (#PCDATA)>

<!-- image data for an icon -->

<!-- preferences -->

<!ENTITY % default_attr "
  default CDATA #REQUIRED">

<!ENTITY % descr_attr "
  descr CDATA #REQUIRED">

<!--
icons for preference recommended size: 32x32 
top level preferences: may be used in dialog for preference setting
object preferences: may be used as an "emblem" to decorate 
object icon (boolean preferences with default false, only)
-->

<!ELEMENT haspref (icon?,(%pgiptype;))>
<!ATTLIST haspref
  %name_attr;
  descr CDATA #IMPLIED
  default CDATA #IMPLIED>

<!ELEMENT hasprefs (haspref)*>
<!ATTLIST hasprefs
  prefcategory CDATA #IMPLIED>

<!ELEMENT prefval (#PCDATA)>
<!ATTLIST prefval
  %name_attr;>

<!-- menu items (incomplete) -->

<!ENTITY % path_attr "
  path CDATA #REQUIRED">

<!ELEMENT menuadd (#PCDATA)>
<!ATTLIST menuadd
  path CDATA #IMPLIED
  name CDATA #IMPLIED>

<!ELEMENT menudel (#PCDATA)>
<!ATTLIST menudel
  path CDATA #IMPLIED
  name CDATA #IMPLIED>

<!--
GUI configuration information: objects, types, and operations
NB: the following object types have a fixed interpretation 
in PGIP:  "comment", "thm", "theory", "file" 
-->

<!ELEMENT guiconfig (objtype*,opn*)>

<!ELEMENT objtype (icon?,hasprefs?,contains*)>
<!ATTLIST objtype
  %name_attr;
  descr CDATA #IMPLIED>

<!ENTITY % objtype_attr "
  objtype CDATA #REQUIRED">

<!-- the name of an objtype -->

<!ELEMENT contains EMPTY>
<!ATTLIST contains
  %objtype_attr;>

<!-- source types: a space separated list -->

<!ENTITY % optrg "optrg?">

<!--  -->

<!ELEMENT opn (inputform?,opsrc,(%optrg;),opcmd)>
<!ATTLIST opn
  %name_attr;>

<!ELEMENT optrg (#PCDATA)>

<!ELEMENT opsrc (#PCDATA)>

<!-- single target type, empty for proofstate -->

<!ELEMENT opcmd (#PCDATA)>

<!-- prover command, with printf-style "%1"-args -->

<!-- interactive operations - require some input -->

<!ELEMENT inputform (field)+>

<!--
a field has a PGIP config type (int, string, bool, choice(c1...cn))
and a name; under that name, it will be substituted into the command
Ex. field name=number  opcmd="rtac %1 %number"
-->

<!ELEMENT field ((%pgiptype;),prompt)>
<!ATTLIST field
  %name_attr;>

<!ELEMENT prompt (#PCDATA)>

<!--
identifier tables: these list known items of particular objtype.
Might be used for completion or menu selection, and inspection.
May have a nested structure (but objtypes do not).
-->

<!ELEMENT setids (idtable)>

<!-- (with an empty idtable, clear table) -->

<!ELEMENT addids (idtable)>

<!ELEMENT delids (idtable)>

<!ENTITY % displaytext "(#PCDATA|pgml)*">

<!-- give value of some identifier (response to showid) -->

<!ELEMENT idvalue %displaytext;>
<!ATTLIST idvalue
  %name_attr;
  %objtype_attr;>

<!ELEMENT idtable (identifier|idtable)*>
<!ATTLIST idtable
  %objtype_attr;>

<!ELEMENT identifier (#PCDATA)>

<!--
prover information: 
name, description, version, homepage, 
welcome message, docs available
-->

<!ELEMENT proverinfo (welcomemsg?,icon?,helpdoc*)>
<!ATTLIST proverinfo
  %name_attr;
  descr CDATA #IMPLIED
  version CDATA #IMPLIED
  url CDATA #IMPLIED>

<!ELEMENT welcomemsg (#PCDATA)>

<!ENTITY % url_attr "
  url CDATA #REQUIRED">

<!-- FIXME: schema for URL? -->

<!--
helpdoc: advertise availability of some documentation, given a canonical
name, textual description, and URL or viewdoc argument.

-->

<!ELEMENT helpdoc (#PCDATA)>
<!ATTLIST helpdoc
  %name_attr;
  %descr_attr;
  url CDATA #IMPLIED>

<!-- deactivate use of symbols in PGML output -->

<!ELEMENT proverinit EMPTY>

<!ELEMENT proverexit EMPTY>

<!ELEMENT startquiet EMPTY>

<!ELEMENT stopquiet EMPTY>

<!ELEMENT pgmlsymbolson EMPTY>

<!ELEMENT pgmlsymbolsoff EMPTY>

<!-- result of a <unparsecmds> request (see later) -->

<!ELEMENT ready EMPTY>

<!ENTITY % displayarea "message|display">

<!-- the main display area (goals buffer) -->

<!ELEMENT cleardisplay EMPTY>
<!ATTLIST cleardisplay
  area (%displayarea;|all) #REQUIRED>

<!-- grammar for displayed text  -->

<!ELEMENT normalresponse %displaytext;>
<!ATTLIST normalresponse
  area (%displayarea;) #REQUIRED
  category CDATA #IMPLIED
  urgent (y) #IMPLIED>

<!ENTITY % fatality "nonfatal|fatal|panic">

<!-- degree of errors -->

<!ELEMENT errorresponse %displaytext;>
<!ATTLIST errorresponse
  fatality (%fatality;) #REQUIRED
  location CDATA #IMPLIED
  locationline CDATA #IMPLIED
  locationcolumn CDATA #IMPLIED>

<!ELEMENT scriptinsert (#PCDATA)>

<!-- metainformation is an extensible place to put system-specific information -->

<!ELEMENT value (#PCDATA)>
<!ATTLIST value
  name CDATA #IMPLIED>

<!-- generic value holder -->

<!ELEMENT metainforesponse (value)*>
<!ATTLIST metainforesponse
  infotype CDATA #REQUIRED>

<!-- re-open previously postponed proof, outdating dependent theorems -->

<!ENTITY % thmname_attr "
  thmname CDATA #REQUIRED">

<!-- theorem names -->

<!ENTITY % aname_attr "
  aname CDATA #REQUIRED">

<!-- anchors in proof text -->

<!ELEMENT opengoal (#PCDATA)>
<!ATTLIST opengoal
  %thmname_attr;>

<!-- text is theorem to be proved -->

<!ELEMENT proofstep (#PCDATA)>
<!ATTLIST proofstep
  aname CDATA #IMPLIED>

<!-- text is proof command -->

<!ELEMENT undostep EMPTY>

<!ELEMENT closegoal EMPTY>
<!ATTLIST closegoal
  %thmname_attr;>

<!ELEMENT abortgoal EMPTY>
<!ATTLIST abortgoal
  %thmname_attr;>

<!ELEMENT giveupgoal EMPTY>
<!ATTLIST giveupgoal
  %thmname_attr;>

<!ELEMENT postponegoal EMPTY>
<!ATTLIST postponegoal
  %thmname_attr;>

<!ELEMENT forget EMPTY>
<!ATTLIST forget
  thyname CDATA #IMPLIED
  aname CDATA #IMPLIED>

<!ELEMENT restoregoal EMPTY>
<!ATTLIST restoregoal
  %thmname_attr;>

<!ELEMENT comment (#PCDATA)>

<!ELEMENT litcomment (#PCDATA)>

<!-- request some on-line help (prover-specific arg) -->

<!ENTITY % thyname_attr "
  thyname CDATA #REQUIRED">

<!-- theory name -->

<!ELEMENT askids EMPTY>
<!ATTLIST askids
  thyname CDATA #IMPLIED
  %objtype_attr;>

<!ELEMENT showid EMPTY>
<!ATTLIST showid
  thyname CDATA #IMPLIED
  %objtype_attr;
  %name_attr;>

<!ELEMENT setid (setpref*,obvalue)>
<!ATTLIST setid
  %name_attr;
  %objtype_attr;>

<!ELEMENT obvalue (#PCDATA)>

<!-- text constructed with opcmds -->

<!--
NB: parse/unparsing needs only be supported for "proper" proof commands,
which may appear in proof texts.
-->

<!ENTITY % properscriptcmd "%properproofcmd;|%properfilecmd;|setid">

<!ELEMENT parsescript (#PCDATA)>

<!ELEMENT parseresult (%properscriptcmd;)*>

<!ELEMENT unparsecmds (%properscriptcmd;)*>

<!ELEMENT unparseresult (#PCDATA)>

<!ELEMENT showproofstate EMPTY>

<!ELEMENT showctxt EMPTY>

<!ELEMENT searchtheorems (#PCDATA)>

<!ELEMENT setlinewidth (#PCDATA)>

<!ELEMENT viewdoc (#PCDATA)>

<!-- prover informs interface a particular file is outdated -->

<!--
Below, url_attr will often be a file URL.  
We assume for now that the prover and interface are running on same
filesystem
-->

<!ATTLIST changecwd
  dir CDATA #REQUIRED>

<!-- Unix directory name  -->

<!ELEMENT opentheory (#PCDATA)>
<!ATTLIST opentheory
  %thyname_attr;>

<!ELEMENT closetheory EMPTY>
<!ATTLIST closetheory
  %thyname_attr;>

<!ELEMENT aborttheory EMPTY>
<!ATTLIST aborttheory
  %thyname_attr;>

<!ELEMENT retracttheory EMPTY>
<!ATTLIST retracttheory
  %thyname_attr;>

<!--
FIXME: maybe add a command to ask prover for the file corresponding
to some theory (prover searches it's search path / cwd).
-->

<!ELEMENT loadfile EMPTY>
<!ATTLIST loadfile
  %url_attr;>

<!ELEMENT openfile EMPTY>
<!ATTLIST openfile
  %url_attr;>

<!ELEMENT closefile EMPTY>
<!ATTLIST closefile
  %url_attr;>

<!ELEMENT abortfile EMPTY>
<!ATTLIST abortfile
  %url_attr;>

<!ELEMENT changecwd EMPTY>

<!ELEMENT informfileloaded EMPTY>
<!ATTLIST informfileloaded
  %thyname_attr;
  %url_attr;>

<!ELEMENT informfileretracted EMPTY>
<!ATTLIST informfileretracted
  %thyname_attr;
  %url_attr;>