summaryrefslogtreecommitdiffstats
path: root/doc/html/ddl.html
blob: 8405c7799be8902f22b37d5c9d1f38dca69d121f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
    <title>DDL for HDF5</title>
</head>

<body bgcolor="#FFFFFF">


<hr>
<center>
<table border=0 width=98%>
<tr><td valign=top align=left>
   <a href="H5.intro.html">Introduction to HDF5</a>&nbsp;<br>
   <a href="RM_H5Front.html">HDF5 Reference Manual</a>&nbsp;<br>
   <a href="index.html">Other HDF5 documents and links</a>&nbsp;<br>
   <!--
   <a href="Glossary.html">Glossary</a><br>
   -->
</td>
<td valign=top align=right>
   And in this document, the 
   <a href="H5.user.html">HDF5 User's Guide</a>:&nbsp;&nbsp;&nbsp;&nbsp;
      <a href="Files.html">Files</a>&nbsp;&nbsp;
      <br>
      <a href="Datasets.html">Datasets</a>&nbsp;&nbsp;
      <a href="Datatypes.html">Data Types</a>&nbsp;&nbsp;
      <a href="Dataspaces.html">Dataspaces</a>&nbsp;&nbsp;
      <a href="Groups.html">Groups</a>&nbsp;&nbsp;
      <a href="References.html">References</a>&nbsp;&nbsp;
      <br>
      <a href="Attributes.html">Attributes</a>&nbsp;&nbsp;
      <a href="Properties.html">Property Lists</a>&nbsp;&nbsp;
      <a href="Errors.html">Error Handling</a>&nbsp;&nbsp;
      <a href="Filters.html">Filters</a>&nbsp;&nbsp;
      <a href="Caching.html">Caching</a>&nbsp;&nbsp;
      <br>
      <a href="Chunking.html">Chunking</a>&nbsp;&nbsp;
      <a href="Debugging.html">Debugging</a>&nbsp;&nbsp;
      <a href="Environment.html">Environment</a>&nbsp;&nbsp;
      DDL&nbsp;&nbsp;
      <a href="Ragged.html">Ragged Arrays</a>&nbsp;&nbsp;
<!--
<hr>
And in this document, the 
<a href="H5.user.html">HDF5 User's Guide</a>:&nbsp;&nbsp;&nbsp;&nbsp;
      <a href="Attributes.html">H5A</a>&nbsp;&nbsp;
      <a href="Datasets.html">H5D</a>&nbsp;&nbsp;
      <a href="Errors.html">H5E</a>&nbsp;&nbsp;
      <a href="Files.html">H5F</a>&nbsp;&nbsp;
      <a href="Groups.html">H5G</a>&nbsp;&nbsp;
      <a href="Properties.html">H5P</a>&nbsp;&nbsp;
      <a href="References.html">H5R & H5I</a>&nbsp;&nbsp;
      <a href="Ragged.html">H5RA</a>&nbsp;&nbsp;
      <a href="Dataspaces.html">H5S</a>&nbsp;&nbsp;
      <a href="Datatypes.html">H5T</a>&nbsp;&nbsp;
      <a href="Filters.html">H5Z</a>&nbsp;&nbsp;
      <a href="Caching.html">Caching</a>&nbsp;&nbsp;
      <a href="Chunking.html">Chunking</a>&nbsp;&nbsp;
      <a href="Debugging.html">Debugging</a>&nbsp;&nbsp;
      <a href="Environment.html">Environment</a>&nbsp;&nbsp;
      <a href="ddl.html">DDL</a>&nbsp;&nbsp;
-->
</td></tr>
</table>
</center>
<hr>


<h1>DDL in BNF for HDF5</h1>


<h2>1. Introduction</h2>

This document contains the data description language (DDL) for an HDF5 file. 
The description is in Backus-Naur Form.  

<h2>2. Explanation of Symbols</h2>

This section contains a brief explanation of the symbols used in the DDL.

