home *** CD-ROM | disk | FTP | other *** search
/ Programmer's ROM - The Computer Language Library / programmersrom.iso / ada / spell / spell2.doc < prev    next >
Encoding:
Text File  |  1988-05-03  |  31.8 KB  |  1,981 lines

  1.  
  2.  
  3.                       SPELLING CORRECTOR/CHECKER
  4.  
  5.  
  6.  
  7. The Spelling Corrector is a tool designed to provide  users  with  the
  8.  
  9. knowledge  of  errors in spelling within a document.  A second feature
  10.  
  11. is to provide the users with the ability to choose  various  modes  of
  12.  
  13. correction.   The  tool  can  function  in batch mode or it can be run
  14.  
  15. interactively.  The following text gives a brief  explanation  of  the
  16.  
  17. functions  of  the  tool and outlines the knowledge necessary to bring
  18.  
  19. the tool online.
  20.  
  21.  
  22.  
  23. The installation of  this  product  must  necessarily  take  place  in
  24.  
  25. various  environments.  The development of the Spelling Corrector tool
  26.  
  27. was done using the  Data  General/Rolm  Ada  Development  Environment.
  28.  
  29. There are certain files included with the product that pertain to this
  30.  
  31. environment and will have to be changed to allow for  installation  on
  32.  
  33. any other system.
  34.  
  35.  
  36.  
  37.               OBTAINING PARAMETERS FROM THE ENVIRONMENT
  38.  
  39.  
  40.  
  41. A command file is used under batch operation to enter  the  parameters
  42.  
  43. into  the Spelling Corrector tool.  Two ways of entering the necessary
  44.  
  45. data into the command file are provided under  the  Data  General/Rolm
  46.  
  47. environment.   First,  the parameters may be positionally entered on a
  48.  
  49. line which is then parsed and the data entered into the  command  file
  50.  
  51. for  entry  into  the  tool.   The  second  method  is  to provide the
  52.  
  53. parameters in a named association format which is also entered into  a
  54.  
  55. command  file  and  entered  into the tool.  If a null command line is
  56.  
  57. used at the time the tool is brought up, a default option is performed
  58.  
  59. which  places  the  tool  in  the  interactive  mode.  The information
  60.  
  61. normally provided by the command line is then obtained from  the  user
  62.  
  63. through prompts to the terminal.
  64.  
  65.  
  66.  
  67. The command file is created using the particular environment's command
  68.  
  69. language.   Parameters  are input from the environment through the use
  70.  
  71. of  the  Data  General/Rolm  Command  Line  Interpreter.    The   file
  72.  
  73. SPELLER.CLI  is  written with the aid of the Data General/Rolm command
  74.  
  75. language.  When the SPELLER.CLI is executed with the  command  SPELLER
  76.  
  77. the  command  file  is  created  with the information contained on the
  78.  
  79. command line.  The file created  is  called  COMMAND_LINE.TXT  and  is
  80.  
  81. referenced in package COMMAND_LINE_HANDLER through the use of a string
  82.  
  83. constant.  After the creation of the command file the Speller tool  is
  84.  
  85. executed.   If  the command line contains information the command file
  86.  
  87. is created otherwise an interactive mode is assumed.  If this file  is
  88.  
  89. found  to  contain  the  necessary  information  at  the  start of the
  90.  
  91. execution of the tool the parameters are read and the tool operates in
  92.  
  93. the batch mode.  This file is then deleted at the end of the execution
  94.  
  95. of the Speller tool allowing the same  environment  to  exist  at  the
  96.  
  97. start  of  any  given  run.   It  should be noted that, although it is
  98.  
  99. possible to enter various file names for  the  MASTER  and/or  ACRONYM
  100.  
  101. dictionary  files,  these  files  are  provided with the tool, and the
  102.  
  103. default name is assumed if any MASTER and/or ACRONYM file is specified
  104.  
  105. for a given batch run.
  106.  
  107.  
  108.  
  109. In order to have this same type of facility for  entry  of  parameters
  110.  
  111. under a different environment it will be necessary to create a command
  112.  
  113.                                                                 Page 2
  114.  
  115.  
  116.  
  117.  
  118.  
  119. line interpreter that will store the input parameters in a  file,  one
  120.  
  121. parameter  per  line,  that  is  readable  in  that  environment.  The
  122.  
  123. packages COMMAND_LINE_INTERFACE and COMMAND_LINE_HANDLER are  used  to
  124.  
  125. read  the  information contained in the command line file and enter it
  126.  
  127. into the tool.  It is suggested that the documentation provided in the
  128.  
  129. souce listing of the packages mentioned be read prior to the formation
  130.  
  131. of a command file creator in any given  environment.   The  HELP  file
  132.  
  133. also  provides  information  as to the syntax necessary on the command
  134.  
  135. line.  It should also be noted that it is not necessary to  have  this
  136.  
  137. file  to  execute  the  Speller tool.  A simple execution command will
  138.  
  139. bring the tool up in the interactive mode.
  140.  
  141.  
  142.  
  143. In addition to the  two  special  files  mentioned  above,  a  special
  144.  
  145. package  has  been  included  that  contains  the parameters which are
  146.  
  147. specific to most installations.  This package is MACHINE_DEPENDENCIES.
  148.  
  149. Information  input to the program through this code includes the width
  150.  
  151. of a line, the page size, the default file  names  (in  string  form),
  152.  
  153. file name char- acteristics, screen dimensions and the dictionary file
  154.  
  155. names.  Any change from  these  file  names  in  a  given  environment
  156.  
  157. necessitates  the changing of the name within the MACHINE_DEPENDENCIES
  158.  
  159. package.
  160.  
  161.  
  162.  
  163. A second package that could be of importance  during  installation  is
  164.  
  165. the TERMINAL_INTERFACE package.  This package includes the renaming of
  166.  
  167. TEXT_IO routines  for  interfacing  with  the  terminal.   In  various
  168.  
  169. environments  the  certain  procedures  included  in  TEXT_IO function
  170.  
  171. differently.  Under the Data General/Rolm environment it was necessary
  172.  
  173. to create a NEW_PAGE routine to clear the screen rather than using the
  174.  
  175. TEXT_IO.NEW_PAGE.  There may be some ideosyncracies involved with  any
  176.  
  177. particular installation.
  178.  
  179.  
  180.  
  181. Other system dependent information pertaining to the various  packages
  182.  
  183. that make up the tool can be found in the descriptions of the packages
  184.  
  185. that follow this installation section.  It  is  suggested  that  these
  186.  
  187. descriptions be read prior to final installation of the tool.
  188.  
  189.  
  190.  
  191.                            GETTING STARTED
  192.  
  193.  
  194.  
  195. Upon entry into the Spelling Corrector tool a menu will  be  displayed
  196.  
  197. on  the screen if the interactive method of operation has been chosen.
  198.  
  199. Various options are available to utilize  the  tool.   The  user  must
  200.  
  201. answer  the questions and provide the filenames necessary for the tool
  202.  
  203. to function.  Once these filenames have been provided they are  stored
  204.  
  205. by the tool for future reference.  In order to change these parameters
  206.  
  207. an option is provided upon entry into the search and correct  routine.
  208.  
  209. When running under the batch option the parameters are provided by the
  210.  
  211. input line as discussed previously.  It is  suggested  that  the  user
  212.  
  213. become familiar with this menu in order to avoid running the tool with
  214.  
  215. a lack of dictionary data.  The menu is self  explanatory  and  simply
  216.  
  217. provides the options that are necessary for the operation of the tool.
  218.  
  219.  
  220.  
  221.                         FILES IN THIS RELEASE
  222.  
  223.  
  224.  
  225. The files that are necessary for the installation of this product  are
  226.  
  227. listed as follows:
  228.  
  229.                                                                 Page 3
  230.  
  231.  
  232.  
  233.  
  234.  
  235.      CHARACTER_SET.ADA
  236.  
  237.      COMMAND_LINE_HANDLER.ADA
  238.  
  239.      COMMAND_LINE_IFACE.ADA
  240.  
  241.      CORRECTOR_SPEC.ADA
  242.  
  243.      CORRECTOR_BODY.ADA
  244.  
  245.      COUNT_STATISTICS.ADA
  246.  
  247.      DH-BODY.ADA
  248.  
  249.      DH-SPEC.ADA
  250.  
  251.      EQUALITY_OPERATOR.ADA
  252.  
  253.      GET_USER_INFO_BODY.ADA
  254.  
  255.      GET_USER_INFO_SPEC.ADA
  256.  
  257.      HELP_BODY.ADA
  258.  
  259.      HELP_DIS_ALL.ADA
  260.  
  261.      HELP_EXIT.ADA
  262.  
  263.      HELP_FILE_BODY.ADA
  264.  
  265.      HELP_FILE_SPEC.ADA
  266.  
  267.      HELP_FIND.ADA
  268.  
  269.      HELP_GET.ADA
  270.  
  271.      HELPINFO_BODY.ADA
  272.  
  273.      HELPINFO_SPEC.ADA
  274.  
  275.      HELP_INIT.ADA
  276.  
  277.      HELP_ME.ADA
  278.  
  279.      HELP_MENU.ADA
  280.  
  281.      HELP_PROMPT.ADA
  282.  
  283.      HELP_RESET.ADA
  284.  
  285.      HELP_SPEC.ADA
  286.  
  287.      HELP_TEXT.ADA
  288.  
  289.      LINKED_LIST_BODY.ADA
  290.  
  291.      LINKED_LIST_SPEC.ADA
  292.  
  293.      MANAGER_BODY.ADA
  294.  
  295.      MANAGER_SPEC.ADA
  296.  
  297.      MACHINE_DEPEND_SPEC.ADA
  298.  
  299.      PROCESS_BODY.ADA
  300.  
  301.      PROCESS_SPEC.ADA
  302.  
  303.      README_FIRST.TXT
  304.  
  305.      RTS.ADA
  306.  
  307.      SPELLER.ADA
  308.  
  309.      SPELLER_ACRONYM.DCT
  310.  
  311.      SPELLER_MASTER.DCT
  312.  
  313.      TERMINAL_BODY.ADA
  314.  
  315.      TERMINAL_SPEC.ADA
  316.  
  317.      TOKEN_DEFINITION.ADA
  318.  
  319.      UTILITIES_BODY.ADA
  320.  
  321.      UTILITIES_SPEC.ADA
  322.  
  323.      WORD_LIST_BODY.ADA
  324.  
  325.      WORD_LIST_SPEC.ADA
  326.  
  327.  
  328.  
  329. The files listed must be compiled in the following order:
  330.  
  331.  
  332.  
  333.      CHARACTER_SET.ADA
  334.  
  335.      EQUALITY_OPERATOR.ADA
  336.  
  337.      MACHINE_DEPEND_SPEC.ADA
  338.  
  339.      TOKEN_DEFINITION.ADA
  340.  
  341.      LINKED_LIST_SPEC.ADA
  342.  
  343.      LINKED_LIST_BODY.ADA
  344.  
  345.                                                                 Page 4
  346.  
  347.  
  348.  
  349.  
  350.  
  351.      COUNT_STATISTICS.ADA
  352.  
  353.      TERMINAL_SPEC.ADA
  354.  
  355.      TERMINAL_BODY.ADA
  356.  
  357.      MANAGER_SPEC.ADA
  358.  
  359.      MANAGER_BODY.ADA
  360.  
  361.      DH_SPEC.ADA
  362.  
  363.      DH_BODY.ADA
  364.  
  365.      RTS.ADA
  366.  
  367.      WORD_LIST_SPEC.ADA
  368.  
  369.      WORD_LIST_BODY.ADA
  370.  
  371.      HELPINFO_SPEC.ADA
  372.  
  373.      HELPINFO_BODY.ADA
  374.  
  375.      HELP_SPEC.ADA
  376.  
  377.      HELP_BODY.ADA
  378.  
  379.      HELP_DIS_ALL.ADA
  380.  
  381.      HELP_EXIT.ADA
  382.  
  383.      HELP_FIND.ADA
  384.  
  385.      HELP_GET.ADA
  386.  
  387.      HELP_INIT.ADA
  388.  
  389.      HELP_ME.ADA
  390.  
  391.      HELP_MENU.ADA
  392.  
  393.      HELP_PROMPT.ADA
  394.  
  395.      HELP_RESET.ADA
  396.  
  397.      HELP_TEXT.ADA
  398.  
  399.      HELP_FILE_SPEC.ADA
  400.  
  401.      HELP_FILE_BODY.ADA
  402.  
  403.      HELP_USER_INFO_SPEC.ADA
  404.  
  405.      HELP_USER_INFO_BODY.ADA
  406.  
  407.      UTILITIES_SPEC.ADA
  408.  
  409.      UTILITIES_BODY.ADA
  410.  
  411.      CORRECTOR_SPEC.ADA
  412.  
  413.      CORRECTOR_BODY.ADA
  414.  
  415.      PROCESS_SPEC.ADA
  416.  
  417.      PROCESS_BODY.ADA
  418.  
  419.      COMMAND_LINE_HANDLER.ADA
  420.  
  421.      COMMAND_LINE_IFACE.ADA
  422.  
  423.      SPELLER.ADA
  424.  
  425.  
  426.  
  427.                            THE HELP UTILITY
  428.  
  429.  
  430.  
  431. The text file used by the HELP_UTILITY Package is required to  have  a
  432.  
  433. particular  format.   If  the file is not in this format, an exception
  434.  
  435. will be raised.  The following explains the required format.
  436.  
  437.  
  438.  
  439. COMMENTS:  Comments may be embedded in the text  file.   All  comments
  440.  
  441. are  ignored  when  the  file  is  read  into  memory.  A text line is
  442.  
  443. considered a comment if the first and second characters  of  the  line
  444.  
  445. are minus signs ( -- ).
  446.  
  447.  
  448.  
  449. TOPICS:  The first non-comment text line MUST begin with the  digit  1
  450.  
  451. in  column one.  This number is the topic level.  In other words, text
  452.  
  453. (as defined below) cannot be found in the text file before a topic  is
  454.  
  455. found  to which the text can be associated.  Topics are those subjects
  456.  
  457. for which information is being provided.  A topic name may contain any
  458.  
  459. printable character except blanks.  Embedded blanks are NOT allowed in
  460.  
  461.                                                                 Page 5
  462.  
  463.  
  464.  
  465.  
  466.  
  467. a topic name.  This will not be flagged as an error but the name  will
  468.  
  469. be  truncated  at  the  first  blank.  All letters in the name must be
  470.  
  471. capitals.  It is not required to have a  space  separating  the  topic
  472.  
  473. level  from  the  topic name.  Any line beginning with a digit will be
  474.  
  475. considered a topic line.
  476.  
  477.  
  478.  
  479. SUBTOPICS:  A topic may have  subtopics.   Subtopics  are  denoted  by
  480.  
  481. having  a  level  exactly one greater than the associated topic level.
  482.  
  483. Subtopics follow the same rules as topics in all other aspects.  There
  484.  
  485. is  no  constraint  (other  than  a  lack  of memory) on the number of
  486.  
  487. subtopic levels.
  488.  
  489.  
  490.  
  491. TEXT:  All text lines not beginning with two consecutive  minus  signs
  492.  
  493. or a digit will be considered text.
  494.  
  495.  
  496.  
  497. The text file is saved exactly as the user sees  it  (including  blank
  498.  
  499. lines) with the follow exceptions:
  500.  
  501.  
  502.  
  503. o topic and subtopic names have leading blanks stripped off o  if  the
  504.  
  505. topic or subtopic name is longer than one half the screen size, it may
  506.  
  507. be truncated when a menu of information is output o if the  text  line
  508.  
  509. is  longer  than  the  screen  size, the text line is truncated before
  510.  
  511. output o the text file lines  are  assumed  to  be  eighty  characters
  512.  
  513. maximum.
  514.  
  515.  
  516.  
  517.                              THE PACKAGES
  518.  
  519.  
  520.  
  521. In the next section each package and the main  procedure  is  outlined
  522.  
  523. separately.   Not  all packages are outlined.  Only those that make up
  524.  
  525. the main portion of the SPELLER tool are  included.   The  description
  526.  
  527. includes  information  that  will  be  of  value  in understanding the
  528.  
  529. interaction of the software  and  the  interfaces  necessary  for  the
  530.  
  531. software  to  function  properly.  This section should also serve as a
  532.  
  533. guide for any future  main-  tenance  that  may  become  necessary  or
  534.  
  535. desired.
  536.  
  537.  
  538.  
  539.                                                                 Page 6
  540.  
  541.  
  542.  
  543.  
  544.  
  545.                           Package CORRECTOR
  546.  
  547.  
  548.  
  549. This package is contained in the files:
  550.  
  551.  
  552.  
  553.     CORRECTOR_SPEC.ADA
  554.  
  555.     CORRECTOR_BODY.ADA
  556.  
  557.  
  558.  
  559. This package contains the following program units:
  560.  
  561.  
  562.  
  563.      Procedures                    Functions
  564.  
  565.  
  566.  
  567.     CORRECT                       WAS_CORRECTED
  568.  
  569.     INSERT_WORD
  570.  
  571.     INITIALIZE
  572.  
  573.  
  574.  
  575. Dependencies:
  576.  
  577.  
  578.  
  579.     This package is dependent upon the following library units:
  580.  
  581.  
  582.  
  583.         The specification depends on:  TOKEN_DEFINITION,
  584.  
  585.                                        GET_USER_INFO
  586.  
  587.  
  588.  
  589.         The body depends on         :  TERMINAL_INTERFACE,
  590.  
  591.                                        MACHINE_DEPENDENCIES,
  592.  
  593.                                        EQUALITY_OPERATOR,
  594.  
  595.                                        TEXT_IO,
  596.  
  597.                                        RUN_TIME_STATISTICS,
  598.  
  599.                                        SINGLY_LINKED_LIST,
  600.  
  601.                                        DICTIONARY_MANAGER,
  602.  
  603.                                        DOCUMENT_HANDLER,
  604.  
  605.                                        HELP.
  606.  
  607.  
  608.  
  609. System Dependencies:
  610.  
  611.     None
  612.  
  613.  
  614.  
  615. Enhancements:
  616.  
  617.  
  618.  
  619.     None
  620.  
  621.  
  622.  
  623.                                                                 Page 7
  624.  
  625.  
  626.  
  627.  
  628.  
  629.                           Package UTILITIES
  630.  
  631.  
  632.  
  633. This package is contained in the files:
  634.  
  635.  
  636.  
  637.     UTILITIES_SPEC.ADA
  638.  
  639.     UTILITIES_BODY.ADA
  640.  
  641.  
  642.  
  643. This package contains the following program units:
  644.  
  645.  
  646.  
  647.      Procedures
  648.  
  649.  
  650.  
  651.     MERGE
  652.  
  653.     GET_DICTIONARY_NAME
  654.  
  655.     OPEN
  656.  
  657.     CREATE
  658.  
  659.  
  660.  
  661. Dependencies:
  662.  
  663.  
  664.  
  665.     This package is dependent upon the following library units:
  666.  
  667.  
  668.  
  669.         The specification depends on:  TEXT_IO.
  670.  
  671.  
  672.  
  673.         The body depends on         :  EQUALITY_OPERATOR,
  674.  
  675.                                        SINGLY_LINKED_LIST,
  676.  
  677.                                        MACHINE_DEPENDENCIES,
  678.  
  679.                                        TERMINAL_INTERFACE,
  680.  
  681.                                        TOKEN_DEFINITION.
  682.  
  683.  
  684.  
  685. System Dependencies:
  686.  
  687.  
  688.  
  689.     None.
  690.  
  691.  
  692.  
  693. Enhancements:
  694.  
  695.  
  696.  
  697.     None.
  698.  
  699.  
  700.  
  701.                                                                 Page 8
  702.  
  703.  
  704.  
  705.  
  706.  
  707.                         Package GET_USER_INFO
  708.  
  709.  
  710.  
  711. This package is contained in the files:
  712.  
  713.  
  714.  
  715.     GET_USER_INFO_SPEC.ADA
  716.  
  717.     GET_USER_INFO_BODY.ADA
  718.  
  719.  
  720.  
  721. This package contains the following program units:
  722.  
  723.  
  724.  
  725.      Procedures
  726.  
  727.  
  728.  
  729.     GET_INFO
  730.  
  731.     SAVE_INFO
  732.  
  733.     COLLECT_USER_INFO
  734.  
  735.  
  736.  
  737. Dependencies:
  738.  
  739.  
  740.  
  741.     This package is dependent upon the following library units:
  742.  
  743.  
  744.  
  745.         The specification depends on:  MACHINE_DEPENDENCIES,
  746.  
  747.                                        DICTIONARY_MANAGER.
  748.  
  749.  
  750.  
  751.         The body depends on         :  SEQUENTIAL_IO,
  752.  
  753.                                        TERMINAL_INTERFACE.
  754.  
  755.  
  756.  
  757. System Dependencies:
  758.  
  759.  
  760.  
  761.     None.
  762.  
  763.  
  764.  
  765. Enhancements:
  766.  
  767.  
  768.  
  769.     None.
  770.  
  771.  
  772.  
  773.                                                                 Page 9
  774.  
  775.  
  776.  
  777.  
  778.  
  779.                           Procedure SPELLER
  780.  
  781.  
  782.  
  783. This procedure is contained in the file:
  784.  
  785.  
  786.  
  787.     SPELLER.ADA
  788.  
  789.  
  790.  
  791. This procedure contains the following program units:
  792.  
  793.  
  794.  
  795.      Procedures                      Functions
  796.  
  797.     
  798.  
  799.     DISPLAY_TITLE_PAGE,             "=" 
  800.  
  801.     DISPLAY_COMMAND_CHOICES,
  802.  
  803.     BEGIN_DOCUMENT_CHECK,
  804.  
  805.     BEGIN_MERGE_OPERATIONS,
  806.  
  807.     BEGIN_DICTIONARY_LIST,
  808.  
  809.  
  810.  
  811. Dependencies:
  812.  
  813.  
  814.  
  815.     This package is dependent upon the following library units:
  816.  
  817.  
  818.  
  819.         The specification depends on:  None
  820.  
  821.  
  822.  
  823.         The body depends on         :  COMMAND_LINE_INTERFACE,
  824.  
  825.                                        MACHINE_DEPENDENCIES,
  826.  
  827.                                        TERMINAL_INTERFACE,
  828.  
  829.                                        TOKEN_DEFINITION,
  830.  
  831.                                        PROCESS_PACKAGE,
  832.  
  833.                                        GET_USER_INFO,
  834.  
  835.                                        UTILITIES,
  836.  
  837.                                        TEXT_IO,
  838.  
  839.                                        HELP.
  840.  
  841.  
  842.  
  843. System Dependencies:
  844.  
  845.  
  846.  
  847.     None.
  848.  
  849.  
  850.  
  851. Enhancements:
  852.  
  853.  
  854.  
  855.     None.
  856.  
  857.  
  858.  
  859.                                                                Page 10
  860.  
  861.  
  862.  
  863.  
  864.  
  865.                        Package PROCESS_PACKAGE
  866.  
  867.  
  868.  
  869. This package is contained in the files:
  870.  
  871.  
  872.  
  873.     PROCESS_SPEC.ADA
  874.  
  875.     PROCESS_BODY.ADA
  876.  
  877.  
  878.  
  879. The package contains the following program units:
  880.  
  881.  
  882.  
  883.      Procedures
  884.  
  885.  
  886.  
  887.     BATCH_PROCESS
  888.  
  889.     INTERACTIVE_PROCESS
  890.  
  891.  
  892.  
  893. Dependencies:
  894.  
  895.  
  896.  
  897.     This package is dependent upon the following library units:
  898.  
  899.  
  900.  
  901.         The specification depends on:  MISSPELLED_WORD_LIST,
  902.  
  903.                                        MACHINE_DEPENDENCIES,
  904.  
  905.                                        DICTIONARY_MANAGER,
  906.  
  907.                                        DOCUMENT_HANDLER,
  908.  
  909.                                        GET_USER_INFO,
  910.  
  911.                                        TOKEN_DEFINITION.
  912.  
  913.  
  914.  
  915.         The body depends on         :  TERMINAL_INTERFACE,
  916.  
  917.                                        TEXT_IO,
  918.  
  919.                                        RUN_TIME_STATISTICS,
  920.  
  921.                                        CORRECTOR.
  922.  
  923.  
  924.  
  925. Syetem Dependencies:
  926.  
  927.  
  928.  
  929.     None
  930.  
  931.  
  932.  
  933. Enhancements:
  934.  
  935.  
  936.  
  937.     None
  938.  
  939.  
  940.  
  941.                                                                Page 11
  942.  
  943.  
  944.  
  945.  
  946.  
  947.                       Package EQUALITY_OPERATOR
  948.  
  949.  
  950.  
  951. This package is contained in the file
  952.  
  953.  
  954.  
  955.     EQUALITY_OPERATOR.ADA
  956.  
  957.  
  958.  
  959. This package contains the package
  960.  
  961.  
  962.  
  963.     EQUALS
  964.  
  965.  
  966.  
  967. which contains the single procedure
  968.  
  969.  
  970.  
  971.     "="
  972.  
  973.  
  974.  
  975. Dependencies:
  976.  
  977.  
  978.  
  979.     None.
  980.  
  981.  
  982.  
  983. System Dependencies:
  984.  
  985.  
  986.  
  987.     None.
  988.  
  989.  
  990.  
  991. Enhancements:
  992.  
  993.  
  994.  
  995.     None.
  996.  
  997.  
  998.  
  999.                                                                Page 12
  1000.  
  1001.  
  1002.  
  1003.  
  1004.  
  1005.                       Package SINGLY_LINKED_LIST
  1006.  
  1007.  
  1008.  
  1009. This package is contained in the files
  1010.  
  1011.  
  1012.  
  1013.     LINKED_LIST_SPEC.ADA
  1014.  
  1015.     LINKED_LIST_BODY.ADA
  1016.  
  1017.  
  1018.  
  1019. This package contains the following program units:
  1020.  
  1021.  
  1022.  
  1023.     Functions                 Procedures
  1024.  
  1025.  
  1026.  
  1027.     EMPTY                     FIRST
  1028.  
  1029.     NULL_NODE                 NEXT
  1030.  
  1031.     HEAD_NODE                 INSERT_AFTER
  1032.  
  1033.     TAIL_NODE                 INSERT_BEFORE
  1034.  
  1035.     CURRENT_ELEMENT           DELETE_ELEMENT
  1036.  
  1037.                               MODIFY
  1038.  
  1039.                               UPDATE
  1040.  
  1041.  
  1042.  
  1043. Dependencies:
  1044.  
  1045.  
  1046.  
  1047.     This package is dependent on the following library units:
  1048.  
  1049.  
  1050.  
  1051.         The specification depends on      : None.
  1052.  
  1053.  
  1054.  
  1055.         Additionally, the body depends on : UNCHECKED_DEALLOCATION
  1056.  
  1057.  
  1058.  
  1059. System Dependencies:
  1060.  
  1061.  
  1062.  
  1063.     The generic procedure UNCHECKED_DEALLOCATION is used in this package
  1064.  
  1065.     and is not supported by some implementations.
  1066.  
  1067.  
  1068.  
  1069. Enhancements:
  1070.  
  1071.  
  1072.  
  1073.     Add the LENGTH function to determine the number of elements in a list.
  1074.  
  1075.                                                                Page 13
  1076.  
  1077.  
  1078.  
  1079.  
  1080.  
  1081.                      Package MISSPELLED_WORD_LIST
  1082.  
  1083.  
  1084.  
  1085. This package is contained in the files
  1086.  
  1087.  
  1088.  
  1089.     WORD_LIST_SPEC.ADA
  1090.  
  1091.     WORD_LIST_BODY.ADA
  1092.  
  1093.  
  1094.  
  1095. This package contains the following program units:
  1096.  
  1097.  
  1098.  
  1099.     INITIALIZE
  1100.  
  1101.     ADD_TOKEN
  1102.  
  1103.     PRINT
  1104.  
  1105.  
  1106.  
  1107. Dependencies:
  1108.  
  1109.  
  1110.  
  1111.     This package is dependent on the following library units:
  1112.  
  1113.  
  1114.  
  1115.         The specification depends on      : TEXT_IO
  1116.  
  1117.                                             TOKEN_DEFINITION
  1118.  
  1119.  
  1120.  
  1121.         Additionally, the body depends on : EQUALITY_OPERATOR
  1122.  
  1123.                                             SINGLY_LINKED_LIST
  1124.  
  1125.  
  1126.  
  1127. System Dependencies:
  1128.  
  1129.  
  1130.  
  1131.     None.
  1132.  
  1133.  
  1134.  
  1135. Enhancements:
  1136.  
  1137.  
  1138.  
  1139.     The list of words could be maintained as a binary tree.  This would
  1140.  
  1141.     decrease execution time at the cost of additional storage.
  1142.  
  1143.  
  1144.  
  1145.     The words could be stored in the list as dynamically allocated arrays,
  1146.  
  1147.     thus possibly (depending on the compiler implementation) requiring
  1148.  
  1149.     less storage.
  1150.  
  1151.                                                                Page 14
  1152.  
  1153.  
  1154.  
  1155.  
  1156.  
  1157.                       Package DICTIONARY_MANAGER
  1158.  
  1159.  
  1160.  
  1161. This package is contained in the files:
  1162.  
  1163.  
  1164.  
  1165.     MANAGER_SPEC.ADA
  1166.  
  1167.     MANAGER_BODY.ADA
  1168.  
  1169.  
  1170.  
  1171. This package contains the following program units:
  1172.  
  1173.     
  1174.  
  1175.      Procedures                    Functions
  1176.  
  1177.  
  1178.  
  1179.     CREATE_DICTIONARY             GET_MASTER_DICTIONARY      
  1180.  
  1181.     LIST_DICTIONARY               GET_ACRONYM_DICTIONARY
  1182.  
  1183.     MERGE_DICTIONARY              MORE
  1184.  
  1185.     ENABLE_DICTIONARY             ALTER
  1186.  
  1187.     INSERT_WORD
  1188.  
  1189.     DELETE_WORD
  1190.  
  1191.     DELETE_DICTIONARY
  1192.  
  1193.     DISABLE
  1194.  
  1195.     TOKEN_IS_FOUND
  1196.  
  1197.     INITIATOR
  1198.  
  1199.     NEXT_WORD
  1200.  
  1201.  
  1202.  
  1203. Dependencies:
  1204.  
  1205.     
  1206.  
  1207.     This package is dependent upon the following library units:
  1208.  
  1209.  
  1210.  
  1211.         The specification depends on:  TEXT_IO,
  1212.  
  1213.                                        TOKEN_DEFINITION.
  1214.  
  1215.  
  1216.  
  1217.         The body depends on         :  MACHINE_DEPENDENCIES,
  1218.  
  1219.                                        CHARACTER_SET,
  1220.  
  1221.                                        TOKEN_DEFINITION,
  1222.  
  1223.                                        TERMINAL_INTERFACE,
  1224.  
  1225.                  (And when included)   UNCHECKED_DEALLOCATION.           
  1226.  
  1227.  
  1228.  
  1229. System Dependencies:
  1230.  
  1231.  
  1232.  
  1233.     A STORAGE_ERROR can occur and cannot be alleviated in environments 
  1234.  
  1235.     that do not implement UNCHECKED_DEALLOCATION.  The code to implement
  1236.  
  1237.     the reclamation is contained within the body of the package but at this
  1238.  
  1239.     time is contained in comments as UNCHECKED_DEALLOCATION is not imple-
  1240.  
  1241.     mented in the development environment.  This code has not been tested.
  1242.  
  1243.  
  1244.  
  1245. Enhancements:
  1246.  
  1247.  
  1248.  
  1249.     Install and test the storage reclamation facilities of the package.
  1250.  
  1251.  
  1252.  
  1253.     Development of a "cache memory" type of approach to storing the on-line
  1254.  
  1255.     dictionaries to eliminate the need for a large amount of main memory.  
  1256.  
  1257.     This approach should would necessarily contain a file searching/swapping
  1258.  
  1259.     algorithm to maintain memory in both internal and external structures.
  1260.  
  1261.                                                                Page 15
  1262.  
  1263.  
  1264.  
  1265.  
  1266.  
  1267.                       Package TERMINAL_INTERFACE
  1268.  
  1269.  
  1270.  
  1271. This package is contained in the files:
  1272.  
  1273.  
  1274.  
  1275.     TERMINAL_SPEC.ADA
  1276.  
  1277.     TERMINAL_BODY.ADA
  1278.  
  1279.  
  1280.  
  1281. This package contains the following library units:
  1282.  
  1283.  
  1284.  
  1285.     NEW_PAGE
  1286.  
  1287.     NEW_LINE
  1288.  
  1289.     END_OF_LINE
  1290.  
  1291.     GET(character)
  1292.  
  1293.     PUT(character)
  1294.  
  1295.     GET(string)
  1296.  
  1297.     PUT(string)
  1298.  
  1299.     GET_LINE
  1300.  
  1301.     PUT_LINE
  1302.  
  1303.  
  1304.  
  1305. Dependencies:
  1306.  
  1307.     
  1308.  
  1309.     This package is dependent on the following library units:
  1310.  
  1311.  
  1312.  
  1313.         The specification depends on:  TEXT_IO.
  1314.  
  1315.  
  1316.  
  1317.         The body depends on         :  MACHINE_DEPENDENCIES.
  1318.  
  1319.  
  1320.  
  1321. System Dependencies:
  1322.  
  1323.  
  1324.  
  1325.     The routines supplied in this package are renames of TEXT_IO routines
  1326.  
  1327.     and are thus implemented in the same fashion as the TEXT_IO routines
  1328.  
  1329.     of a particular installation.  The only routine not renamed from 
  1330.  
  1331.     TEXT_IO is NEW_PAGE.
  1332.  
  1333.  
  1334.  
  1335. Enchancements:
  1336.  
  1337.  
  1338.  
  1339.     The possibility of extending routines within this package to fit
  1340.  
  1341.     particular installations exists.  This should be done using the
  1342.  
  1343.     MACHINE_DEPENDENCIES package for external information and the 
  1344.  
  1345.     TERMINAL_INTERFACE package for the necessary code.
  1346.  
  1347.  
  1348.  
  1349.     Any tailoring of the terminal for a particular workstation could
  1350.  
  1351.     be accomplished in this package.
  1352.  
  1353.                                                                Page 16
  1354.  
  1355.  
  1356.  
  1357.  
  1358.  
  1359.                      Package MACHINE_DEPENDENCIES
  1360.  
  1361.  
  1362.  
  1363. This package is contained in the file:
  1364.  
  1365.  
  1366.  
  1367.     MACHINE_DEPEND_SPEC.ADA
  1368.  
  1369.  
  1370.  
  1371. This package contains the following program units:
  1372.  
  1373.  
  1374.  
  1375.     This package contains no routines and is used to declare the various
  1376.  
  1377.     parameters that make the Spelling Corrector tool compatible with the
  1378.  
  1379.     particular environment in which is operating.
  1380.  
  1381.  
  1382.  
  1383. Dependencies:
  1384.  
  1385.  
  1386.  
  1387.     None
  1388.  
  1389.  
  1390.  
  1391. System Dependencies:
  1392.  
  1393.  
  1394.  
  1395.     The constants declared within the package generally pertain to the
  1396.  
  1397.     environment that the tool is installed under.
  1398.  
  1399.  
  1400.  
  1401. Enhancements:
  1402.  
  1403.  
  1404.  
  1405.     Changes will be necessary to install the tool on a particular hardware
  1406.  
  1407.     installation.  
  1408.  
  1409.  
  1410.  
  1411.     As enhancements are made to other parts of the tool there may be interfaces
  1412.  
  1413.     with the environment that will have to be added to this package.
  1414.  
  1415.                                                                Page 17
  1416.  
  1417.  
  1418.  
  1419.  
  1420.  
  1421.                     Package COMMAND_LINE_INTERFACE
  1422.  
  1423.  
  1424.  
  1425. This package is contained in one file:
  1426.  
  1427.  
  1428.  
  1429.     COMMAND_LINE_IFACE.ADA
  1430.  
  1431.  
  1432.  
  1433. This package contains the following program units:
  1434.  
  1435.  
  1436.  
  1437.     FILE_NAME
  1438.  
  1439.     WORD_LIST
  1440.  
  1441.     MASTER_DICTIONARY
  1442.  
  1443.     ACRONYM_DICTIONARY
  1444.  
  1445.     USER_DICTIONARY
  1446.  
  1447.     BAD_WORD
  1448.  
  1449.  
  1450.  
  1451. Dependencies:
  1452.  
  1453.  
  1454.  
  1455.     This package is dependent upon the following library units:
  1456.  
  1457.  
  1458.  
  1459.         The specification depends on:   Nothing
  1460.  
  1461.  
  1462.  
  1463.         The body depends on         :   CHARACTER_SET,
  1464.  
  1465.                                         COMMAND_LINE_HANDLER
  1466.  
  1467.  
  1468.  
  1469. System Dependencies:
  1470.  
  1471.  
  1472.  
  1473.     A maximum file name length of 80 characters is assumed.
  1474.  
  1475.     COMMAND_LINE_HANDLER defines a file containing the command line
  1476.  
  1477.     tail.
  1478.  
  1479.  
  1480.  
  1481. Enhancements:
  1482.  
  1483.  
  1484.  
  1485.     COMMAND_LINE_INTERFACE is already using the software component
  1486.  
  1487.     COMMAND_LINE_HANDLER, which is a general-purpose tool.
  1488.  
  1489.     CLI can be modified to meet particular command line syntax other
  1490.  
  1491.     than that selected for this application.
  1492.  
  1493.                                                                Page 18
  1494.  
  1495.  
  1496.  
  1497.  
  1498.  
  1499.                      Package COMMAND_LINE_HANDLER
  1500.  
  1501.  
  1502.  
  1503. This package is contained in the files
  1504.  
  1505.  
  1506.  
  1507.     COMMAND_LINE_HANDLER.ADA
  1508.  
  1509.  
  1510.  
  1511. This package contains the following library units:
  1512.  
  1513.  
  1514.  
  1515.     NEXT_WORD
  1516.  
  1517.  
  1518.  
  1519. Dependencies:
  1520.  
  1521.  
  1522.  
  1523.     This package is dependent upon the following library units:
  1524.  
  1525.  
  1526.  
  1527.         The specification depends on:  None
  1528.  
  1529.  
  1530.  
  1531.         The body withs in           :  TEXT_IO.         
  1532.  
  1533.  
  1534.  
  1535. System Dependencies:
  1536.  
  1537.  
  1538.  
  1539.     An operating-system command file surrounds the invocation of
  1540.  
  1541.     the target tool and generates a file named COMMAND_LINE.TXT
  1542.  
  1543.     (in the Data General implementation) which contains the
  1544.  
  1545.     parameters from the command line tail.  These parameters are stored
  1546.  
  1547.     one parameter on each line of COMMAND_LINE.TXT.  The package
  1548.  
  1549.     COMMAND_LINE_HANDLER returns these parameters in sequence each
  1550.  
  1551.     time NEXT_WORD is called; the exception NO_MORE_WORDS is raised
  1552.  
  1553.     when NEXT_WORD is called and there are no more parameters on the
  1554.  
  1555.     command line.
  1556.  
  1557.  
  1558.  
  1559.     Examples:
  1560.  
  1561.  
  1562.  
  1563.         1. Command Line: SPELLER MYFILE A=ACRONYM
  1564.  
  1565.  
  1566.  
  1567.         COMMAND_LINE.TXT contains two lines:
  1568.  
  1569.  
  1570.  
  1571.         MYFILE
  1572.  
  1573.         A=ACRONYM
  1574.  
  1575.  
  1576.  
  1577.         2. Command Line: SPELLER MYFILE WORD.LST U6=MYDICT
  1578.  
  1579.  
  1580.  
  1581.         COMMAND_LINE.TXT contains three lines:
  1582.  
  1583.  
  1584.  
  1585.         MYFILE
  1586.  
  1587.         WORD.LST
  1588.  
  1589.         U6=MYDICT
  1590.  
  1591.  
  1592.  
  1593.         A line is returned each time NEXT_WORD is called from
  1594.  
  1595.         COMMAND_LINE_HANDLER.
  1596.  
  1597.  
  1598.  
  1599. Enhancements:
  1600.  
  1601.  
  1602.  
  1603.     This package is quite simple and straight-forward.  It may
  1604.  
  1605.     have to be modified if the target operating system cannot
  1606.  
  1607.     support the creation of the COMMAND_LINE.TXT file.  One such
  1608.  
  1609.                                                                Page 19
  1610.  
  1611.  
  1612.  
  1613.  
  1614.  
  1615.     modification may be to have it prompt the user for the command
  1616.  
  1617.     line tail the first time NEXT_WORD is called, and then continue
  1618.  
  1619.     processing from this point.
  1620.  
  1621.  
  1622.  
  1623.                                                                Page 20
  1624.  
  1625.  
  1626.  
  1627.  
  1628.  
  1629.                        Package DOCUMENT_HANDLER
  1630.  
  1631.  
  1632.  
  1633. This package is contained in the files:
  1634.  
  1635.  
  1636.  
  1637.     DH_SPEC.ADA
  1638.  
  1639.     DH_BODY.ADA
  1640.  
  1641.  
  1642.  
  1643. This package contains the following program units:
  1644.  
  1645.  
  1646.  
  1647.     OPEN_SOURCE
  1648.  
  1649.     OPEN_DESTINATION
  1650.  
  1651.     CLOSE_SOURCE_AND_DESTINATION
  1652.  
  1653.     GET_WORD
  1654.  
  1655.     RESTORE_WORD
  1656.  
  1657.     CONTEXT_OF_LAST_GET_WORD
  1658.  
  1659.  
  1660.  
  1661. Dependencies:
  1662.  
  1663.  
  1664.  
  1665.     This package is dependent upon the following library units:
  1666.  
  1667.  
  1668.  
  1669.         The specification depends on :  TEXT_IO
  1670.  
  1671.                                         MACHINE_DEPENDENCIES
  1672.  
  1673.                                         TOKEN_DEFINITION
  1674.  
  1675.  
  1676.  
  1677.         The body depends on          :  CHARACTER_SET
  1678.  
  1679.  
  1680.  
  1681. System Dependencies:
  1682.  
  1683.  
  1684.  
  1685.     MACHINE_DEPENDENCIES.FILE_LINE_LENGTH gives the max size of
  1686.  
  1687.     a line of a text file.  This is the only restriction.  All
  1688.  
  1689.     other support comes from TEXT_IO.
  1690.  
  1691.  
  1692.  
  1693. Enhancements:
  1694.  
  1695.  
  1696.  
  1697.     Isolate the general definition of a word into an external
  1698.  
  1699.     package, and design this package to be altered with reasonable
  1700.  
  1701.     ease.  This could form a very useful software component.
  1702.  
  1703.  
  1704.  
  1705.     Extend the "GET_WORD" concept to GET_TOKEN, and a software
  1706.  
  1707.     component can be designed to assist in parsing problems et al.
  1708.  
  1709.                                                                Page 21
  1710.  
  1711.  
  1712.  
  1713.  
  1714.  
  1715.                      Package RUN_TIME_STATISTICS
  1716.  
  1717.  
  1718.  
  1719. This package is contained in the file:
  1720.  
  1721.  
  1722.  
  1723.     RTS.ADA
  1724.  
  1725.  
  1726.  
  1727. This package contains the following program units:
  1728.  
  1729.  
  1730.  
  1731.     INITIALIZE_COUNTERS
  1732.  
  1733.     INCREMENT_COUNTER
  1734.  
  1735.     COUNT
  1736.  
  1737.  
  1738.  
  1739. Dependencies:
  1740.  
  1741.  
  1742.  
  1743.     This package is dependent upon the following library units:
  1744.  
  1745.  
  1746.  
  1747.         The specification depends on :  COUNT_STATISTICS
  1748.  
  1749.  
  1750.  
  1751.         The body depends on          :  None
  1752.  
  1753.  
  1754.  
  1755. System Dependencies:
  1756.  
  1757.  
  1758.  
  1759.     None
  1760.  
  1761.  
  1762.  
  1763. Enhancements:
  1764.  
  1765.  
  1766.  
  1767.     COUNT_STATISTICS already provides a useful software component
  1768.  
  1769.     that RTS is built from.
  1770.  
  1771.                                                                Page 22
  1772.  
  1773.  
  1774.  
  1775.  
  1776.  
  1777.                       Package HELP_INFO_SUPPORT
  1778.  
  1779.  
  1780.  
  1781. This package is contained in the files:
  1782.  
  1783.  
  1784.  
  1785.     HELP_INFO_SPEC.ADA
  1786.  
  1787.     HELP_INFO_BODY.ADA
  1788.  
  1789.  
  1790.  
  1791. This package contains the following program units:
  1792.  
  1793.  
  1794.  
  1795.     APPEND_TO_DISPLAY
  1796.  
  1797.     IDENTIFY_KEYWORD
  1798.  
  1799.     GET_NEXT_TOKEN
  1800.  
  1801.     PARSE
  1802.  
  1803.  
  1804.  
  1805. Dependencies:
  1806.  
  1807.  
  1808.  
  1809.     This package is dependent on the following library units:
  1810.  
  1811.  
  1812.  
  1813.         The specification depends on:  None.
  1814.  
  1815.  
  1816.  
  1817.         The body depends on         :  TEXT_IO.
  1818.  
  1819.  
  1820.  
  1821. System Dependencies:
  1822.  
  1823.  
  1824.  
  1825.     None.
  1826.  
  1827.  
  1828.  
  1829. Enhancements:
  1830.  
  1831.  
  1832.  
  1833.     None.
  1834.  
  1835.                                                                Page 23
  1836.  
  1837.  
  1838.  
  1839.  
  1840.  
  1841.                          Package HELP_UTILITY
  1842.  
  1843.  
  1844.  
  1845. This package is contained in the files:
  1846.  
  1847.  
  1848.  
  1849.     HELP_SPEC.ADA
  1850.  
  1851.     HELP_BODY.ADA
  1852.  
  1853.     HELP_DIS_ALL.ADA
  1854.  
  1855.     HELP_EXIT.ADA
  1856.  
  1857.     HELP_FIND.ADA
  1858.  
  1859.     HELP_GET.ADA
  1860.  
  1861.     HELP_INIT.ADA
  1862.  
  1863.     HELP_ME.ADA
  1864.  
  1865.     HELP_MENU.ADA
  1866.  
  1867.     HELP_PROMPT.ADA
  1868.  
  1869.     HELP_RESET.ADA
  1870.  
  1871.     HELP_TEXT.ADA
  1872.  
  1873.  
  1874.  
  1875. Dependencies:
  1876.  
  1877.  
  1878.  
  1879.     This package is dependent on the following library units:
  1880.  
  1881.  
  1882.  
  1883.         The specification depends on:  None.
  1884.  
  1885.  
  1886.  
  1887.         The body depends on         :  TEXT_IO,
  1888.  
  1889.                                        HELP_INFO_SUPPORT.
  1890.  
  1891.  
  1892.  
  1893. System Dependencies:
  1894.  
  1895.  
  1896.  
  1897.     None.
  1898.  
  1899.  
  1900.  
  1901. Enhancements:
  1902.  
  1903.  
  1904.  
  1905.     None.
  1906.  
  1907.                                                                Page 24
  1908.  
  1909.  
  1910.  
  1911.  
  1912.  
  1913.                              Package HELP
  1914.  
  1915.  
  1916.  
  1917. This package is contained in the files:
  1918.  
  1919.  
  1920.  
  1921.     HELP_FILE_SPEC.ADA
  1922.  
  1923.     HELP_FILE_BODY.ADA
  1924.  
  1925.     HELP_FILE.INI (Not a compiled unit, a text file)
  1926.  
  1927.  
  1928.  
  1929. This package contains the following program units:
  1930.  
  1931.  
  1932.  
  1933.     HELP_SCREEN
  1934.  
  1935.  
  1936.  
  1937. Dependencies:
  1938.  
  1939.  
  1940.  
  1941.     This package is dependent on the following library units:
  1942.  
  1943.  
  1944.  
  1945.         The specification depends on:  None.
  1946.  
  1947.  
  1948.  
  1949.         The body depends on         :  MACHINE_DEPENDENCIES,
  1950.  
  1951.                                        TERMINAL_INTERFACE,
  1952.  
  1953.                                        HELP_UTILITY.
  1954.  
  1955.  
  1956.  
  1957. System Dependencies:
  1958.  
  1959.  
  1960.  
  1961.     Any change of the name of the HELP_FILE.INI filename will require
  1962.  
  1963.     a change of the initialization filename constant in the MACHINE_
  1964.  
  1965.     DEPENDENCIES routine.
  1966.  
  1967.  
  1968.  
  1969. Enhancements:
  1970.  
  1971.  
  1972.  
  1973.     The help may be modified if more or less help information is desired.
  1974.  
  1975.     This is done through the editing of the HELP_FILE.INI file.  The more
  1976.  
  1977.     complex and voluminous this file is the slower the initialization of 
  1978.  
  1979.     the help utility will be.
  1980.  
  1981.