lib/ProofGeneral/pgip.rnc
author haftmann
Wed, 03 Nov 2010 12:15:47 +0100
changeset 40347 429bf4388b2f
parent 33686 8e33ca8832b1
permissions -rw-r--r--
added code lemmas for stable parametrized quicksort
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
     1
# 
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
     2
# RELAX NG Schema for PGIP, the Proof General Interface Protocol                   
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
     3
# 
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
     4
# Authors:  David Aspinall, LFCS, University of Edinburgh       
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
     5
#           Christoph Lüth, University of Bremen       
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
     6
#
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
     7
# Status:   Prototype.
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
     8
#
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
     9
# For additional commentary, see accompanying commentary document available at
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
    10
# http://proofgeneral.inf.ed.ac.uk/Kit/docs/commentary.pdf
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
    11
#
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
    12
# Advertised version: 2.0
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
    13
# 
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
    14
# Contents
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
    15
# ========
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
    16
#
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
    17
#  0. Prelude
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
    18
#  1. Top-level 
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
    19
#  2. Component Control messages
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
    20
#  3. Display Commands
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
    21
#  4. Prover Configuration
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
    22
#  5. Interface Configuration
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
    23
#  6. Prover Control
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
    24
#  7. Proof script markup and proof control
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
    25
#
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
    26
#
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
    27
# ===============================================================================
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
    28
#
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
    29
# Note on datatypes.  (see e.g. http://books.xmlschemata.org/relaxng):
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
    30
#
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
    31
#  token  : any string possibly with spaces, but spaces are normalised/collapsed
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
    32
#	    (i.e. tokenised).  Same as XML Schema xs:token
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
    33
#  string : any string, whitespaces preserved.  Same as XML Schema xs:string
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
    34
#	    (NB: attributes are normalised by XML 1.0 parsers so
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
    35
#	     spaces/newlines must be quoted)
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
    36
#  text	  : text nodes/mixed content (whitespace may be lost in mixed content)
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
    37
#
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
    38
# So: attributes should usually be tokens or more restrictive; (sometimes: strings for printing)
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
    39
#     element contents may be string (preserving whitespace), token (tokenising), 
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
    40
#       or text (which may contain further nodes).
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
    41
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
    42
# ==============================================================================
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
    43
# 0. Prelude
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
    44
# ==============================================================================
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
    45
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
    46
include "pgml.rnc"                           # include PGML grammar
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
    47
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
    48
name_attr = attribute name { token }         # names are user-level textual identifiers (space-collapsed)
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
    49
thyname_attr = attribute thyname { token }   # names for theories (special case of name)
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
    50
thmname_attr = attribute thmname { token }   # names for theorems (special case of name)
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
    51
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
    52
datetime_attr = 
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
    53
   attribute datetime { xsd:dateTime }       # CCYY-MM-DDHH:MM:SS plus timezone info
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
    54
url_attr  = attribute url { xsd:anyURI }     # URLs  (often as "file:///localfilename.extn")
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
    55
dir_attr  = attribute dir { string }         # Unix-style directory name (no final slash)
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
    56
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
    57
systemdata_attr  = 
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
    58
            attribute systemdata { token }?   # system-specific data (useful for "stateless" RPC)
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
    59
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
    60
objname = token	     # an identifier name (convention: any characters except semi-colon)
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
    61
objnames = token     # sequence of names in an attribute: semi-colon separated
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
    62
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
    63
#objnames = string                            # A sequence of objnames
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
    64
#termobjname  = string { pattern = "[^;]+;" }  # unfortunately these declarations don't 
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
    65
#objnames = objname | (termobjname, objname)
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
    66
#objnames = objname+                               #  work with the RNC->DTD tool trang
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
    67
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
    68
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
    69
# ==============================================================================
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
    70
# 1. Top-level Messages/documents
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
    71
# ==============================================================================
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
    72
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
    73
start = pgip                                 # Single message
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
    74
      | pgips                                # A log of messages between components
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
    75
      | displayconfig                        # displayconfig as a standalone element
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
    76
      | pgipconfig                           # pgipconfig as a standalone element
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
    77
      | pgipdoc                              # A proof script document 
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
    78
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
    79
pgip = element pgip {                        #  A PGIP packet contains:
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
    80
   pgip_attrs,                               #   - attributes with header information;
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
    81
   (toprovermsg | todisplaymsg |             #   - a message with one of four channel types
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
    82
    fromprovermsg | fromdisplaymsg 
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
    83
   | internalmsg ) 
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
    84
  }
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
    85
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
    86
pgips = element pgips { pgip+ }
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
    87
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
    88
pgip_attrs =
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
    89
 attribute tag { token }?,                  # message tag, e.g. name of origin component (diagnostic)
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
    90
 attribute id { token },                    # (unique) session id of this component 
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
    91
 attribute destid { token }?,               # session id of destination component
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
    92
 attribute class { pgip_class },            # general categorization of message
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
    93
 attribute refid { token }?,                # component id this message responds to (usually destid)
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
    94
 attribute refseq { xsd:positiveInteger }?, # message sequence this message responds to
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
    95
 attribute seq { xsd:positiveInteger }      # sequence number of this message
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
    96
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
    97