<PRE>
    ::=                      defined as
    &lt;tname&gt;                  a token with the name tname
    &lt;a&gt; | &lt;b&gt;                one of &lt;a&gt; or &lt;b&gt;
    &lt;a&gt;<FONT SIZE=1.7>opt</FONT>                    zero or one occurrence of &lt;a&gt;
    &lt;a&gt;*                     zero or more occurrence of &lt;a&gt;
    &lt;a&gt;+                     one or more occurrence of &lt;a&gt;
    TBD                      To Be Decided
</pre>

<h2>3. The DDL</h2>

<dir>
<pre>
&lt;file&gt; ::= HDF5 "&lt;file_name&gt;" { &lt;file_boot_block&gt;<FONT SIZE=1.7>opt</FONT> &lt;root_group&gt; }

&lt;file_name&gt; ::= &lt;identifier&gt;

&lt;file_boot_block&gt; ::= BOOT_BLOCK { &lt;boot_block_content&gt; }

&lt;boot_block_content&gt; ::= TBD

&lt;root_group&gt; ::= GROUP "/" { &lt;unamed_datatype&gt;* &lt;group_attribute&gt;* &lt;group_member&gt;* }  

&lt;unamed_datatype&gt ::= DATATYPE "&lt;unamed_type_name&gt;" { &lt;compound_type_def&gt;+ }

&lt;unamed_type_name&gt; ::= the assigned name for unamed type is in the form of 
                      #oid1:oid2, where oid1 and oid2 are the object ids of the type

&lt;compound_type_def&gt; ::=  &lt;named_scalar_type&gt; | &lt;named_array_type&gt;

&lt;named_scalar_type&gt; ::= &lt;scalar_type&gt; &lt;field_name&gt; ;

&lt;scalar_type&gt; ::= H5T_STD_I8BE | H5T_STD_I8LE | ...

&lt;field_name&gt; ::= &lt;identifier&gt;

&lt;named_array_type&gt; ::= &lt;scalar_type&gt; &lt;field_name&gt; &lt;dim_sizes&gt; ;

&lt;dim_sizes&gt; ::= dimension sizes in the form of [dimsize1][dimzise2]..., 
                where dimsize1, dimsize2 are integers

&lt;group_attribute&gt; ::= &lt;attribute&gt; 

&lt;attribute&gt; ::= ATTRIBUTE "&lt;attr_name&gt" { &lt;datatype&gt;    
                                          &lt;dataspace&gt;   
                                          &lt;data&gt;<FONT SIZE=1.7>opt</FONT>  } 
// &lt;datatype&gt; and &lt;dataspace&gt; must appear before &lt;data&gt;.

&lt;attr_name&gt; ::=  &lt;identifier&gt;

&lt;datatype&gt; ::= DATATYPE { &lt;named_type&gt; } |        
               DATATYPE { "&lt;scalar_type&gt;" }  |         
               DATATYPE { &lt;compound_type_def&gt;+ }

&lt;named_type&gt; ::= &lt;hardlink&gt;

&lt;hardlink&gt; ::= HARDLINK { "&lt;abs_name&gt;" }  

&lt;abs_name&gt; ::= object absolute name

&lt;dataspace&gt; ::= DATASPACE { "&lt;dataspace_name&gt;" } |
                DATASPACE { ARRAY &lt;current_dims&gt; &lt;max_dims&gt; } | 
                DATASPACE { OTHER &lt;ds_definition&gt;+ } 

&lt;dataspace_name&gt; ::= &lt;identifier&gt;

&lt;current_dims&gt; ::= a list of integers in the form of (<i>i<FONT SIZE=1.0>1</i></FONT>, <i>i<FONT SIZE=1.0>2</i></FONT>, ... ),
                   where <i>i<FONT SIZE=1.0>k</i></FONT> is an integer, <i>k</i> = 1,2,...

&lt;max_dims&gt; ::= (<i>i<FONT SIZE=1.0>1</i></FONT>, <i>i<FONT SIZE=1.0>2</i></FONT>, ... ) where <i>i<FONT SIZE=1.0>k</i></FONT> is an integer or H5S_UNLIMITED

&lt;ds_definition&gt; ::= TBD

&lt;data&gt; ::= data {TBD}

