next up previous
Next: 3.1 Basic type specifications Up: MP Prototype Specification Previous: 2. Syntax of MP

   
3. MP Type Specifications

An MP type specification is an MP Tree giving the structure and content type of a block of data. The prototype tree may specify that the data block is of a single basic type or that it consists of a tree built from a combination of operators and basic types.

Table 1 gives a summary of the rules governing the relationship between a prototype tree and the data transmitted at data communication time. The remainder of this report expands on this table. The TypeSpec column of the table uses the following notation: <type>:<dictionary>::<value>:<nargs>, where <type> specifies an MP node packet type (``Cmt'' for CommonMetaType, ``Cop'' for CommonOperator, ``Cmop'' for CommonMetaOperator, etc.), <dictionary> is the name of the dictionary where <value> is defined, and <nargs> gives the number of arguments for operators. For example, ``Cmt:Proto::IMP_Sint32'' specifies the Common Meta Type MP_CmtProtoIMP_Sint32 defined in the prototype dictionary.


 
Table 1: MP TypeSpec summary
TypeSpec Corresponding data Section
Basic TypeSpec
Cmt:Proto::IMP_* 1 IMP_* data limb § 3.1
Cmt:Proto::RecStruct as specified by the preceeding § 3.2.3
  Cop:Proto:RecStruct TypeSpec  
Cmt:Proto::RecUnion as specified by the preceeding § 3.2.3
  Cop:Proto:RecUnion TypeSpec  
Tree Typespec
Any other (Common) MetaType 1 MP Tree § 3.1, §  3.3
Prototype Operator TypeSpec
Cop:Proto::Struct:n n data limbs follow § 3.2.1
<exactly n TypeSpecs follow> ith limb is as specified by ith TypeSpec  
Cop:Proto::Union:n 1 IMP_Uint32(m) and § 3.2.1
<exactly n TypeSpecs follow> exactly 1 data limb follows  
  which is as specified by the (m-1)th TypeSpec  
Cop:Proto::RecStruct:n n data limbs follow § 3.2.2
<exactly n TypeSpecs follow> ith limb is as specified by ith TypeSpec  
Cop:Proto::RecUnion:n 1 IMP_Uint32(m) and § 3.2.1
<exactly n TypeSpecs follow> exactly 1 data limb follows  
  which is as specified by the (m-1)th TypeSpec  
Meta Operator TypeSpec
Mop:Any::Any:n or if (n == 0) then § 3.2.2
Cmop:Any::Any:n   IMP_Uint32(m)  
  else set m = n  
  m data limbs which are as specified by  
  the prototype annot attached to the meta operator  
Any other Op or Cop syntax error §  3.2.1

More formally, we define an MP type specification by:

<MP TypeSpec>
::= <Basic TypeSpec> | <Operator TypeSpec> | < Tree TypeSpec >



 
next up previous
Next: 3.1 Basic type specifications Up: MP Prototype Specification Previous: 2. Syntax of MP
| ZCA Home | Reports |