pgip_class = "pg"      # message sent TO proof general broker (e.g. FROM proof assistant).
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
    98
           | "pa"      # message sent TO the proof assistant/other component
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
    99
           | "pd"      # message sent TO display/front-end components
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   100
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   101
toprovermsg =          # Messages sent to the prover (class "pa"):
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   102
   proverconfig        #   query Prover configuration, triggering interface configuration
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   103
 | provercontrol       #   control some aspect of Prover
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   104
 | improperproofcmd    #   issue a proof command 
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   105
 | improperfilecmd     #   issue a file command
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   106
 | properproofcmd      #   [ NB: not strictly needed: input PGIP processing not expected ]
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   107
 | properfilecmd       #   [ NB: not strictly needed: input PGIP processing not expected ]
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   108
 | proofctxt           #   issue a context command
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   109
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   110
fromprovermsg =        # Messages from the prover to PG (class "pg"):
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   111
   kitconfig           #   messages to configure the interface 
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   112
 | proveroutput        #   output messages from the prover, usually display in interface
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   113
 | fileinfomsg         #   information messages concerning file-system access / prover state
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   114
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   115
todisplaymsg =         # Messages sent to display components (class "pd"):
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   116
   brokermsg           #   status reports from broker
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   117
 | dispmsg             #   display commands
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   118
                       #   - Further, all fromprovermsg can be relayed to display
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   119
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   120
fromdisplaymsg =       # Messages sent from display components (class "pg"):
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   121
   dispcmd             #   display messages 
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   122
 | brokercontrol       #   messages controlling broker & prover processes
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   123
		       #   - Further, all toprovermsg to be relayed to prover
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   124
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   125
# ===========================================================================
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   126
# 2. Component Control
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   127
# ===========================================================================
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   128
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   129
#
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   130
# Idea:  - broker knows how to manage some components (inc provers) as child processes,
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   131
#          communicate via pipes.  Configured by a fixed PGIP config file read on startup.
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   132
#        - other components may connect to running broker
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   133
#
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   134
# TODO: - describe startup protocol for component connecting to to running broker dynamically.
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   135
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   136
# This is the element contained in the configuration file read by the 
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   137
# broker on startup.
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   138
pgipconfig = element pgipconfig { componentspec* }
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   139
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   140
componentspec = 
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   141
   element componentspec {
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   142
      componentid_attr,         # Unique identifier for component class
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   143
      componentname_attr,       # Textual name of component class
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   144
      componenttype,            # Type of component: prover, display, auxiliary
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   145
      startupattrs,		# Describing startup behaviour
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   146
      systemattrs,              # System attributes for component
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   147
      componentconnect          # How to connect to component
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   148
   }
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   149
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   150
componentid_attr   = attribute componentid   { token }
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   151
componentname_attr = attribute componentname { token }
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   152
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   153
componenttype = element componenttype {
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   154
     provercomponent 
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   155
   | displaycomponent 
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   156
 # | filehandlercomponent 
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   157
   | parsercomponent 
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   158
   | othercomponent }
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   159
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   160
provercomponent  = element provercomponent { empty }
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   161
displaycomponent = element displaycomponent { attribute active { xsd:boolean}? }
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   162
parsercomponent  = element parsercomponent  { componentid_attr }
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   163
othercomponent   = element othercomponent { empty }
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   164
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   165
componentconnect =
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   166
   componentsubprocess | componentsocket | connectbyproxy
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   167
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   168
componentsubprocess = 
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   169
   element syscommand { string }
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   170
componentsocket = 
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   171
   (element host { token }, element port { xsd:positiveInteger })
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   172
connectbyproxy = 
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   173
   (element proxy { attribute host { token }    # Host to connect to
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   174
		  , attribute connect { 
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   175
                           "rsh" | "ssh" # Launch proxy via RSH or SSH, needs
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   176
			                 # authentication 
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   177
                         | "server"  # connect to running proxy on given port
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   178
                         }?
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   179
                  , attribute user { token } ? # user to connect as with RSH/SSH
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   180
                  , attribute path { token } ? # path of pgipkit on remote
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   181
		  , attribute port { xsd:positiveInteger } ? # port to connect to running proxy
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   182
		  , componentconnect
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   183
		  })
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   184
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   185
# Attributes describing when to start the component.
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   186
startupattrs =
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   187
  attribute startup {		# what to do on broker startup:
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   188
             "boot"   |		# always start this component (default with displays)
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   189
             "manual" |		# start manually (default with provers)
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   190
             "ignore"		# never start this component
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   191
             }?
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   192
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   193
# System attributes describing behaviour of component. 
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   194
systemattrs = (
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   195
    attribute timeout { xsd:integer }?  # timeout for communications
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   196
  , attribute sync { xsd:boolean }?     # whether to wait for ready
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   197
  , attribute nestedgoals { xsd:boolean}? # Does prover allow nested goals?
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   198
  )
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   199
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   200
# Control commands from display to broker
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   201
brokercontrol = 
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   202
    launchprover		# Launch a new prover
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   203
  | exitprover			# Request to terminate a running prover
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   204
  | restartprover		# Request to restart/reset a running prover
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   205
  | proversquery		# Query about known provers, running provers
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   206
  | shutdownbroker		# Ask broker to exit (should be wary of this!)
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   207
  | brokerstatusquery		# Ask broker for status report
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   208
  | pgipconfig			# Send config to broker
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   209
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   210
provername_attr    = attribute provername { provername }
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   211
provername         = token
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   212
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   213
proverid_attr     = attribute proverid  { proverid }
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   214
proverid          = token
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   215
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   216
launchprover      = element launchprover { componentid_attr }
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   217
exitprover        = element exitprover { proverid_attr }
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   218
restartprover     = element restartprover { proverid_attr }
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   219
proversquery      = element proversavailable { empty }
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   220
brokerstatusquery = element brokerstatusquery { empty } 
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   221
shutdownbroker    = element shutdownbroker { attribute force { xsd:boolean }? } 
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   222
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   223
# Control messages from broker to interface
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   224
brokermsg  = 
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   225
    brokerstatus		# response to brokerstatusquery:
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   226
  | proveravailmsg		# announce new prover is available
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   227
  | newprovermsg		# new prover has started 
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   228
  | proverstatemsg		# prover state has changed (busy/ready/exit)
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   229
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   230
brokerstatus  = element brokerstatus 
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   231
                       { knownprovers, runningprovers, brokerinformation }
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   232
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   233
knownprover   = element knownprover   { componentid_attr, provername }
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   234
runningprover = element runningprover { componentid_attr, proverid_attr, provername }
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   235
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   236
knownprovers   = element knownprovers { knownprover* }
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   237
runningprovers = element runningprovers { runningprover* }
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   238
brokerinformation = element brokerinformation { string }
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   239
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   240
proveravailmsg  = element proveravailable { provername_attr,
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   241
                                            componentid_attr }
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   242
newprovermsg    = element proverstarted { proverid_attr
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   243
					, componentid_attr
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   244
		                        , provername_attr
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   245
		                        }
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   246
proverstatemsg = element proverstate { 
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   247
                       proverid_attr, provername_attr,
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   248
                       attribute proverstate {proverstate} } 
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   249
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   250
proverstate    = ("ready" | "busy" | "exitus")
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   251
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   252
# FIXME: This only allows provers to be available which are configured.
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   253
#        In the long run, we want to change configurations while running.
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   254
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   255
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   256
# ===========================================================================
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   257
# 3. Display Commands
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   258
# ===========================================================================
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   259
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   260
# Messages exchanged between broker and display
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   261
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   262
                        
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   263
dispcmd = dispfilecmd | dispobjcmd  # display commands go from display to broker
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   264
dispmsg = dispfilemsg | dispobjmsg  # display messages go from broker to display
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   265
   
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   266
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   267
dispfilecmd = 
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   268
    loadparsefile		# parse and load file
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   269
  | newfilewith			# create new source file with given text
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   270
  | dispopenfile		# open (or create) new file 
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   271
  | savefile			# save opened file
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   272
  | discardfile			# discard changes to opened file
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   273
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   274
dispfilemsg =
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   275
    newfile			# announce creation of new file (in response to load/open)
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   276
  | filestatus			# announce change in status of file in broker
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   277
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   278
# unique identifier of loaded files
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   279
srcid_attr = attribute srcid { token }
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   280
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   281
loadparsefile = element loadparsefile { url_attr, proverid_attr }
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   282
newfilewith   = element newfilewith   { url_attr, proverid_attr, string }
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   283
dispopenfile  = element dispopenfile { url_attr,
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   284
                                       proverid_attr,
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   285
                                       attribute overwrite { xsd:boolean }?}
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   286
savefile      = element savefile { srcid_attr,     
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   287
                                   url_attr? }
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   288
discardfile   = element discardfile { srcid_attr }
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   289
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   290
newfile       = element newfile  { proverid_attr, srcid_attr, url_attr }
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   291
filestatus    = element filestatus  { proverid_attr, srcid_attr, newstatus_attr, url_attr?,
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   292
				      datetime_attr} 
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   293
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   294
newstatus_attr = attribute newstatus { "saved" | "changed" | "discarded" }
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   295
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   296
dispobjcmd =
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   297
    setobjstate			# request of change of state 
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   298
  | editobj			# request edit operation of objects
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   299
  | createobj			# request creation of new objects
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   300
# Suggested May 06: probably add re-load flags instead 
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   301
#  | reloadobjs                  # request relisting of all objects
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   302
  | inputcmd		        # process the command (generated by an input event)
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   303
  | interruptprover		# send interrupt or kill signal to prover
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   304
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   305
dispobjmsg = element dispobjmsg { 
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   306
      newobj+			# new objects have been created
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   307
    | delobj+			# objects have been deleted
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   308
    | replaceobjs		# objects are being replaced
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   309
    | objectstate+		# objects have changed state
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   310
    }
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   311
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   312
newobj = element newobj {
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   313
	    proverid_attr,
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   314
            srcid_attr, 
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   315
	    objid_attr, 
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   316
            attribute objposition { objid } ?,
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   317
            objtype_attr ?,
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   318
            attribute objparent { objid }?,
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   319
            attribute objstate { objstate },
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   320
	    # FIXME: would like to include metainfo here
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   321
            # as (properscriptcmd, metainfo*) | unparseable
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   322
            (properscriptcmd | unparseable) }
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   323
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   324
replaceobjs = element replaceobjs {
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   325
	                srcid_attr,
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   326
	                attribute replacedfrom { objid }? ,
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   327
			attribute replacedto { objid }?,
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   328
                        delobj*,    # actually, either of delobj or 
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   329
                        newobj* }   # newobj can be empty but not both.
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   330
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   331
delobj = element delobj   { proverid_attr, srcid_attr, objid_attr }
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   332
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   333
objectstate = element objstate
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   334
                       { proverid_attr, srcid_attr, objid_attr,
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   335
                         attribute newstate {objstate} }
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   336
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   337
setobjstate = element setobjstate
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   338
                  {  objid_attr, attribute newstate {objstate} }
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   339
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   340
editobj = element editobj { srcid_attr ?,
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   341
	                    attribute editfrom { objid }?,
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   342
                            attribute editto   { objid }?,
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   343
                            string }
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   344
createobj = element createobj { srcid_attr ?, 
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   345
                                attribute objposition { objid }?, 
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   346
                                string }
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   347
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   348
# Suggested May 06: probably add re-load flags instead 
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   349
# reloadobjs = element reloadobjs { srcid_attr }
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   350
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   351
inputcmd       = element inputcmd { improper_attr, string }
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   352
improper_attr  = attribute improper { xsd:boolean }
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   353
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   354
interruptprover = element interruptprover 
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   355
                          { interruptlevel_attr, proverid_attr }
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   356
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   357
interruptlevel_attr  = attribute interruptlevel { "interrupt" | "stop" | "kill" }
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   358
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   359
objid_attr = attribute objid { objid } 
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   360
objid      = token 
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   361
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   362
objstate = 
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   363
  ( "unparseable" | "parsed" | "being_processed" | "processed" | "outdated" )
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   364
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   365
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   366
# ==============================================================================
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   367
#  4. Prover Configuration
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   368
# ==============================================================================
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   369
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   370
proverconfig =      
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   371
   askpgip			# what version of PGIP do you support?
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   372
 | askpgml			# what version of PGML do you support?
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   373
 | askconfig			# tell me about objects and operations
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   374
 | askprefs			# what preference settings do you offer?
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   375
 | setpref			# please set this preference value 
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   376
 | getpref			# please tell me this preference value
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   377
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   378
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   379
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   380
prefcat_attr = attribute prefcategory { token }   # e.g. "expert", "internal", etc.
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   381
                                                      # could be used for tabs in dialog
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   382
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   383
askpgip   = element askpgip   { empty }
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   384
askpgml   = element askpgml   { empty }
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   385
askconfig = element askconfig { empty }
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   386
askprefs  = element askprefs  { prefcat_attr? }
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   387
setpref   = element setpref   { name_attr, prefcat_attr?, pgipvalue }
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   388
getpref   = element getpref   { name_attr, prefcat_attr? }
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   389
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   390
 
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   391
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   392
# ==============================================================================
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   393
#  5. Interface Configuration
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   394
# ==============================================================================
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   395
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   396
kitconfig =        
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   397
    usespgip			# I support PGIP, version ..
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   398
  | usespgml			# I support PGML, version ..
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   399
  | pgmlconfig			# configure PGML symbols
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   400
  | proverinfo			# Report assistant information
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   401
  | hasprefs			# I have preference settings ...
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   402
  | prefval			# the current value of a preference is
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   403
  | displayconfig		# configure the following object types and operations
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   404
  | setids			# inform the interface about some known objects
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   405
  | addids			# add some known identifiers
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   406
  | delids			# retract some known identifers
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   407
  | idvalue			# display the value of some identifier
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   408
  | menuadd			# add a menu entry
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   409
  | menudel			# remove a menu entry
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   410
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   411
# version reporting
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   412
version_attr  = attribute version { token }
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   413
usespgml = element usespgml  { version_attr }
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   414
usespgip = element usespgip  { version_attr 
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   415
	                     , activecompspec
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   416
			     }
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   417
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   418
# These data from the component spec which an active component can override, or which
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   419
# components initiating contact with the broker (e.g. incoming socket connections).
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   420
# There are some restrictions: if we start a tool, the componentid and the type must be the
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   421
# same as initially specified.
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   422
activecompspec =  ( componentid_attr?   # unique identifier of component class
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   423
	          , componentname_attr? # Textual name of this component (overrides initial spec)
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   424
		  , componenttype?      # Type of component
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   425
		  , systemattrs         # system attributes
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   426
		  , acceptedpgipelems?  # list of accepted elements
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   427
		  )
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   428
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   429
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   430
acceptedpgipelems = element acceptedpgipelems { singlepgipelem* }
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   431
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   432
singlepgipelem    = element pgipelem { 
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   433
   attribute async { xsd:boolean }?,  # true if this command supported asynchronously (deflt false)
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   434
				      # (otherwise part of usual ready/sync stream)
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   435
   attribute attributes { text }?,    # comma-separated list of supported optional attribute names
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   436
				      # useful for: times attribute
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   437
   text }                             # the unadorned name of the PGIP element (*not* an element)
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   438
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   439
# PGML configuration
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   440
pgmlconfig = element pgmlconfig { pgmlconfigure+ }
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   441
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   442
# Types for config settings: corresponding data values should conform to canonical
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   443
# representation for corresponding XML Schema 1.0 Datatypes.  
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   444
#
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   445
# In detail:
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   446
#  pgipnull   = empty
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   447
#  pgipbool   = xsd:boolean = true | false
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   448
#  pgipint    = xsd:integer = (-)?(0-9)+     (canonical: no leading zeroes)
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   449
#  pgipstring = string  =  <any non-empty character sequence>
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   450
#  pgipchoice = cf xs:choice  = type1 | type2 | ... | typen
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   451
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   452
pgiptype   = pgipnull | pgipbool | pgipint | pgipstring | pgipchoice | pgipconst
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   453
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   454
pgipnull   = element pgipnull { descr_attr?, empty }
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   455
pgipbool   = element pgipbool { descr_attr?, empty }
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   456
pgipint    = element pgipint  { min_attr?, max_attr?, descr_attr?, empty }
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   457
min_attr   = attribute min { xsd:integer }
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   458
max_attr   = attribute max { xsd:integer }
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   459
pgipstring = element pgipstring { descr_attr?, empty }
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   460
pgipconst  = element pgipconst { name_attr, descr_attr? } 
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   461
      # FIXME: Temporary fix because Isabelle does it wrong -- should be empty }
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   462
pgipchoice = element pgipchoice { pgiptype+ }
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   463
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   464
# Notes on pgipchoice:
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   465
# 1. Choices must not be nested (i.e. must not contain other choices)
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   466
# 2. The description attributes for pgipbool, pgipint, pgipstring and pgipconst
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   467
#    are for use with pgipchoice: they can be used as a user-visible label
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   468
#    when representing the choice to the user (e.g. in a pull-down menu).
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   469
# 3. A pgipchoice should have an unambiguous representation as a string. That means
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   470
#    all constants in the choice must have different names, and a choice must not
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   471
#    contain more than one each of pgipint, pgipstring and pgipbool.
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   472
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   473
pgipvalue  = string
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   474
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   475
icon  = element icon { xsd:base64Binary }  # image data for an icon
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   476
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   477
# The default value of a preference as a string (using the unambiguous
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   478
# conversion to string mentioned above). A string value will always be quoted
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   479
# to distinguish it from constants or integers.
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   480
default_attr = attribute default { token }
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   481
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   482
# Description of a choice.  If multi-line, first line is short tip.
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   483
descr_attr   = attribute descr { string }
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   484
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   485
# icons for preference recommended size: 32x32 
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   486
# top level preferences: may be used in dialog for preference setting
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   487
# object preferences: may be used as an "emblem" to decorate 
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   488
# object icon (boolean preferences with default false, only)
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   489
haspref = element haspref  { 
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   490
   name_attr, descr_attr?, 
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   491
   default_attr?, icon?,
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   492
   pgiptype
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   493
}
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   494
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   495
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   496
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   497
hasprefs = element hasprefs { prefcat_attr?, haspref* }
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   498
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   499
prefval = element prefval { name_attr, pgipvalue } 
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   500
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   501
# menu items (incomplete, FIXME)
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   502
path_attr = attribute path { token }
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   503
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   504
menuadd  = element menuadd  { path_attr?, name_attr?, opn_attr? }
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   505
menudel  = element menudel  { path_attr?, name_attr? }
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   506
opn_attr = attribute operation { token }
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   507
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   508
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   509
# Display configuration information: 
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   510
# basic prover information, lexical structure of files, 
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   511
# an icon for the prover, help documents, and the 
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   512
# objects, types, and operations for building proof commands.
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   513
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   514
# NB: the following object types have a fixed interpretation 
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   515
# in PGIP:
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   516
#        "identifier":   an identifier in the identifier syntax
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   517
#           "comment":   an arbitrary sequence of characters
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   518
#	    "theorem":   a theorem name or text
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   519
#	    "theory" :   a theory name or text
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   520
#	    "file" :     a file name
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   521
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   522
displayconfig =
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   523
  element displayconfig { 
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   524
     welcomemsg?, icon?, helpdoc*, lexicalstructure*,
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   525
     objtype*, opn* }
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   526
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   527
objtype = element objtype { name_attr, descr_attr?, icon?,  contains*, hasprefs?  }
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   528
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   529
objtype_attr = attribute objtype { token }           # the name of an objtype
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   530
contains = element contains { objtype_attr, empty }  #  a container for other objtypes
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   531
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   532
opn = element opn { 
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   533
   name_attr, 
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   534
   descr_attr?,
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   535
   inputform?,	  # FIXME: can maybe remove this?
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   536
   opsrc*,	  # FIXME: incompat change wanted: have list of source elts, not spaces
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   537
   optrg, 
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   538
   opcmd, 
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   539
   improper_attr? }
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   540
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   541
opsrc = 
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   542
   element opsrc {	  
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   543
      name_attr?,         # %name as an alternative to %number
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   544
      selnumber_attr?,    # explicit number for %number, the nth item selected
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   545
      prompt_attr?,	  # prompt in form or tooltip in template
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   546
      listwithsep_attr?,  # list of args of this type with given separator
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   547
      list { token* } }   # source types: a space separated list
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   548
			  # FIXME incompat change wanted: just have one source here
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   549
			  # FIXME: need to add optional pgiptype
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   550
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   551
listwithsep_attr =  attribute listwithsep { token }
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   552
selnumber_attr =    attribute selnumber { xsd:positiveInteger }
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   553
prompt_attr =       attribute prompt { string }
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   554
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   555
optrg = 
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   556
   element optrg { token }?           # single target type, empty for proof command
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   557
opcmd = 
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   558
   element opcmd { string }           # prover command, with printf-style "%1"-args
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   559
					   #  (whitespace preserved here: literal text)
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   560
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   561
# interactive operations - require some input
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   562
inputform = element inputform { field+ }  
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   563
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   564
# a field has a PGIP config type (int, string, bool, choice(c1...cn)) and a name; under that
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   565
# name, it will be substituted into the command Ex. field name=number opcmd="rtac %1 %number"
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   566
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   567
field = element field { 
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   568
   name_attr, pgiptype,
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   569
   element prompt { string }
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   570
}
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   571
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   572
# identifier tables: these list known items of particular objtype.
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   573
# Might be used for completion or menu selection, and inspection.
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   574
# May have a nested structure (but objtypes do not).
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   575
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   576
setids  = element setids { idtable* }   # (with an empty idtable, clear table)
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   577
addids  = element addids { idtable* }
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   578
delids  = element delids { idtable* }
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   579
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   580
# give value of some identifier (response to showid; same values returned)
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   581
idvalue = element idvalue               
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   582
   {  thyname_attr?, name_attr, objtype_attr, pgmltext }
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   583
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   584
idtable    = element idtable { context_attr?, objtype_attr, identifier* }
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   585
identifier = element identifier { token }
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   586
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   587
context_attr = attribute context { token } # parent identifier (context) 
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   588
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   589
# prover information: 
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   590
# name, instance (e.g. in case of major parameter of invocation);
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   591
# description, version, homepage,  welcome message, docs available
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   592
proverinfo = element proverinfo 
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   593
   { name_attr, version_attr?, instance_attr?,
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   594
     descr_attr?, url_attr?, filenameextns_attr?, 
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   595
## TEMP: these elements are duplicated in displayconfig, as they're
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   596
## moving there.  
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   597
      welcomemsg?, icon?, helpdoc*, lexicalstructure* }
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   598
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   599
instance_attr = attribute instance { token }
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   600
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   601
welcomemsg = element welcomemsg { string }
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   602
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   603
# helpdoc: advertise availability of some documentation, given a canonical
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   604
# name, textual description, and URL or viewdoc argument.
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   605
# 
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   606
helpdoc = element helpdoc { name_attr, descr_attr, url_attr?, token } # token string is arg to "viewdoc"
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   607
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   608
filenameextns_attr = attribute filenameextns { xsd:NMTOKENS } # space-separated extensions sans "."
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   609
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   610
# lexical structure of proof texts
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   611
lexicalstructure = 
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   612
   element lexicalstructure {
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   613
      keyword*,
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   614
      stringdelimiter*,
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   615
      escapecharacter?,
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   616
      commentdelimiter*,
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   617
      identifiersyntax?
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   618
   }
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   619
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   620
keyword = element keyword {
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   621
   attribute word { token },
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   622
   shorthelp?,
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   623
   longhelp? }
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   624
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   625
shorthelp = element shorthelp { string }   # one-line (tooltip style) help 
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   626
longhelp  = element longhelp { string }    # multi-line help
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   627
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   628
stringdelimiter = element stringdelimiter { token }  # should be a single char
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   629
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   630
# The escape character is used to escape strings and other special characters - in most languages it is \
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   631
escapecharacter = element escapecharacter { token }  # should be a single char
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   632
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   633
commentdelimiter = element commentdelimiter { 
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   634
   attribute start { token },
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   635
   attribute end { token }?,
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   636
   empty
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   637
  }
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   638
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   639
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   640
# syntax for ids: id = initial allowed*  or id = allowed+ if initial empty
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   641
identifiersyntax = element identifiersyntax { 
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   642
   attribute initialchars { token }?,
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   643
   attribute allowedchars { token }
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   644
}
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   645
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   646
# ==============================================================================
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   647
# 6. Prover Control
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   648
# ==============================================================================
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   649
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   650
provercontrol = 
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   651
   proverinit			# reset prover to its initial state
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   652
 | proverexit			# exit prover
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   653
 | startquiet			# stop prover sending proof state displays, non-urgent messages
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   654
 | stopquiet			# turn on normal proof state & message displays
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   655
 | pgmlsymbolson		# activate use of symbols in PGML output (input always understood)
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   656
 | pgmlsymbolsoff		# deactivate use of symbols in PGML output
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   657
 | setproverflag		# set/clear a standard control flag (supersedes above)
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   658
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   659
proverinit     = element proverinit { empty }  
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   660
proverexit     = element proverexit { empty }
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   661
startquiet     = element startquiet { empty }      # DEPRECATED 
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   662
stopquiet      = element stopquiet  { empty }      # DEPRECATED 
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   663
pgmlsymbolson  = element pgmlsymbolson { empty }   # DEPRECATED
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   664
pgmlsymbolsoff = element pgmlsymbolsoff { empty }  # DEPRECATED
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   665
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   666
setproverflag  = element setproverflag { flagname_attr, 
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   667
					 attribute value { xsd:boolean } }
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   668
flagname_attr  = 
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   669
   attribute flagname { "quiet" 
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   670
		      | "pgmlsymbols" 
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   671
		      | "metainfo:thmdeps" 
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   672
		      }
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   673
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   674
# General prover output/responses
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   675
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   676
# Prover output has an otional proverid_attribute. This is set by the broker when relaying 
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   677
# prover output to displays. When producing output, provers can and should not set this
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   678
# attribute. 
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   679
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   680
proveroutput =
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   681
   ready			# prover is ready for input
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   682
 | cleardisplay			# prover requests a display area to be cleared
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   683
 | proofstate			# prover outputs the proof state
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   684
 | normalresponse		# prover outputs some display
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   685
 | errorresponse		# prover indicates an error/warning/debug condition, with message
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   686
 | scriptinsert			# some text to insert literally into the proof script
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   687
 | metainforesponse		# prover outputs some other meta-information to interface
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   688
 | parseresult			# results of a <parsescript> request (see later)
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   689
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   690
ready = element ready { empty }
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   691
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   692
displayarea = "status"		# a status line
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   693
	    | "message"		# the message area (e.g. response buffer, perhaps swapped into view)
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   694
            | "display"		# the main display area (e.g. goals buffer, usually persistent)
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   695
	    | token		# prover-specified window name
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   696
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   697
cleardisplay = 
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   698
   element cleardisplay {
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   699
      proverid_attr?,
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   700
      attribute area { 
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   701
         displayarea | "all" } }           
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   702
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   703
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   704
proofstate = 
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   705
  element proofstate { proverid_attr?, pgml }
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   706
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   707
messagecategory =		# attribution of message
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   708
   "internal"			#  - internal debug message (interface should usually hide)
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   709
 | "information"		#  - user-level debug/info message (interface may hide)
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   710
 | "tracing"			#  - user-level "tracing" message (possibly voluminous)
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   711
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   712
normalresponse =                           
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   713
  element normalresponse { 
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   714
    proverid_attr?,				    # if no proverid, assume message is from broker
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   715
    attribute area { displayarea },
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   716
    attribute messagecategory { messagecategory }?, # optional extra category (e.g. tracing/debug)
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   717
    attribute urgent { xsd:boolean }?,              # message should be brought to users attention
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   718
    pgmltext 
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   719
}
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   720
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   721
## Error messages:  these are different from ordinary messages in that
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   722
## they indicate an error condition in the prover, with a notion
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   723
## of fatality and (optionally) a location.  The interface may collect these
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   724
## messages in a log, display in a modal dialog, or in the specified
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   725
## display area if one is given
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   726
## 
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   727
## Error responses are also taken to indicate failure of a command to be processed, but only in
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   728
## the special case of a response with fatality "fatal".  If any errorresponse with
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   729
## fatality=fatal is sent before <ready/>, the PGIP command which triggered the message is
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   730
## considered to have failed.  If the command is a scripting command, it will not be added to
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   731
## the successfully processed part of the document.  A "nonfatal" error also indicates some
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   732
## serious problem with the sent command, but it is not considered to have failed.  This is the
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   733
## ordinary response for
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   734
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   735
errorresponse = 
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   736
   element errorresponse { 
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   737
     proverid_attr?,				   #  ... as above ...
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   738
     attribute area { displayarea }?,
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   739
     attribute fatality { fatality },
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   740
     location_attrs,
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   741
     pgmltext
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   742
  }
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   743
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   744
fatality =	  # degree of error conditions:
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   745
   "info"	  #  - info message
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   746
 | "warning"      #  - warning message
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   747
 | "nonfatal"     #  - error message, recovered and state updated
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   748
 | "fatal"        #  - error message, command has failed
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   749
 | "panic"        #  - shutdown condition, component exits (interface may show message)
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   750
 | "log"          #  - system-level log message (interface does not show message; written to log file)
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   751
 | "debug"        #  - system-level debug message (interface may show message; written to log file)
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   752
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   753
# attributes describing a file location (for error messages, etc)
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   754
location_attrs = 
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   755
     attribute location_descr    { string }?,
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   756
     attribute location_url      { xsd:anyURI }?,
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   757
     attribute locationline      { xsd:positiveInteger }?,
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   758
     attribute locationcolumn    { xsd:positiveInteger }?,
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   759
     attribute locationcharacter { xsd:positiveInteger }?,
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   760
     attribute locationlength    { xsd:positiveInteger }?
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   761
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   762
# instruction to insert some literal text into the document
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   763
scriptinsert = element scriptinsert { proverid_attr?, metavarid_attr?, string }
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   764
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   765
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   766
# metainformation is an extensible place to put system-specific information
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   767
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   768
value = element value { name_attr?, text }        # generic value holder [ deprecated: use metainfo ]
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   769
metainfo = element metainfo { name_attr?, text }  # generic info holder
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   770
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   771
metainforesponse = 
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   772
   element metainforesponse { 
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   773
      proverid_attr?,
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   774
      attribute infotype { token },      # categorization of data
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   775
      (value | metainfo)* }              # data values/text
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   776
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   777
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   778
# ==============================================================================
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   779
# 7. Proof script markup and proof control 
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   780
# ==============================================================================
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   781
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   782
# properproofcmds are purely markup on native proof script (plain) text
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   783
properproofcmd =
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   784
    opengoal        # open a goal in ambient context
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   785
  | proofstep       # a specific proof command (perhaps configured via opcmd) 
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   786
  | closegoal       # complete & close current open proof (succeeds iff proven, may close nested pf)
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   787
  | giveupgoal      # close current open proof, retaining attempt in script (Isar oops)
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   788
  | postponegoal    # close current open proof, record as proof obl'n  (Isar sorry)  
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   789
  | comment         # a proof script comment; text probably ignored by prover 
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   790
  | doccomment      # a proof script document comment; text maybe processed by prover 
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   791
  | whitespace      # a whitespace comment; text ignored by prover
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   792
  | spuriouscmd     # command ignored for undo, e.g. "print x", could be pruned from script
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   793
  | badcmd          # a command which should not be stored in the script (e.g. an improperproofcmd)
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   794
  | litcomment      # a PGIP literate comment (never passed to prover)
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   795
  | pragma	    # a document generating instruction (never passed to prover)
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   796
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   797
# improperproofcmds are commands which are never stored in the script
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   798
improperproofcmd =
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   799
    dostep        # issue a properproofcmd (without passing in markup)
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   800
  | undostep      # undo the last proof step issued in currently open goal 
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   801
  | redostep      # redo the last undone step issued in currently open goal (optionally supported)
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   802
  | abortgoal     # give up on current open proof, close proof state, discard history
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   803
  | forget        # forget a theorem (or named target), outdating dependent theorems
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   804
  | restoregoal   # re-open previously postponed proof, outdating dependent theorems
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   805
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   806
# In future we may allow input to contain markup; for now it is treated uniformly as plain text.
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   807
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   808
opengoal     = element opengoal     { display_attr?, thmname_attr?, string } # FIXME: add objprefval
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   809
proofstep    = element proofstep    { display_attr?, name_attr?, objtype_attr?, string }
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   810
closegoal    = element closegoal    { display_attr?, string }
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   811
giveupgoal   = element giveupgoal   { display_attr?, string }
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   812
postponegoal = element postponegoal { display_attr?, string }
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   813
comment      = element comment      { display_attr?, string }
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   814
doccomment   = element doccomment   { display_attr?, string }
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   815
whitespace   = element whitespace   { display_attr?, string }
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   816
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   817
display_attr = attribute nodisplay { xsd:boolean }  # whether to display in documentation
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   818
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   819
spuriouscmd  = element spuriouscmd { string }  # no semantic effect (e.g. print)
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   820
badcmd       = element badcmd { string }       # illegal in script (e.g. undo)
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   821
nonscripting = element nonscripting { string } # non-scripting text (different doc type)
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   822
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   823
litcomment  = element litcomment { format_attr?, (text | directive)* }
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   824
directive   = element directive { (proofctxt,pgml) }
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   825
format_attr = attribute format { token }
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   826
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   827
pragma       = showhidecode | setformat
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   828
showhidecode = element showcode { attribute show { xsd:boolean } }
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   829
setformat    = element setformat { format_attr }
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   830
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   831
dostep       = element dostep { string }
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   832
undostep     = element undostep { times_attr? }
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   833
redostep     = element redostep { times_attr? }
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   834
abortgoal    = element abortgoal { empty }
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   835
forget       = element forget { thyname_attr?, name_attr?, objtype_attr? }
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   836
restoregoal  = element restoregoal { thmname_attr }
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   837
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   838
times_attr   = attribute times { xsd:positiveInteger }
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   839
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   840
# empty objprefval element is used for object prefs in script markup 
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   841
objprefval = element objprefval { name_attr, val_attr, empty }
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   842
val_attr   = attribute value { token }
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   843
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   844
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   845
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   846
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   847
# =======================================================
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   848
# Inspecting the proof context, etc.
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   849
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   850
# NB: ids/refs/parent: work in progress, liable to change.
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   851
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   852
proofctxt =
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   853
    askids         # tell me about identifiers (given objtype in a theory)
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   854
  | askrefs        # tell me about dependencies (references) of an identifier
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   855
#  | askparent      # tell me the container for some identifier
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   856
  | showid         # print the value of some object
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   857
  | askguise       # tell me about the current state of the prover
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   858
  | parsescript    # parse a raw proof script into proofcmds
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   859
  | showproofstate # (re)display proof state (empty if outside a proof)
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   860
  | showctxt       # show proof context
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   861
  | searchtheorems # search for theorems (prover-specific arguments)  
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   862
  | setlinewidth   # set line width for printing
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   863
  | viewdoc        # request some on-line help (prover-specific arg)
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   864
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   865
askids = element askids  { thyname_attr?, objtype_attr? }
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   866
	# Note that thyname_attr is *required* for certain objtypes (e.g. theorem).
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   867
	# This is because otherwise the list is enormous.
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   868
	# Perhaps we should make thyname_attr obligatory? 
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   869
	# With a blank entry (i.e. thyname="") allowed for listing theories, or for when 
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   870
	# you really do want to see everything (could be a shell-style glob)
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   871
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   872
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   873
# askids:    container -> identifiers contained within
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   874
# askparent: identifier + type + context -> container
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   875
# askrers:   identifier + type + context -> identifiers which are referenced 
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   876
#
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   877
askrefs = element askrefs { url_attr?, thyname_attr?, objtype_attr?, name_attr? }
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   878
# TODO: maybe include guises here as indication of reference point.  
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   879
# setrefs in reply to askrefs only really needs identifiers, but it's nice to
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   880
# support voluntary information too.
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   881
setrefs = element setrefs { url_attr?, thyname_attr?, objtype_attr?, name_attr?, idtable*, fileurl* }
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   882
fileurl = element fileurl { url_attr }
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   883
# telldeps = element telldeps { thyname_attr?, objtype_attr, name_attr?, identifier* }
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   884
# Idea: for a theory dependency we return a single file (URL), the containing file.
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   885
#       for a file dependency we return urls of parent files,
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   886
#       for theorem dependency we return theory
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   887
#       for term dependency we return definition (point in file)
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   888
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   889
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   890
showid = element showid  { thyname_attr?, objtype_attr, name_attr }
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   891
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   892
askguise = element askguise { empty }
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   893
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   894
showproofstate = element showproofstate { empty }
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   895
showctxt       = element showctxt { empty }
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   896
searchtheorems = element searchtheorems { string }
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   897
setlinewidth   = element setlinewidth { xsd:positiveInteger }
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   898
viewdoc        = element viewdoc { token }
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   899
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   900
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   901
# =======================================================
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   902
# Proof script documents and parsing proof scripts
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   903
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   904
# A PGIP document is a sequence of script commands, each of which
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   905
# may have meta information attached.
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   906
properscriptcmdmetainfo = properscriptcmd, metainfo*
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   907
pgipdoc = element pgipdoc { properscriptcmdmetainfo* }
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   908
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   909
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   910
# NB: parsing needs only be supported for "proper" proof commands,
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   911
# which may appear in proof texts.  The groupdelimiters are purely
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   912
# markup hints to the interface for display structure on concrete syntax.
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   913
# The location attributes can be used by the prover in <parsescript> to
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   914
# generate error messages for particular locations; they can be used 
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   915
# in <parseresult> to pass position information back to the display,
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   916
# particularly in the case of (re-)parsing only part of a file.
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   917
# The parsing component MUST return the same location attributes
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   918
# (and system data attribute) that was passed in.
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   919
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   920
parsescript = element parsescript
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   921
                 { location_attrs, systemdata_attr, string }
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   922
       
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   923
parseresult = element parseresult { location_attrs, systemdata_attr,
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   924
				    singleparseresult* }
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   925
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   926
# Really we'd like parsing to return properscriptcmdmetainfo as a single
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   927
# result (and similarly for newobj).  
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   928
# Unfortunately, although this is an XML-transparent extension, it
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   929
# messes up the Haskell schema-fixed code rather extensively, so for
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   930
# now we just treat metainfo at the same level as the other results,
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   931
# although it should only appear following a properscriptcmd.
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   932
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   933
singleparseresult  = properscriptcmd | metainfo | unparseable | errorresponse
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   934
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   935
unparseable = element unparseable { string }
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   936
properscriptcmd = properproofcmd | properfilecmd | groupdelimiter
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   937
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   938
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   939
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   940
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   941
groupdelimiter = openblock | closeblock
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   942
openblock  = element openblock { 
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   943
   name_attr?, objtype_attr?, 
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   944
   metavarid_attr?, positionid_attr?,
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   945
   fold_attr?, indent_attr? }
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   946
closeblock = element closeblock { empty }
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   947
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   948
# 
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   949
metavarid_attr  = attribute metavarid { token }
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   950
positionid_attr = attribute positionid { token }
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   951
fold_attr       = attribute fold { xsd:boolean }
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   952
indent_attr     = attribute indent { xsd:integer }
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   953
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   954
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   955
# =======================================================
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   956
# Theory/file handling
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   957
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   958
properfilecmd =     # (NB: properfilecmds are purely markup on proof script text)
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   959
    opentheory      # begin construction of a new theory.  
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   960
  | theoryitem      # a step in a theory (e.g. declaration/definition of type/constant).
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   961
  | closetheory     # complete construction of the currently open theory
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   962
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   963
improperfilecmd = 
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   964
    doitem	    # issue a proper file command (without passing in markup)
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   965
  | undoitem	    # undo last step (or named item) in theory construction
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   966
  | redoitem	    # redo last step (or named item) in theory construction (optionally supported)
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   967
  | aborttheory     # abort currently open theory
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   968
  | retracttheory   # retract a named theory
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   969
  | openfile        # signal a file is being opened for constructing a proof text interactively
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   970
  | closefile       # close the currently open file, suggesting it has been processed
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   971
  | abortfile       # unlock a file, suggesting it hasn't been processed
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   972
  | loadfile        # load (i.e. process directly) a file possibly containing theory definition(s)
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   973
  | retractfile     # retract a given file (including all contained theories) 
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   974
  | changecwd       # change prover's working directory (or load path) for files
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   975
  | systemcmd       # system (other) command, parsed internally
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   976
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   977
fileinfomsg = 
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   978
   informfileloaded       # prover informs interface a particular file is loaded
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   979
 | informfileretracted    # prover informs interface a particular file is outdated
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   980
 | informguise		  # prover informs interface about current state
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   981
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   982
opentheory    = element opentheory    { thyname_attr, parentnames_attr?, string }
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   983
closetheory   = element closetheory   { string }
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   984
theoryitem    = element theoryitem    { name_attr?, objtype_attr?, string } # FIXME: add objprefval
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   985
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   986
doitem        = element doitem        { string } 
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   987
undoitem      = element undoitem      { name_attr?, objtype_attr?, times_attr? } 
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
   988
