/*MAIN
 Overview
 
 GEN_RECIPE2 is a sub-procedure of the main reconstruction procedure 
    RECONSTRUCTION1.  The main role of this procedure is to call on procedure
    GEN_RECIPE4, passing to it a lower and upper bound of minor frames, to
    generate a set of instructions (recipe) about how to build these ranges of 
    minor frames for all reconstructed frames.
MAIN*/

/*ARGUMENTS
  Arguments
 
  Procedure GEN_RECIPE2 takes no arguments.
ARGUMENTS*/

/*DEPENDENCIES
 Dependencies
 
 The following are the procedures called by GEN_RECIPE2 (listed in their
 order of call):
   - SWITCH.  This is the package that manipulates the switches for all
     the reconstruction rules.

   - RULES_STATES.  This is a package of three procedures and one function all
     of which track and post reconstruction states for all rules as they become
     available, in the temporary table LOGT.

   - RULE.  This is the stored package that manipulates the reconstruction rules
     numbers, name and version number.

   - GEN_RECIPE4.  This is a stored procedure which writes recipe instructions 
     in table RECIPE, for each minor frame of all reconstructed major frames.

   - CONFIG.  This is the stored package that manipulates the configuration
     parameters for all the reconstruction rules. 

   - LOG_FILE.  This is a package of procedures which handle the tasks of
     creating the file in which reconstruction output messages will be written
     to, writing to the latter file, and closing it at the end of
     reconstruction.

   - POST_STATE.  This is a package of three procedures and one function all
     of which serve the role of writing the states of all rules as they become
     available, in the system_state table.
DEPENDENCIES*/

/*VARIABLES
 Variables

 The following are variables used in the procedure:
   - NMFINR (INTEGER). Represents the number of major frames in the Recipe table.

   - MAX_QRANK1 (INTEGER).  Represents the maximum quality rank a minor frame can
     have.
VARIABLES*/

/*EXAMPLES
  Examples
 
  Here is a call to GEN_RECIPE2:
 
   BEGIN
       GEN_RECIPE2;
   END;
   /
 
 Note that this procedure takes no arguments.
EXAMPLES*/

/*EXCEPTIONS
 Exceptions

 There are no named exceptions for this procedure, except for the generic one
   WHEN OTHERS.  When the latter is triggered, the error message is outputted
   along with the name of the module that erred.
EXCEPTIONS*/

/*ERRORS
 Errors

 There are no errors that this procedure is known to generate.  Should an
   error occur, take action based on the description of the error.
ERRORS*/

/*TABLES
 Tables
 
 The following tables are referenced in this procedure:
  - RECIPE.  This table stores instructions about how and where to recover minor
    frames of all reconstructed frames.  These instructions are read by AD to
    assemble and decommutate imperfect frames.

 For more information on these and other tables, see the documentation on tables.
TABLES*/

/*OTHERS
 Others
 
 It should be noted that since there are five minor frame location tables, where
   information about minor frame ranges is stored, procedure GEN_RECIPE2 calls 
   sub-procedure GEN_RECIPE4 five times to write recipe instructions in table
   RECIPE.

 For more details on this procedure see the reconstruction documentation.
OTHERS*/