&lt;group_member&gt; ::= &lt;named_datatype&gt; | &lt;named_dataspace&gt; | &lt;group&gt; | &lt;dataset&gt; | 
                   &lt;softlink&gt;

&lt;named_datatype&gt; ::= DATATYPE "&lt;type_name&gt;" { &lt;compound_type_def&gt;+ }

&lt;type_name&gt; ::= "&lt;identifier&gt;"

&lt;named_dataspace&gt; ::= DATASPACE "&lt;dataspace_name&gt;" { ARRAY &lt;current_dims&gt; &lt;max_dims&gt; } |
                      DATASPACE "&lt;dataspace_name&gt;" { OTHER &lt;ds_definition&gt;+ }

&lt;group&gt; ::= GROUP "&lt;group_name&gt;" { &lt;hardlink&gt; } |
            GROUP "&lt;group_name&gt;" { &lt;group_attribute&gt;* &lt;group_member&gt;* } 
            
&lt;group_name&gt; ::= &lt;identifier&gt;

&lt;dataset&gt; ::= DATASET "&lt;dataset_name&gt;" { &lt;hardlink&gt; } |
              DATASET "&lt;dataset_name&gt;" { &lt;datatype&gt;  
                                         &lt;dataspace&gt; 
                                         &lt;storagelayout&gt;<FONT SIZE=1.7>opt</FONT>
                                         &lt;compression&gt;<FONT SIZE=1.7>opt</FONT>
                                         &lt;dataset_attribute&gt;*
                                         &lt;data&gt;<FONT SIZE=1.7>opt</FONT>  } 
// Tokens within {} can be in any order  as long as &lt;data&gt; and &lt;dataset_attribute&gt;
// are after &lt;datatype&gt; and &lt;dataspace&gt;.

&lt;dataset_name&gt; ::= &lt;identifier&gt;

&lt;storagelayout&gt; :: = STORAGELAYOUT &lt;contiguous_layout&gt;  |  
                     STORAGELAYOUT &lt;chunked_layout&gt;  | 
                     STORAGELAYOUT &lt;compact_layout&gt;  | 
                     STORAGELAYOUT &lt;external_layout&gt; 

&lt;contiguous_layout&gt; ::= {CONTIGUOUS}    // default

&lt;chunked_layout&gt; ::=  {CHUNKED &lt;dims&gt; }

&lt;dims&gt; ::= (<i>i<FONT SIZE=1.0>1</i></FONT>, <i>i<FONT SIZE=1.0>2</i></FONT>, ... ), <i>i<FONT SIZE=1.0>k</i></FONT> is an integer, <i>k</i> = 1,2,... 

&lt;compact_layout&gt; ::= TBD           

&lt;external_layout&gt; ::= {EXTERNAL &lt;external_file&gt;+ }

&lt;external_file&gt; ::= (&lt;file_name&gt; &lt;offset&gt; &lt;size&gt;) 

&lt;offset&gt; ::= an integer

&lt;size&gt; ::= an integer

&lt;compression&gt; :: = COMPRESSION { TBD }  

&lt;dataset_attribute&gt; ::= &lt;attribute&gt; 

&lt;softlink&gt; ::= SOFTLINK "&lt;softlink_name&gt;" { LINKTARGET "&lt;target&gt;" }

&lt;softlink_name&gt; ::= &lt;identifier&gt;

&lt;target&gt; ::= &lt;identifier&gt;

&lt;identifier&gt; ::= string   
// character '/' should be used with care. 

</PRE>
</dir>


<h2>4. An Example of an HDF5 File in DDL</h2>

<dir>
<PRE>
HDF5 "example.h5" {
GROUP "/" {
   DATASET "dset1" {
      DATATYPE {
         H5T_STD_I32BE int_name;
         H5T_IEEE_F32BE float_name;
         H5T_IEEE_F64BE double_name;
      }
      DATASPACE { ARRAY ( 5 ) ( 5 ) }
      DATA {{0,0,1}, {1,1,0.5}, {2,4,0.333333}, {3,9,0.25}, {4,16,0.2}}
   }
   GROUP "group1" {
      DATASET "dset2" {
         DATATYPE {
            HARDLINK { "/type1" }
         }
         DATASPACE { ARRAY ( 5 ) ( 5 ) }
         DATA {{0,0}, {1,1.1}, {2,2.2}, {3,3.3}, {4,4.4}}
      }
   }
   GROUP "group2" {
      HARDLINK { "/group1" }
   }
   SOFTLINK "slink1" {
      LINKTARGET "somevalue"
   }
   DATATYPE "type1" {
      H5T_STD_I32BE int_name;
      H5T_IEEE_F32BE float_name;
   }
}
}
</pre>
</dir>