redoitem      = element redoitem      { name_attr?, objtype_attr?, times_attr? } 
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   989
aborttheory   = element aborttheory   { empty }
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   990
retracttheory = element retracttheory { thyname_attr }
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   991
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   992
parentnames_attr = attribute parentnames { objnames }
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   993
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   994
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   995
# Below, url_attr will often be a file URL.  We assume for now that
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   996
# the prover and interface are running on same filesystem.
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   997
#
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   998
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
   999
openfile      = element openfile  { url_attr }	    # notify begin reading from given file
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
  1000
closefile     = element closefile { empty }	    # notify currently open file is complete
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
  1001
abortfile     = element abortfile { empty }	    # notify currently open file is discarded
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
  1002
loadfile      = element loadfile  { url_attr }	    # ask prover to read file directly
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
  1003
retractfile   = element retractfile { url_attr }    # ask prover to retract file
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
  1004
changecwd     = element changecwd { url_attr }	    # ask prover to change current working dir
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
  1005
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
  1006
# this one not yet implemented, but would be handy.  Perhaps could be 
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
  1007
# locatethy/locatefile instead.
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
  1008
#locateobj     = element locateobj { name_attr, objtype_attr } # ask prover for file defining obj
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
  1009
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
  1010
informfileloaded    = element informfileloaded    { completed_attr?, 
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
  1011
						    url_attr }  # prover indicates a processed file
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
  1012
