home *** CD-ROM | disk | FTP | other *** search
/ The Hacker's Encyclopedia 1998 / hackers_encyclopedia.iso / rfc / 1 / rfc0242.txt < prev    next >
Encoding:
Text File  |  2003-06-11  |  17.7 KB  |  537 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7. RFC 242
  8. NIC 7672
  9. Categories: D.4, D.7
  10.  
  11.  
  12.                DATA DESCRIPTIVE LANGUAGE FOR SHARED DATA
  13.  
  14.  
  15.                                 L. Haibt
  16.                                A. Mullery
  17.  
  18.  
  19.                     Thomas J. Watson Research Center
  20.                          Yorktown Heights, N.Y.
  21.  
  22.  
  23.                              July 19, 1971
  24.  
  25.  
  26. Introduction
  27.  
  28.     A primary consequence of the use of networks of computers is the
  29. demand for more efficient shared use of data.
  30.  
  31.     Many of the impedements to easy shared data follow from the many
  32. diverse ways of representing and making reference to the same data.
  33. Almost all of these problems have been known before data was shared
  34. through computer networks, but the network facility has simply
  35. emphasized the problems.
  36.  
  37.     For convenience of discussion, representation differences will be
  38. classified in three categories. The first category is one of very local
  39. representation - the bit patterns for the character set, for fixed point
  40. and floating point numbers. These differences are usually imposed by
  41. differences in CPU's and storage devices. Translations from one
  42. representation to another at another at this level can usually be made a
  43. unit at a time (e.g. computer word by computer word) with the most
  44. serious problems occurring when there are some values in one
  45. representation scheme which have no corresponding meaning in the other
  46. representation scheme, as, for expamble, when trying to translate
  47. eight-bit bytes to six-bit bytes.
  48.  
  49.     A second category of differences has to do with the representation
  50. of collections of data, e.g., their size, ordering and location.
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.                                                                 [Page 1]
  59.  
  60. A third category of representation differences which is a little
  61. difficult to characterize has to do with all the more complex structures
  62. that data collections may have - for example, files with indexes, fields
  63. with internal pointers and cross references, and collections of files
  64. such as partitioned data sets and generation data sets in OS 360.
  65.  
  66.     The approach to coping with these problems within our project of
  67. Network/440 has been to work on the development of a descriptive
  68. language which would permit the specification of those aspects of data
  69. representation which would be subject to transformation in moving data
  70. about in a network. Then, the network data managment system would be
  71. able to refer to the descriptions as needed in the data management
  72. function. For example, to a large extent, one could supply two
  73. descriptions to the data manager, one wich indicates how data is now
  74. represented, and one which indicates how a copy of it should look, and
  75. the data managment systems could invoke the necessary transformations to
  76. make the proper copy.
  77.  
  78.     This approach to specifying data transformation contrasts somewhat
  79. with systems, such as the RAND Form Machine, which provide a formalism
  80. for specifying the particular translation alogrithms for changing form
  81. one form to another. the descriptor-to descriptor approach seems to
  82. simplyfy the programming burden when creating new field formats. Neither
  83. method of specifying translations precludes the use of a Network
  84. Standard Reprsentation.
  85.  
  86. Structure
  87.  
  88.     The descriptive language assumes that data may have an inherent
  89. structure independent of other groupings, such as name groupings,
  90. locking groupings, etc., imposed on it. A data structure description
  91. consists of groupings of established data value type codes. The list of
  92. established data value types should be sufficient, through appropriate
  93. groupings, to describe any hierarchical structure of data.
  94.  
  95.     The data type identifies how the data value is to be interpreted. A
  96. list of data type codes is given below. This list must be able identify
  97. each data type that may exist in a data set in any machine in the
  98. network. However, for data sets that contain only data types of the
  99. machine on which it is stored, it is not necessary that a different code
  100. be defined for different forms of any single type that may exist among
  101. different machines. The data type specified in the description along
  102. with the identification of the machine at which the data is stored is
  103. sufficient to completely describe all such forms of the data types. A
  104. tentative list of machine dependent type codes, compiled by
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.                                                                 [Page 2]
  112.  
  113. G. Howe and T. Kibler is as follows:
  114.  
  115.           F    floating point
  116.  
  117.           I    fixed
  118.  
  119.           D    double precision floating point
  120.  
  121.           C    character string
  122.  
  123.           X    complex
  124.  
  125.           P    packed decimal
  126.  
  127.           L    logical
  128.  
  129.  
  130.     It is desirable to be able to construct data sets that contain
  131. either data types not allowable at the machine at which the data set
  132. is stored or, possibly, even types that say not exist at any machine
  133. in the network. For example, one may wish to store eight bit data on a
  134. six bit machine.  This may, in principle at least, be done by defining
  135. a logical data set containing eight bit bytes in terms of a real data
  136. set containing six bit characters. For this, however, data value type
  137. descriptors have to be defined that are machine independent. The basic
  138. machine independent data type is as follows:
  139.  
  140.           B    bit.
  141.  
  142. It is not clear at this time that any others are necessary since others
  143. can be built from this one. For convenience, other standard machine
  144. independent data types may later be defined.
  145.  
  146.     Two other machine independent types are useful in describing
  147. structures. These are:
  148.  
  149.           Z    null
  150.  
  151.           O    omit.
  152.  
  153. the null type indicates that there is no data corresponding to this
  154. item: however, the item should be counted as existing in the structure.
  155. The omit type indicates just the opposite: there is data that should not
  156. be counted as an item, it should be ignored.
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.                                                                 [Page 3]
  165.  
  166. A grouping of data values is described by the list of elements of
  167. the grouping enclosed in parentheses. An element of grouping may be
  168. either a data value as described by one of the data value type codes, or
  169. a grouping. The list consists of these elements, separated by commas and
  170. indicates that the elements appear in the grouping in the order
  171. indicated. For example, the description:
  172.  
  173.           ((C,C),(F,F,I))
  174.  
  175.  
  176. describes a data collection consisting of two subgroupings, the first
  177. subgrouping consisting of two data values of type 'C', and the second
  178. subgrouping consisting of two data values of type 'F' followed by a data
  179. value of type 'I'. the structure of this data collection is thus a three
  180. level tree which may be shown in two dimensions as follows:
  181.  
  182.           ( )
  183.            |
  184.           ( )---( )
  185.            |     |
  186.            C-C   F-F-I
  187.  
  188. Properties
  189.  
  190.  
  191.     Other properties of data beyond that of the structures and
  192. composition of the data set have also to be described.  These may be
  193. assigned to items of the data collection, where an item may be defined
  194. as an individual data value, or a grouping of these, by modifying the
  195. item description with the specification of the preperties that apply to
  196. it. The notation that will be used will be an infix notation of the
  197. form:
  198.  
  199.          operand operator |[extent]|
  200.  
  201. where the operator indicates the property type, the operand the property
  202. value and the optional extent the numer of items to which the property
  203. applies. Normally the property is assumed to apply to just the following
  204. item in the description. If the property is to apply to more than just
  205. the following item description, this is indicated by specifying a number
  206. as the extent, this number indicating how many of the following item
  207. definitions at the same level the property is to apply to.
  208.  
  209.     Type - The structure description of the data set is a constitutional
  210. or syntactic description of the data set. In some cases it is necessary
  211. to give a discription of the use or meaning of an element. For example,
  212. in some complex data structures, the linkages of the structures may be
  213. represented as data values in the data set. Thus, though the more
  214.  
  215.  
  216.  
  217.                                                                 [Page 4]
  218.  
  219. complex data structure is represented in a hierarchical form and, as a
  220. result, is in a form describable by the above notation, the data values
  221. that represent the linkages, and their meaning, must somehow he
  222. represented in the data description in order for the complex data
  223. structure to be truly described. As another example, one may wish
  224. ascribe to some level of the data structure the type 'record' so that
  225. the data set can be used by some system which uses the concept 'record'
  226. in accessing the data.
  227.  
  228.     What an initial set of such types should be has not been deicded.
  229.  
  230.     Names - Items of a data structure can be given names by modifying
  231. the items description with a notation of the form:
  232.  
  233.           name n |[extent]|.
  234.  
  235. Depending on the context of its use, the name can refer to the
  236. description itself or to the data pertaining to the named part of the
  237. description. The name is assumed to be unique only within the scope of
  238. extent of the next higher encompassing name unless otherwise indicated
  239. by giving another encompassing name as the scope. This may be the name
  240. of the whole data set or description, for example. The scope of a name
  241. is specified by preceding the inner name by the outer name or names,
  242. separated by dots. The name:
  243.  
  244.           A,BETA
  245.  
  246. indicates that the scope of the name BETA is A.
  247.  
  248.     The name applies to just the following item in the description
  249. unless otherwise indicated by including the extent parameter, For
  250. exampel, the description:
  251.  
  252.           (An(C,C), (Bn[ 2 ]F,Cn[ 2 ]F,I))
  253.  
  254. indicates that name A is given to the item that contains two data values
  255. of type 'C', the name B to two data values, both of type 'F', and the
  256. name C to the last two data values, one of type 'F', and the other of
  257. type 'I'. Notice that with this notation, extents can overlap. For
  258. example, in the above description, the extent of name B overlapped that
  259. of name C.
  260.  
  261.     In a description, the same name can be applied to more than one item
  262. definition either by use of the extent parameter, or by actually
  263. specifying the name at each item to be included in the extent of the
  264. name. If a name is multiply-applied within the same scope, then the name
  265. is assumed to apply to the aggregate of the items to which it has been
  266. given. Thus is possible to apply names to aggregates of items that are
  267.  
  268.  
  269.  
  270.                                                                 [Page 5]
  271.  
  272. not necessarily sequential.
  273.  
  274.     Lock - During the course of processing data, it may be necessary to
  275. lock out use of some portion of data to other users. Seqmentation of a
  276. data set into units for locking purposes may be indicated by the
  277. notation:
  278.  
  279.           k|[extent]|.
  280.  
  281. Whether or not the data is locked and the type of lock applied (for
  282. example, write protect or read/write protect) is specified at the time
  283. the data is used.
  284.  
  285.     Authorization - Authorization for a user to access data may be
  286. governed by some access code assigned to the data.  This access code can
  287. be specified in the description by modifying the desired elements of the
  288. description with an indication of the code. The notation is:
  289.  
  290.           code a |[extent ]|
  291.  
  292. Control.
  293.  
  294.     Two modifiers are provided which govern the existence of items in
  295. the definition. The first is the repetition modifier:
  296.  
  297.           factor r |[extent ]|.
  298.  
  299. This causes the following item definition or item definitions (if the
  300. extent indicates more than one) to be repeated. Thus the description
  301.  
  302.           (3rC)
  303.  
  304. is equivalent to the description
  305.  
  306.           (C,C,C).
  307.  
  308. The other control modifier is the condition modifier:
  309.  
  310.           condition c |[extent ]|.
  311.  
  312. If the condition specified is not true, then the following item
  313. definition is ignored. The condition is specified by a Boolean
  314. expression.
  315.  
  316.     Since several modifiers may apply to an item definition, there is a
  317. problem concerning the relationship among them. For example, if a
  318. repetition modifier and a conditional modifier apply to an item, does
  319. the condition apply to all the repeated items, or only to the first,
  320.  
  321.  
  322.  
  323.                                                                 [Page 6]
  324.  
  325. assuming the extent of the condition modifier is one? The effect of
  326. multiple modifiers is dependent on the order in which they are
  327. evaluated. Two possible conventions come to mind. One says that
  328. repetitions are expanded first, then properties applied, and finally
  329. conditions applied to the resulting expanded item definitions,
  330. independent of the order in which the modifiers were specified in the
  331. description. Thus the description
  332.  
  333.           (A=3c [ 4 ]4rF,I)
  334.  
  335. is equivalent to
  336.  
  337.           (4rA=3c[ 4 ]F,T),
  338.  
  339. and if the condition is true, is equivalent to
  340.  
  341.           (F,F,F,F,I),
  342.  
  343. or, if the condition is not true, is equivalent to
  344.  
  345.           (T).
  346.  
  347. The other convention is that the modifiers are evaluated in the order in
  348. which they appear in the description, perhaps.  in reverse order - the
  349. modifier immediately preceding an item definition is evaluated first,
  350. then the one next preceding, etc. This gives more flexibility of meaning
  351. to the mulitple modifiers. For example, the descriptions
  352.  
  353.           (A=3c3rC)
  354.  
  355. and
  356.  
  357.           (3rA=3cC)
  358.  
  359. are not equivalent.  In the first, only the first of the three
  360. repetitions is affected by the condition whereas in the second, ll three
  361. repetitions are affected. Since this second convention is more flexible,
  362. it shall be the one assumed. This convention allows, for example, the
  363. repetition modifier to the applied to a named item as shown:
  364.  
  365.           (3rAnC).
  366.  
  367. The name A applies to the three items (in effect, the name A is applied
  368. three times). This facility allows a name to be applied to a vertical
  369. column in a two dimensioned array by, for example, the description:
  370.  
  371.           (3r[ 3 ]C,AnC,C)
  372.  
  373.  
  374.  
  375.  
  376.                                                                 [Page 7]
  377.  
  378. which given the name A to the second column of the 3x3 array.
  379.  
  380.  
  381. Reference
  382.  
  383.     Named descriptions, or parts of descriptions, that have already been
  384. defined may be inserted into a description using the notation:
  385.  
  386.           $ specification.
  387.  
  388. Is a description, the reference is used as an item definition of a
  389. string fo item definitions. The item definitions used are those defined
  390. by the name given. Names that apply to the named item or items as a
  391. whole in the description in which it is defined are ignored by the
  392. description at which is referred. However, names that apply to parts of
  393. the named item are carried over to the description at which it is
  394. referred. For example the description
  395.  
  396.           (An(F,F),I,$A)
  397.  
  398. is equivalent to
  399.  
  400.           (An(F,F),T,(F,F)).
  401.  
  402. Notice that the name "A" was not carried over to where the description
  403. was referenced since it applied to the referred-to item or items as a
  404. whole.
  405.  
  406.     Parts of a data set or description must be able to be specified for
  407. use in a reference. This specification is in terms of the structure of
  408. the data set or description. The specification has the form of a data
  409. set name, or description name, followed by modifiers which particularize
  410. to specifications, to the part desired. The four types of modifiers are
  411. for going down a level, going up a level, going frontwards along a
  412. level, and going backwards.
  413.  
  414.     Down - To go down a level from that previously specified, the
  415. modifier has the following form:
  416.  
  417.          . item
  418.  
  419. or
  420.  
  421.          . (item |,extent| |,=value|).
  422.  
  423.  
  424. Having gone down a level, the item indicates which particular item at
  425. this level is the first (or only one) desired. This may be a number or a
  426.  
  427.  
  428.  
  429.                                                                 [Page 8]
  430.  
  431. name. If more than one are desired, then the extent indicates how many
  432. items. (* as extent means all remaining items at that level, !  means
  433. the first item that meets the conditions that may he get on it or
  434. subitems in following modifiers.) The items selected may he conditioned
  435. by their contents. If a value is given, then only those items with the
  436. value indicated are selected. For example,
  437.  
  438.           A.1.1
  439.  
  440. specifies the first field of the first record of data set A,
  441.  
  442.           A.(1*).1
  443.  
  444. specified the first field of all the records of A,
  445.  
  446.           A.1.(1,2)
  447.  
  448. specifies the first two fields of the first record of data
  449.  
  450. set A,
  451.  
  452.           A.(1,*).(1,="768174")
  453.  
  454. specified only the first fields of all the records of A that
  455.  
  456. have value "768174", and
  457.  
  458.           A.(1,!)-(1,="768174")
  459.  
  460. finds the first field that has value "768174".
  461.  
  462.     Up- To go up a level from that previously specified,
  463.  
  464. the modifier has the following form:
  465.  
  466.           ' item
  467.  
  468. or
  469.  
  470.           ' (item |,extent| |,=value|).
  471.  
  472. Going up a level specifies the item up one level that contains the item
  473. previously specified. The item indicates which particular item at this
  474. level is desired where the containing item is considered the first. For
  475. example,
  476.  
  477.           A.(1,!).(1,=768174")'1
  478.  
  479.  
  480.  
  481.  
  482.                                                                 [Page 9]
  483.  
  484. specifies the first record whose first field has value "768174".
  485.  
  486.     Forward. - To go forward on the same level as that previously
  487. specified, the modifier is as follows:
  488.  
  489.           + item
  490.  
  491. or
  492.  
  493.           + (item |,extent| |,=value|).
  494.  
  495.  
  496. This modifier is useful when an item following the one which has a
  497. certain value in a field is desired. It may also be used when the data
  498. set name is really a pointer, into the data set, which has beet set
  499. previously. Pointers may or may net be described in a section elsewhere.
  500. Backward. - To go backward on the same level as that previously
  501. specified, the modifier has the following form:
  502.  
  503.           - item
  504.  
  505. or
  506.  
  507.           - (item |,extent| |,=value|).
  508.  
  509. An example of the use of this modifier is when an item preceding the one
  510. which has a certain value in a field is desired. This might be
  511. specified:
  512.  
  513.           A.(1,!).(2,="768174")'1-1
  514.  
  515.  
  516.  
  517.  
  518.        [ This RFC was put into machine readable form for entry ]
  519.        [ into the online RFC archives Gottfried Janik   9/97   ]
  520.  
  521.  
  522.  
  523.  
  524.  
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533.  
  534.  
  535.                                                                [Page 10]
  536.  
  537.