<hr>
<center>
<table border=0 width=98%>
<tr><td valign=top align=left>
   <a href="H5.intro.html">Introduction to HDF5</a>&nbsp;<br>
   <a href="RM_H5Front.html">HDF5 Reference Manual</a>&nbsp;<br>
   <a href="index.html">Other HDF5 documents and links</a>&nbsp;<br>
   <!--
   <a href="Glossary.html">Glossary</a><br>
   -->
</td>
<td valign=top align=right>
   And in this document, the 
   <a href="H5.user.html">HDF5 User's Guide</a>:&nbsp;&nbsp;&nbsp;&nbsp;
      <a href="Files.html">Files</a>&nbsp;&nbsp;
      <br>
      <a href="Datasets.html">Datasets</a>&nbsp;&nbsp;
      <a href="Datatypes.html">Data Types</a>&nbsp;&nbsp;
      <a href="Dataspaces.html">Dataspaces</a>&nbsp;&nbsp;
      <a href="Groups.html">Groups</a>&nbsp;&nbsp;
      <a href="References.html">References</a>&nbsp;&nbsp;
      <br>
      <a href="Attributes.html">Attributes</a>&nbsp;&nbsp;
      <a href="Properties.html">Property Lists</a>&nbsp;&nbsp;
      <a href="Errors.html">Error Handling</a>&nbsp;&nbsp;
      <a href="Filters.html">Filters</a>&nbsp;&nbsp;
      <a href="Caching.html">Caching</a>&nbsp;&nbsp;
      <br>
      <a href="Chunking.html">Chunking</a>&nbsp;&nbsp;
      <a href="Debugging.html">Debugging</a>&nbsp;&nbsp;
      <a href="Environment.html">Environment</a>&nbsp;&nbsp;
      DDL&nbsp;&nbsp;
      <a href="Ragged.html">Ragged Arrays</a>&nbsp;&nbsp;
<!--
<hr>
And in this document, the 
<a href="H5.user.html">HDF5 User's Guide</a>:&nbsp;&nbsp;&nbsp;&nbsp;
      <a href="Attributes.html">H5A</a>&nbsp;&nbsp;
      <a href="Datasets.html">H5D</a>&nbsp;&nbsp;
      <a href="Errors.html">H5E</a>&nbsp;&nbsp;
      <a href="Files.html">H5F</a>&nbsp;&nbsp;
      <a href="Groups.html">H5G</a>&nbsp;&nbsp;
      <a href="Properties.html">H5P</a>&nbsp;&nbsp;
      <a href="References.html">H5R & H5I</a>&nbsp;&nbsp;
      <a href="Ragged.html">H5RA</a>&nbsp;&nbsp;
      <a href="Dataspaces.html">H5S</a>&nbsp;&nbsp;
      <a href="Datatypes.html">H5T</a>&nbsp;&nbsp;
      <a href="Filters.html">H5Z</a>&nbsp;&nbsp;
      <a href="Caching.html">Caching</a>&nbsp;&nbsp;
      <a href="Chunking.html">Chunking</a>&nbsp;&nbsp;
      <a href="Debugging.html">Debugging</a>&nbsp;&nbsp;
      <a href="Environment.html">Environment</a>&nbsp;&nbsp;
      <a href="ddl.html">DDL</a>&nbsp;&nbsp;
-->
</td></tr>
</table>
</center>


<hr>
<address>
<a href="mailto:hdfhelp@ncsa.uiuc.edu">HDF Help Desk</a>
</address>

Last modified:  30 October 1998

</body>
</html>