informfileretracted = element informfileretracted { completed_attr?, 
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
  1013
						    url_attr }  # prover indicates an undone file
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
  1014
informfileoutdated = element informfileoutdated { completed_attr?, 
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
  1015
						    url_attr }  # prover indicates an outdated file
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
  1016
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
  1017
informfilelocation  = element informfilelocation  { url_attr }  # response to locateobj
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
  1018
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
  1019
completed_attr = attribute completed { xsd:boolean }  # false if not completed (absent=>true)
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
  1020
						      # (the prover is requesting a lock)
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
  1021
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
  1022
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
  1023
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
  1024
informguise = 
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
  1025
   element informguise {
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
  1026
      element guisefile { url_attr }?,
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
  1027
      element guisetheory { thyname_attr }?,
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
  1028
      element guiseproof { thmname_attr?, proofpos_attr? }?
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
  1029
   }
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
  1030
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
  1031
proofpos_attr = attribute proofpos { xsd:nonNegativeInteger }
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
  1032
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
  1033
systemcmd     = element systemcmd     { string }	# "shell escape", arbitrary prover command!
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
  1034
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
  1035
# ==============================================================================
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
  1036
# 8. Internal messages: only used between communicating brokers.
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
  1037
# ==============================================================================
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
  1038
internalmsg  = launchcomp | stopcomp | registercomp | compstatus
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
  1039
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
  1040
