home *** CD-ROM | disk | FTP | other *** search
/ Programmer's ROM - The Computer Language Library / programmersrom.iso / ada / pdl / ddictusr.rno < prev    next >
Encoding:
Text File  |  1988-05-03  |  33.0 KB  |  1,081 lines

  1. .title DATA DICTIONARY USER'S MANUAL
  2. .fl bold
  3. .fl capitalize
  4. .c
  5. ^<^*Data Dictionary User's Manual\*\&
  6. .sthl 7 !no run-in format
  7. .hl1 Command Format
  8. .hl2 CREATE__DICTIONARY Command
  9. .lt
  10. -- CREATE_DICTIONARY : Create a data dictionary
  11. -- Version 2.01-1.1
  12.  
  13. procedure CREATE_DICTIONARY(
  14.    DICTIONARY : in STRING
  15.    );
  16.  
  17. -- DICTIONARY : Full directory name of dictionary to be created
  18. .el
  19. .hl2 EDIT__DICTIONARY Command
  20. .lt
  21. -- EDIT_DICTIONARY : Call the interactive dictionary editor
  22. -- Version 2.01-1.1
  23.  
  24. type TEMPLATE_NAME is (OBJECT_DECL, TYPE_DECL, PROCEDURE_DECL, FUNCTION_DECL,
  25.                        PACKAGE_DECL, TASK_DECL, EXCEPTION_DECL);
  26.  
  27. procedure EDIT_DICTIONARY(
  28.    DICTIONARY : in STRING;
  29.    TEMPLATE   : in TEMPLATE_NAME;
  30.    IDENTIFIER : in STRING        := ""
  31.    );
  32.  
  33. -- DICTIONARY : Full directory name for dictionary
  34. -- TEMPLATE   : Type of template to edit
  35. -- IDENTIFIER : Name of dictionary entry
  36. .el
  37. .hl2 UPDATE__DICTIONARY Command
  38. .lt
  39. -- UPDATE_DICTIONARY : Update data dictionary
  40. -- Version 2.01-1.1
  41.  
  42. procedure UPDATE_DICTIONARY(
  43.    DICTIONARY   : in STRING;
  44.    COMMAND_FILE : in STRING
  45.    );
  46.  
  47. -- DICTIONARY   : Full directory of dictionary to be updated
  48. -- COMMAND_FILE : Command file containing update directives
  49. .el
  50. .hl2 REPORT__DICTIONARY Command
  51. .lt
  52. -- REPORT_DICTIONARY : Produce report from data dictionary
  53. -- Version 2.01-1.1
  54.  
  55. type REPORT_NAME is (SUMMARY, FULL, COMMAND_FILE);
  56.  
  57. procedure REPORT_DICTIONARY(
  58.    DICTIONARY : in STRING;
  59.    REPORT     : in REPORT_NAME := SUMMARY;
  60.    ENTRIES    : in STRING      := "";
  61.    ENTRY_FILE : in STRING      := "";
  62.    OUTPUT     : in STRING      := ""
  63.    );
  64.  
  65. -- DICTIONARY : Full directory name of dictionary to report
  66. -- REPORT     : Which kind of report to produce
  67. -- ENTRIES    : Entries in dictionary from which to produce report
  68. --              (If Entries = "" and Entry_File = "" then entire
  69. --              dictionary is reported on)
  70. -- ENTRY_FILE : File containing entries in dictionary on which to report
  71. -- OUTPUT     : Output file for report (default is standard output)
  72. .el
  73. .hl1 Description
  74. .hl2 Introduction
  75. .p
  76. The data dictionary provides a means of entering and updating incomplete
  77. Ada declarations.  Before any of the other operations listed above in Section 1
  78. may be performed,
  79. the user must create a data dictionary with the CREATE__DICTIONARY command.
  80. After a dictionary is created, the other commands given above may be issued.  
  81. The EDIT__DICTIONARY command provides an interactive means of entering and 
  82. updating dictionary entries.  The UPDATE__DICTIONARY command allows the user to
  83. enter and update items in the dictionary in a non-interactive mode.  Finally, 
  84. the REPORT__DICTIONARY command allows the user to obtain different reports on 
  85. the entries in the dictionary.  The command format for any of the data 
  86. dictionary tools may be obtained by invoking the tool with no parameters.
  87. Each command is described in detail below.
  88. .pg
  89. .hl2 Creation \of \a Data Dictionary
  90. .b
  91. .lt
  92. -- CREATE_DICTIONARY : Create a data dictionary
  93. -- Version 2.01-1.1
  94.  
  95. procedure CREATE_DICTIONARY(
  96.    DICTIONARY : in STRING
  97.    );
  98.  
  99. -- DICTIONARY : Full directory name of dictionary to be created
  100. .el
  101. .p
  102. Creates a new data dictionary with the name DICTIONARY__NAME.  For example,
  103. entering the command
  104. .b
  105. .lt
  106.     CREATE_DICTIONARY("[.mydict]"); 
  107. .el
  108. .b
  109. on a VMS system
  110. would create a data dictionary with the name "mydict.dir" in the current
  111. directory.  Note that the "[]" notation for file specifications in this example
  112. is the VMS directory specification notation.  On another system, the notation
  113. appropriate for directory specifications on that system should be used.
  114. .hl2 Interactive Data Entry \and Editing
  115. .b
  116. .lt
  117. -- EDIT_DICTIONARY : Call the interactive dictionary editor
  118. -- Version 2.01-1.1
  119.  
  120. type TEMPLATE_NAME is (OBJECT_DECL, TYPE_DECL, PROCEDURE_DECL, FUNCTION_DECL,
  121.                        PACKAGE_DECL, TASK_DECL, EXCEPTION_DECL);
  122.  
  123. procedure EDIT_DICTIONARY(
  124.    DICTIONARY : in STRING;
  125.    TEMPLATE   : in TEMPLATE_NAME;
  126.    IDENTIFIER : in STRING        := ""
  127.    );
  128.  
  129. -- DICTIONARY : Full directory name for dictionary
  130. -- TEMPLATE   : Type of template to edit
  131. -- IDENTIFIER : Name of dictionary entry
  132. .el
  133. .pg
  134. .hl3 Description
  135. .p
  136. Entries in the data dictionary may be entered and updated by 
  137. selecting and editing on-screen template forms.  The editor provides templates
  138. for declarations of the following:
  139. .lm27
  140. .b
  141. OBJECT__DECL
  142. .br;TYPE__DECL
  143. .br;PROCEDURE__DECL
  144. .br;FUNCTION__DECL
  145. .br;PACKAGE__DECL
  146. .br;TASK__DECL
  147. .br;EXCEPTION__DECL
  148. .b
  149. .lm0
  150. Each
  151. template fits on one screen.  The exact appearance of each template can be 
  152. found in Appendix A.  The user enters new data by selecting a template
  153. and filling out the fields (shown on the screen enclosed by angle brackets) 
  154. using the editing
  155. commands described below.  Existing dictionary entries
  156. may be updated by selecting an entry, which is defined by a template type 
  157. and an
  158. identifier, and using
  159. editing commands to change it.  When an existing entry is selected, it is
  160. displayed on the screen as a template which has been filled out.  Fields
  161. containing the null string will be displayed as a field label enclosed
  162. in angle brackets.
  163. For filled out fields, the display will show the text contained
  164. in the field.
  165. .p
  166. All templates contain the following three special fields: _<ident>, 
  167. _<overload> and _<syn>.
  168. .p
  169. The _<ident>
  170. field, which is always the first field in the template, is the name of
  171. the dictionary entry.  This field must always be filled out in order
  172. to create an entry.  The name which appears in the _<ident> field, when
  173. specified in conjunction with a template type, identifies the entry
  174. for all the data dictionary tools.
  175. .p
  176. Entries in the dictionary may be overloaded.  If more than one entry of
  177. a particular template type has the same name (_<ident>), the _<overload> field
  178. distinguishes each instance of the name.  Therefore, the _<overload> field
  179. must be filled out in order to create more than one entry of a particular
  180. template type with the same name.
  181. The _<overload> field should contain a short
  182. explanation of what makes this entry unique from the other entries
  183. with the same _<ident>,
  184. rather than a description of the  _<ident>. 
  185. .p
  186. The _<syn> field
  187. also appears in every template.  This field is used
  188. to express that this entry is a synonym for an Ada declaration 
  189. which has already been coded, although the Ada declaration
  190. might have a different name.
  191. For example, one might have a TYPE__DECL entry called "Tree__Type" in the
  192. dictionary which corresponds to a type declaration called "Labeled__Tree" in an
  193. Ada subprogram.  One could enter "Labeled__Tree" in the _<syn> field for
  194. the dictionary entry "Tree__Type" in order to show that the two refer to
  195. the same data structure.
  196. .hl3 Editing Commands
  197. .p
  198. Editing commands may be entered at the field prompt.  Only enough of a command
  199. to distinguish it from other commands must be typed.  The list of commands is 
  200. given below, followed by a detailed description of each command.  In the 
  201. description of each command, square brackets "[]" indicate an optional part
  202. of the command, capital letters and special characters indicate literal 
  203. commands that the user must type,
  204. and small letters indicate user-supplied input.  The commands are as follows:
  205. .b
  206. .lm20
  207. ED[IT] template-type [identifier]
  208. .br;+&nL[INES]
  209. .br;-&nL[INES]
  210. .br;&nL[INE]
  211. .br;+&n[FIELDS]
  212. .br;-&n[FIELDS]
  213. .br;&nF[IELD]
  214. .br;_<fieldname>
  215. .br;_&text
  216. .br;/oldstring/newstring[/]
  217. .br;H[ELP]
  218. .br;CR[EATE]
  219. .br;U[PDATE]
  220. .br;D[ELETE] template-type identifier
  221. .br;S[HOW] template-type identifier
  222. .br;EX[IT]
  223. .br;CO[MMANDS]
  224. .br;R[EFRESH]
  225. .b
  226. .lm0
  227. .p
  228. Occasionally, messages are displayed on the screen.
  229. The message line is the last line on the screen.
  230. There are four types of messages: messages prefixed by "INFO:" are just 
  231. informational messages,
  232. messages prefixed by "ERROR:" are error messages and indicate that the 
  233. command typed could not be completed successfully, 
  234. messages prefixed by "HELP:" indicate what should be typed into a particular
  235. field,
  236. and messages prefixed by "WARNING:" are warnings to the user that although the
  237. command typed was completed successfully, the result may not be what was
  238. intended.
  239. .hl4 ED[IT] \template-type [identifier]
  240. .p
  241. Displays a template on the screen for editing. 
  242. If only the ^&template-type\& is
  243. given, an empty template is displayed on the screen.  If both ^&template-type\&
  244. and ^&identifier\& are given, a template filled out with the data corresponding
  245. to ^&identifier\& is displayed.
  246. If the user requests a ^&template-type\& and ^&identifier\& which is overloaded
  247. (see Section 2.3.1),
  248. a list of the overloads is displayed as a numbered menu from which
  249. the user may select the desired entry.
  250. This command is 
  251. functionally similar to invoking the editor from the command line
  252. (see Section 2.3.3). 
  253. The prompt when a template is first displayed appears as:
  254. .b
  255. .lt
  256. <ident>:
  257. .el
  258. .b
  259. While editing, the prompt always indicates the current field.  
  260. .p
  261. The next six commands are used to move around (change the current field)
  262. within the template.  For these commands,
  263. &n is a numeric argument which defaults to 1 if not explicitly specified.
  264. The user cannot go beyond the first field on the screen or the
  265. last field on the screen (i.e. there is no "wraparound.")
  266. .hl4 +&nLINES
  267. .p
  268. The first field on the line &n lines 
  269. from the current line becomes the current field.
  270. .hl4 -&nLINES
  271. .p
  272. The first field on the line &n lines 
  273. from the current line becomes the current field.
  274. .hl4 &\nLINE
  275. .p
  276. The first field on the &nth line on the screen becomes
  277. the current field.  If &n is larger than
  278. the number of lines, the first field on the last line becomes the current field.
  279. .hl4 +&n[FIELDS]
  280. .p
  281. The field &n fields from the current field becomes the current field.
  282. A carriage return may be used instead of +1[FIELDS] in order to move to
  283. the next field.
  284. .hl4 -&n[FIELDS]
  285. .p
  286. The field &n fields before the current field becomes the current field.
  287. .hl4 &\nF[IELD]
  288. .p
  289. The &nth field becomes the current field.
  290. If &n is larger than the number of fields, the last field becomes the
  291. current field.
  292. .hl4 _<fieldname>
  293. .p
  294. ^&Fieldname\& becomes the current field,
  295. if ^&fieldname\& exists.  Otherwise, the current field does not change.
  296. The exact fieldname must be entered.
  297. .hl4 _&text
  298. .p
  299. Enters ^&text\& into the current field.
  300. If the field is already filled out, it is overwritten.  A 
  301. carriage return terminates ^&text\&.  
  302. Omitting the ^&text\& inserts the null string into the current field.
  303. The current field becomes the next field after insertion.
  304. .hl4 /oldstring/newstring[/]
  305. .p
  306. Substitutes newstring for oldstring in the current
  307. field.  If one of the strings contains a "/" it must be
  308. escaped by a "_'".  The escape character "_'" may also be escaped by
  309. itself ("_'_'").  For example, to change the text "3/25/85" to
  310. "3.25.85" the command "/3_'/25_'/85/3.25.85" would be entered.  To change
  311. the text "a_'b" to "ab" the command /a_'_'b/ab/ would be entered.  The
  312. closing "/" is optional.
  313. .hl4 H[ELP]
  314. .p
  315. Displays help for the current
  316. field.  There is a help message associated with each field
  317. in the template, and it consists of one line describing what should be entered
  318. in that field.
  319. .hl4 CR[EATE]
  320. .p
  321. Creates a new entry from the current template.
  322. If an entry with this name already exists, the user must fill 
  323. out the _<overload> field in order that a new declaration with the same 
  324. name is entered into the dictionary.  Note that what to enter into this field
  325. is up to the discretion of the user, as the EDIT__DICTIONARY tool does not
  326. enforce that two overload
  327. fields must be different.
  328. .hl4 U[PDATE]
  329. .p
  330. Updates the dictionary entry being edited by saving any changes made.
  331. .hl4 D[ELETE] \template-type \identifier
  332. .p
  333. Deletes data dictionary entry ^&identifier\& of type
  334. ^&template-type\&.  If there is more than one entry with this name, the user
  335. must select the entry desired from a numbered menu which lists the contents
  336. of the _<overload> field for each instance of the ^&identifier\&
  337. in the dictionary.
  338. .hl4 S[HOW] \template-type \identifier
  339. .p
  340. Displays a list of all the entries with name ^&identifier\& for
  341. ^&template-type\& along with the _<overload> field for each.
  342. .hl4 EX[IT]
  343. .p
  344. Exits from the data dictionary editor.  If the current template has been
  345. modified, the user is prompted for whether or not to save the changes.
  346. .hl4 CO[MMANDS]
  347. .p
  348. Displays a list of all editing commands and available template types.
  349. .p
  350. .hl4 R[EFRESH]
  351. .p
  352. Refreshes the display on the screen.  This command is useful to get rid
  353. of extraneous characters on the screen.
  354. .hl3 Examples
  355. .p
  356. The editor is invoked with the EDIT__DICTIONARY command, whose format is given 
  357. in Section 2.3.
  358. If IDENTIFIER => "" (the default), then a blank template of the type given in
  359. the TEMPLATE parameter is displayed on the screen.  
  360. Otherwise, a template filled out
  361. with the information corresponding to IDENTIFIER is displayed.
  362. For example, the command
  363. .b
  364. .lt
  365.     EDIT_DICTIONARY("[.mydict]", FUNCTION_DECL, "abc");
  366. .el
  367. .b
  368. specifies that the function declaration called abc in dictionary [.mydict]
  369. is to be
  370. edited.  The editor is invoked and the dictionary entry for function
  371. declaration abc is displayed on the screen as a filled out function template.
  372. If function abc does not exist, a warning message is given and a blank
  373. template, with _<ident> field filled out as abc is displayed on the
  374. screen for the user to edit.
  375. .b
  376. The command
  377. .b
  378. .lt
  379.     EDIT_DICTIONARY("[.mydict]", FUNCTION_DECL);
  380. .el
  381. .b
  382. would result in displaying the following screen:
  383. .b
  384. .lt
  385. Function Declaration
  386.      
  387. function <ident>                   ( -- <overload>
  388.     <1.param>                        -- <1.comm>
  389.     <2.param>                        -- <2.comm>
  390.     <3.param>                        -- <3.comm>
  391.     <4.param>                        -- <4.comm>
  392.     ) return <type>
  393.      
  394. -- Synonym: <syn>
  395. -- <date>                       <author>
  396.      
  397. -- <1.desc>
  398. -- <2.desc>
  399. -- <3.desc>
  400. -- <4.desc>
  401. -- <5.desc>
  402. -- <6.desc>
  403. -- <7.desc>
  404. -- <8.desc>
  405.  
  406.  
  407. <ident>:
  408.  
  409. .el
  410. .b
  411. At this point, the user might want to delete object declaration b from the
  412. dictionary.  He would enter the following command at the prompt:
  413. .b
  414. .lt
  415. <ident>: delete object_decl b
  416. .el
  417. .pg
  418. If more than one occurrence of object declaration b appears in the dictionary,
  419. the user will be presented with a menu, such as the following:
  420. .b
  421. .lt
  422. Overloads for OBJECT_DECL b
  423.  
  424.  1 : takes string parameter
  425.  2 : takes string_type parameter
  426.  
  427.  
  428.  
  429.  
  430.  
  431.  
  432.  
  433.  
  434.  
  435.  
  436.  
  437.  
  438.  
  439.  
  440.  
  441.  
  442.  
  443.  
  444. Enter choice (* to abort):
  445.  
  446. .el
  447. .b
  448. When the user selects the appropriate instance of b, that instance of b is
  449. deleted from the dictionary.
  450. .hl2 Non-Interactive Data Entry
  451. .b
  452. .lt
  453. -- UPDATE_DICTIONARY : Update data dictionary
  454. -- Version 2.01-1.1
  455.  
  456. procedure UPDATE_DICTIONARY(
  457.    DICTIONARY   : in STRING;
  458.    COMMAND_FILE : in STRING
  459.    );
  460.  
  461. -- DICTIONARY   : Full directory name of dictionary to be updated
  462. -- COMMAND_FILE : Command file containing update directives
  463. .el
  464. .hl3 Description
  465. .p
  466. This command makes it possible to enter and update declarations in
  467. the dictionary in a non-interactive mode.  The format for COMMAND__FILE is 
  468. specified below.  In the 
  469. description of each command's format, square brackets "[]" indicate an 
  470. optional part
  471. of the command, capital letters and special characters indicate literal 
  472. commands that the user must type,
  473. and small letters indicate user-supplied input.
  474. .hl3 Command File Format
  475. .p
  476. Three types of commands may be entered in the command file: CREATE, UPDATE
  477. and DELETE.  CREATE causes a new instance of
  478. ^&template-type\& ^&identifier\& to be entered into the dictionary, and
  479. UPDATE causes a dictionary entry ^&template-type\& ^&identifier\&
  480. to be updated (i.e. overwritten).  DELETE deletes dictionary entry
  481. ^&template\& ^&identifier\&.
  482. .b
  483. The format for the CREATE command is as follows:
  484. .b
  485. C[REATE] template-type identifier
  486. .br;_<fieldname>contents
  487. .br;_<fieldname>contents
  488. .br;  .
  489. .br;  .
  490. .br;  .
  491. .b
  492. It is not necessary to have a _<fieldname>contents entry in the command 
  493. file for
  494. each field in the template.  To fill out only one field in a template,
  495. only one line containing that _<fieldname> and its contents 
  496. need be entered after the CREATE command.
  497. .b
  498. If an instance of ^&identifier\& is already in the dictionary and the
  499. _<overload> field has not been specified, the _<overload> field
  500. field is filled out with ^&source file name\&, ^&line number\& in order
  501. to distinguish it from other overloads.
  502. .b
  503. The format for the UPDATE command is as follows:
  504. .b
  505. U[PDATE] template-type identifier [occurrence]
  506. .br;_<fieldname>contents
  507. .br;_<fieldname>contents
  508. .br;  .
  509. .br;  .
  510. .br;  .
  511. .b
  512. As with the CREATE command, it is not necessary to have an entry for every
  513. field in the template.
  514. .b
  515. If ^&template-type\& ^&identifier\& is overloaded, ^&occurrence\& may
  516. be used to specify which occurrence to update.  ^&Occurrence\& is an integer.
  517. .b 
  518. The format of the delete command is as follows:
  519. .b
  520. DELETE template-type identifier [occurence]
  521. .b
  522. Once again, if ^&template-type\& ^&identifier\& is overloaded, 
  523. an integer ^&occurrence\& may be used to specify which occurrence to update.
  524. .b
  525. WARNING: When an entry is deleted, the ^&occurrence\& number for a particular
  526. entry may change.  For example, if there are five object declarations in the
  527. data dictionary called "x," and the user wishes to delete occurrences one 
  528. through four, he should enter either of the following two sequences of commands
  529. in his command file:
  530. .b
  531. .lt
  532.     d object_decl x 1
  533.     d object_decl x 1
  534.     d object_decl x 1
  535.     d object_decl x 1
  536. .el
  537. .b
  538. .lt
  539.     d object_decl x 4
  540.     d object_decl x 3
  541.     d object_decl x 2
  542.     d object_decl x 1
  543. .el
  544. .b
  545. Entering the commands
  546. .b
  547. .lt
  548.     d object_decl x 1
  549.     d object_decl x 2
  550.     d object_decl x 3
  551.     d object_decl x 4
  552. .el
  553. .b
  554. will NOT result in deleting the first four occurrences of object declaration
  555. x.
  556. .hl3 Examples
  557. .b
  558. The command
  559. .b
  560. .lt
  561.     UPDATE_DICTIONARY("[.mydict]", "commands.in");
  562. .el
  563. .b
  564. would read the file commands.in and update dictionary [.mydict] accordingly.
  565. The command file may be generated by running the REPORT__DICTIONARY tool with
  566. REPORT => COMMAND__FILE and editing the resulting output
  567. to form the desired command file for input to the UPDATE__DICTIONARY tool.
  568. For example, a file containing
  569. .b
  570. .lt
  571. update function_decl foo
  572. <4.param>a : integer;
  573. <4.comm>an example param. comment
  574. cr type_decl t
  575. <1.desc>An example type.
  576. .el
  577. .b
  578. would specify that function foo is to be updated, changing the specified 
  579. fields, and that a new type t is to be entered.
  580. .hl2 Data Dictionary Item Report
  581. .b
  582. .lt
  583. -- REPORT_DICTIONARY : Produce report from data dictionary
  584. -- Version 2.01-1.1
  585.  
  586. type REPORT_NAME is (SUMMARY, FULL, COMMAND_FILE);
  587.  
  588. procedure REPORT_DICTIONARY(
  589.    DICTIONARY : in STRING;
  590.    REPORT     : in REPORT_NAME := SUMMARY;
  591.    ENTRIES    : in STRING      := "";
  592.    ENTRY_FILE : in STRING      := "";
  593.    OUTPUT     : in STRING      := ""
  594.    );
  595.  
  596. -- DICTIONARY : Full directory name of dictionary to report
  597. -- REPORT     : Which kind of report to produce
  598. -- ENTRIES    : Entries in dictionary from which to produce report
  599. --              (If Entries = "" and Entry_File = "" then entire
  600. --              dictionary is reported on)
  601. -- ENTRY_FILE : File containing entries in dictionary on which to report
  602. -- OUTPUT     : Output file for report (default is standard output)
  603. .el
  604. .hl3 Description
  605. .p
  606. The report tool can produce three kinds of reports: SUMMARY, FULL and 
  607. COMMAND__FILE.  The SUMMARY report is a sorted list of data dictionary
  608. items organized by the templates they are associated with.
  609. The FULL report shows the actual contents of the selected dictionary entries.
  610. The COMMAND__FILE report generates a command file which can be edited and
  611. processed by the UPDATE__DICTIONARY command.  For all three reports, the
  612. user may select which entries to include in the report by using the ENTRIES
  613. and ENTRY__FILE parameters.
  614. .hl3 Format \for Entries \and Entry__File
  615. .p
  616. In the 
  617. description of each format, square brackets "[]" denote optional parts and
  618. small letters indicate user-supplied input.
  619. .b
  620. The ENTRIES parameter has the form:
  621. .b
  622. .lt
  623.           template-type [identifier identifier ...]
  624. .el
  625. .b
  626. This parameter selects the dictionary entries to include in the report.
  627. Entries may also be selected in the file given as the ENTRY__FILE
  628. parameter,
  629. which contains lines which have the same format as the ENTRIES 
  630. parameter.  Both means of selection are provided so that the user can
  631. keep a large number of selections in a file, but still select a small
  632. number of entries on the command line.  If both ENTRIES and ENTRY__FILE
  633. are null (""), which is the default, then all entries in the data dictionary
  634. will be included in the report.
  635. .hl3 Examples
  636. .p
  637. The REPORT__DICTIONARY command is invoked according to the format given in
  638. section 2.5.
  639. .b
  640. The command
  641. .b
  642. .lt
  643.     REPORT_DICTIONARY("[.mydict]", ENTRIES=>"function_decl a b xxx");
  644. .el
  645. .b
  646. specifies that a summary report (the default report type) is to be generated
  647. from the functions a, b and xxx and written on the standard
  648. output (the default output file).
  649. .p
  650. If the list of identifiers (^&identifier\& ^&identifier\& ...) is omitted,
  651. the report will contain all entries of the specified
  652. ^&template-type\&.  For example,
  653. .b
  654. .lt
  655.     REPORT_DICTIONARY("[.mydict]", Entries=>"FUNCTION_DECL");
  656. .el
  657. .b
  658. specifies that a summary report is to be generated for all functions in the 
  659. dictionary.
  660. .b
  661. The command
  662. .b
  663. .lt
  664.     REPORT_DICTIONARY("[.mydict]", FULL, "TASK_DECL", "entries.txt");
  665. .el
  666. .b
  667. specifies that a full report is to be generated including all task declarations
  668. in the dictionary and all declarations specified in the entry file 
  669. entries.txt.
  670. .pg
  671. The command
  672. .b
  673. .lt
  674.     REPORT_DICTIONARY("[.mydict]", SUMMARY);
  675. .el
  676. .b
  677. for a dictionary containing three unique object declarations and two
  678. function declarations, one overloaded, would produce the following
  679. summary report:
  680. .b
  681. .lt
  682. Data Dictionary Report Output on 01/12/86 at 19:59:42                 1
  683.  
  684.  
  685.  
  686.  
  687.  
  688. OBJECT_DECL Entries:
  689.  
  690.     a
  691.  
  692.     Index_Table
  693.         
  694.     Index_Tree
  695.         
  696.  
  697.  
  698. FUNCTION_DECL Entries:
  699.  
  700.     afunction
  701.  
  702.     Second_Function
  703.         takes string parameter
  704.         takes string_type parameter
  705.         
  706. .el
  707. .pg
  708. The command
  709. .b
  710. .lt
  711.     REPORT_DICTIONARY("[.mydict]", FULL, "FUNCTION_DECL afunction");
  712. .el
  713. .b
  714. would produce the following full report:
  715. .b
  716. .lt
  717. Data Dictionary Report Output on 01/13/86 at 15:32:10                 1
  718.  
  719.  
  720.  
  721.  
  722.  
  723. Function Declaration
  724.  
  725. function afunction                ( -- <overload>
  726.     first_param : integer;          -- first parameter
  727.     second_param : boolean;         -- second parameter
  728.     <3.param>                       -- <3.comm>
  729.     <4.param>                       -- <4.comm>
  730.     ) return string;
  731.  
  732. -- Synonym: <syn>
  733. -- 1/1/86                      Carol
  734.  
  735. -- This is an example function in the dictionary
  736. -- This is line two in the description of this function
  737. -- <3.desc>
  738. -- <4.desc>
  739. -- <5.desc>
  740. -- <6.desc>
  741. -- <7.desc>
  742. -- <8.desc>
  743. .el
  744. .b
  745. .hl1 How to Recover from Unexpected Situations
  746. .p
  747. This section describes what to do when something unexpected happens when
  748. running one of the data dictionary tools.
  749. .p
  750. A user may not be able to open a data dictionary created with an older version
  751. of the CREATE__DICTIONARY tool.
  752. A dictionary created with an older version of CREATE__DICTIONARY
  753. will be incompatible with a newer version of the tools 
  754. if
  755. the new version of the tool involves any changes to the template forms.  
  756. To get a tool's
  757. version number, run it without any parameters.  To get a dictionary's version
  758. number, examine the contents of the file VERSION. in the dictionary.
  759. .p
  760. A user might not be able to access a dictionary because
  761. of incorrect protections on the dictionary files.  All dictionary files
  762. are created with the user's default protections at the time that
  763. the CREATE__DICTIONARY command is run.  
  764. If a dictionary cannot be accessed because of incorrect protections, the
  765. protections on the file can be changed appropriately.
  766. The following is a list of the files in the dictionary directory and what 
  767. types of protections are necessary:
  768. .b
  769. .lt
  770.     all files ending in ".INX" or ".DAT" - read and write permission
  771.     VERSION.                             - read and write permission
  772.     UNLOCKED.LCK                         - read permission 
  773. .el
  774. .p
  775. The dictionary might be left in a locked state due to
  776. an untrappable interrupt, system crash, or some other reason.
  777. If the dictionary is
  778. locked, but nobody is really accessing it, it can be unlocked by
  779. renaming the file in the dictionary called LOCKED.LCK to UNLOCKED.LCK.
  780. This renaming should only be done in situations where it is absolutely
  781. certain that nobody else is accessing the dictionary files.
  782. .p
  783. If the lock file is somehow accidentally deleted, it can be restored by 
  784. creating a file in the dictionary directory called UNLOCKED.LCK.
  785. .hl1 System Peculiarities
  786. .p
  787. It is suggested that command line editing, as supported by VMS 4.0, be used 
  788. only with extreme caution.  VMS 4.0 supports command line editing with 
  789. control keys such as
  790. CTRL/X, CTRL/H, CTRL/U, up arrow, etc.  While these will still work inside
  791. the Edit__Dictionary editor, the screen display might not be accurately
  792. updated.  For example, the prompt line might be overwritten while
  793. using one of the VMS editing keys.
  794. .hl1 Rehostability
  795. .p
  796. Host dependent subprograms are isolated in the packages Host__Lib and 
  797. File__Manager.  The bodies of these packages must be modified in order to
  798. rehost the data dictionary tools.  In addition, the body for package
  799. Terminal__IO may be modified to support additional terminal types (currently,
  800. VT100 and VT52 compatible terminals are supported).  For additional information
  801. on building the data dictionary tools, see Appendix B.
  802. .ax Templates
  803. .hl1 object declaration
  804. .b
  805. .lt
  806. Object, Constant or Number Declaration
  807.      
  808. <ident>                       : -- <overload>
  809.     <type>
  810.         := <expr>
  811.      
  812. -- Synonym: <syn>           
  813. -- <date>                       <author>
  814.                            
  815. -- <1.desc>
  816. -- <2.desc>
  817. -- <3.desc>
  818. -- <4.desc>
  819. -- <5.desc>
  820. -- <6.desc>
  821. -- <7.desc>
  822. -- <8.desc>
  823. -- <9.desc>
  824. -- <10.desc>
  825.      
  826.  
  827. .el
  828. .pg
  829. .hl1 type declaration
  830. .b
  831. .lt
  832. Type Declaration
  833.      
  834. type <ident>                    is -- <overload>
  835.     <1.def>
  836.     <2.def>
  837.     <3.def>
  838.     <4.def>
  839.     <5.def>
  840.     <6.def>
  841.     <7.def>
  842.     <8.def>
  843.  
  844. -- Synonym: <syn>
  845. -- <date>                       <author>
  846.  
  847. -- <1.desc>
  848. -- <2.desc>
  849. -- <3.desc>
  850. -- <4.desc>
  851. -- <5.desc>
  852. .el
  853. .pg
  854. .hl1 procedure declaration
  855. .b
  856. .lt
  857. Procedure Declaration
  858.      
  859. procedure <ident>                  ( -- <overload>
  860.     <1.param>                        -- <1.comm>
  861.     <2.param>                        -- <2.comm>
  862.     <3.param>                        -- <3.comm>
  863.     <4.param>                        -- <4.comm>
  864.     );
  865.      
  866. -- Synonym: <syn>
  867. -- <date>                       <author>
  868.      
  869. -- <1.desc>
  870. -- <2.desc>
  871. -- <3.desc>
  872. -- <4.desc>
  873. -- <5.desc>
  874. -- <6.desc>
  875. -- <7.desc>
  876. -- <8.desc>
  877. .el
  878. .pg
  879. .hl1 function declaration
  880. .b
  881. .lt
  882. Function Declaration
  883.      
  884. function <ident>                   ( -- <overload>
  885.     <1.param>                        -- <1.comm>
  886.     <2.param>                        -- <2.comm>
  887.     <3.param>                        -- <3.comm>
  888.     <4.param>                        -- <4.comm>
  889.     ) return <type>
  890.      
  891. -- Synonym: <syn>
  892. -- <date>                       <author>
  893.      
  894. -- <1.desc>
  895. -- <2.desc>
  896. -- <3.desc>
  897. -- <4.desc>
  898. -- <5.desc>
  899. -- <6.desc>
  900. -- <7.desc>
  901. -- <8.desc>
  902. .el
  903. .pg
  904. .hl1 package declaration
  905. .b
  906. .lt
  907. Package Declaration
  908.      
  909. package <ident>                 is -- <overload>
  910. -- <comment>
  911.      
  912. -- Synonym: <syn>
  913. -- <date>                       <author>
  914.      
  915. -- <1.desc>
  916. -- <2.desc>
  917. -- <3.desc>
  918. -- <4.desc>
  919. -- <5.desc>
  920. -- <6.desc>
  921. -- <7.desc>
  922. -- <8.desc>
  923. -- <9.desc>
  924. -- <10.desc>
  925.  
  926. end;
  927. .el
  928. .pg
  929. .hl1 task declaration
  930. .lt
  931. Task Declaration
  932.  
  933. task <ident>                    is -- <overload>
  934. -- <comment>
  935.     entry <1.decl>                 -- <1.comm>
  936.     entry <2.decl>                 -- <2.comm>
  937.     entry <3.decl>                 -- <3.comm>
  938.     entry <4.decl>                 -- <4.comm>
  939. end;
  940.      
  941. -- Synonym: <syn>
  942. -- <date>                       <author>
  943.      
  944. -- <1.desc>
  945. -- <2.desc>
  946. -- <3.desc>
  947. -- <4.desc>
  948. -- <5.desc>
  949. -- <6.desc>
  950. -- <7.desc>
  951. .el
  952. .pg
  953. .hl1 exception declaration
  954. .b
  955. .lt
  956. Exception Declaration
  957.      
  958. <ident>                       : -- <overload>
  959.     exception;
  960.      
  961. -- Synonym: <syn>
  962. -- <date>                       <author>
  963.      
  964. -- <1.desc>
  965. -- <2.desc>
  966. -- <3.desc>
  967. -- <4.desc>
  968. -- <5.desc>
  969. -- <6.desc>
  970. -- <7.desc>
  971. -- <8.desc>
  972. -- <9.desc>
  973. -- <10.desc>
  974.      
  975.      
  976. .el
  977. .ax Building the Data Dictionary Tools
  978. .lt
  979.  
  980. To build the data dictionary tools:
  981.  
  982.  1. Compile all the abstractions into a program library (see READ.ME in
  983.     abstractions directory for details).
  984.  
  985.  2. Compile everything named in the DATADICT.CO file into the program library
  986.     containing the abstractions or a sublibrary whose parent library contains 
  987.     all the abstractions.  DATADICT.CO lists file names in the correct 
  988.     compilation order.
  989.  
  990.  3. Link Create_Dictionary_Driver, Edit_Dictionary_Driver, 
  991.     Update_Dictionary_Driver and Dictionary_Report_Driver with the program
  992.     library where everything was compiled.  To do this using the DEC Ada
  993.     compiler type:
  994.  
  995.     $ acs link create_dictionary_driver
  996.     $ acs link edit_dictionary_driver
  997.     $ acs link update_dictionary_driver
  998.     $ acs link dictionary_report_driver
  999.  
  1000. To run the tool on VMS:
  1001.  
  1002.  1. Define logical symbol for the executables of the data dictionary tools.
  1003.     For example,
  1004.  
  1005.     CREATE_DD :== $DRB1:[NOSC.TOOLS.DATADICT]CREATE_DICTIONARY_DRIVER.EXE
  1006.     EDIT_DD   :== $DRB1:[NOSC.TOOLS.DATADICT]EDIT_DICTIONARY_DRIVER.EXE
  1007.     UPDATE_DD :== $DRB1:[NOSC.TOOLS.DATADICT]UPDATE_DICTIONARY_DRIVER.EXE
  1008.     REPORT_DD :== $DRB1:[NOSC.TOOLS.DATADICT]DICTIONARY_REPORT_DRIVER.EXE
  1009.  
  1010.      NOTE: The full path name of the executable is required in the 
  1011.      definition of the symbol.   The pathname given here is just an example
  1012.      and will be different on your system.
  1013.  
  1014.  2. Enter a command with appropriate parameters.  For example,
  1015.  
  1016.     CREATE_DD ("[.mydict]");
  1017.  
  1018.     Entering any of the commands with no parameters gives a brief
  1019.     description of how to use the tool.
  1020.  
  1021. Files contained in this directory:
  1022.  
  1023. DATADICT.CO  -- Compilation order for data dictionary sources
  1024. CDRIVER.EXE  -- VMS 4.0 Create_Dictionary executable
  1025. EDRIVER.EXE  -- VMS 4.0 Edit_Dictionary executable
  1026. UDRIVER.EXE  -- VMS 4.0 Update_Dictionary executable
  1027. RDRIVER.EXE  -- VMS 4.0 Dictionary_REPORT executable
  1028. DATADICT.CNT -- Ada source statement count
  1029. READ.ME      -- This file
  1030.  
  1031. The [.SOURCE] subdirectory contains most of the sources that make up the 
  1032. data dictionary tools.  Other sources are contained in the abstractions
  1033. directory.
  1034.  
  1035. Files in [.SOURCE]:
  1036.  
  1037.     The source files which make up the data dictionary tools are as follows:
  1038.  
  1039.     RELEASE.BDY    -- Contains the version number of the data dictionary tools
  1040.     SSTRINGS.SPC   -- Screen Strings package (spec) 
  1041.     TEMPLATES.SPC  -- All templates and operations on them (spec)
  1042.     DICTMGR.SPC    -- Subprograms to manipulate data dictionary
  1043.                       entries (spec)
  1044.     CDRIVER.ADA    -- Driver for Create_Dictionary tool
  1045.     SCREENMGR.SPC  -- Subprograms to manage placement of templates and data on
  1046.                       the screen (spec)
  1047.     COMMANDS.SPC   -- Subprograms to handle all editing commands for
  1048.                       Edit_Dictionary tool (spec)
  1049.     UPDATE.SPC     -- Subprograms to handle commands for Update_Dictionary 
  1050.                       tool (spec)
  1051.     COMMANDS.BDY   -- Subprograms to handle all editing commands for
  1052.                       Edit_Dictionary tool (body)
  1053.     DICTMGR.BDY    -- Subprograms to manipulate data dictionary
  1054.                       entries (body)
  1055.     UPDATE.BDY     -- Subprograms to handle commands for Update_Dictionary 
  1056.                       tool (body)
  1057.     EDRIVER.ADA    -- Driver for Edit_Dictionary tool
  1058.     RDRIVER.ADA    -- Driver for Dictionary_Report tool
  1059.     SCREENMGR.BDY  -- Subprograms to manage placement of templates and data on
  1060.                       the screen (body)
  1061.     SSTRINGS.BDY   -- Screen Strings package (body) 
  1062.     TEMPLATES.BDY  -- All templates and operations on them (body)
  1063.     UDRIVER.ADA    -- Driver for Update_Dictionary tool
  1064.  
  1065. The [.TEST] subdirectory contains tests used in testing the data dictionary.
  1066. Since the Edit_Dictionary tool is interactive, most of the testing was done
  1067. interactively and not via test cases.
  1068.  
  1069. Files in [.TEST]:
  1070.  
  1071.     UPDATE.TST  -- Test various aspects of the Update_Dictionary tool.
  1072.  
  1073. The [.DOC] subdirectory contains the documentation for the data dictionary.
  1074.  
  1075. Files in [.DOC]:
  1076.  
  1077.     DATADICT.MEM -- Data Dictionary user's manual
  1078.     DATADICT.RNO -- Runoff input for Data Dictionary user's manual
  1079.     RELEASE.NTS  -- Release notes
  1080. .el
  1081.