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