launchcomp   = element launchcomponent { componentspec }
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
  1041
	               # request to start an instance of this component remotely
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
  1042
stopcomp     = element stopcomponent { attribute sessionid { token } }
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
  1043
                       # request to stop component with this session id remotely
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
  1044
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
  1045
registercomp = element registercomponent { activecompspec } 
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
  1046
                       # component has been started successfully
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
  1047
compstatus   = element componentstatus { componentstatus_attr    # status
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
  1048
	                               , componentid_attr?       # component id (for failure)
23434
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
  1049
	                               , element text { string }?  # user-visible error message
b2e7d4c29614 Synchronize schema with current version
aspinall
parents: 17735
diff changeset
  1050
				       , element info { string }?  # Additional info for log files.
17735
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
  1051
				       }	
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
  1052
                       # component status: failed to start, or exited
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
  1053
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
  1054
componentstatus_attr = attribute status { ("fail"   # component failed to start
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
  1055
 		                          |"exit"  # component exited
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
  1056
					  )}	
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
  1057
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
  1058
# Local variables:
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
  1059
# fill-column: 95
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
  1060
# End:
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
  1061
# ==============================================================================
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
  1062
# end of `pgip.rnc'.
e6948d8f5f73 Schema for PGIP
aspinall
parents:
diff changeset
  1063