MODULE SCA$REPORT_CUSTOMIZATIONS IDENT "T4.0-9" !************************************************************************* ! * ! © 2000 BY * ! COMPAQ COMPUTER CORPORATION * ! © 2000 BY * ! ELECTRONIC DATA SYSTEMS LIMITED * ! * ! THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND COPIED * ! ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE * ! INCLUSION OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE OR ANY OTHER * ! COPIES THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY * ! OTHER PERSON. NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY * ! TRANSFERRED. * ! * ! THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE * ! AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY COMPAQ COMPUTER * ! CORPORATION OR EDS. * ! * ! NEITHER COMPAQ NOR EDS ASSUME ANY RESPONSIBILITY FOR THE USE OR * ! RELIABILITY OF THIS SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY * ! COMPAQ. * ! * !************************************************************************* !++ ! Facility: ! SCA - Source Code Analyzer ! REPORT - Report Subfacility ! ! Abstract: ! The variables and constants collected in this file are intended to ! provide easy customization of certain aspects of reports. ! ! Table of Contents: ! ! 1. Customization information ! 2. Global variable declarations ! 2a. Report options (declarations) ! 3. Constants - target file types ! 4. Constants - tag formats ! 5. Constants - list styles ! 6. Constants - literal strings ! 7. Constants - tag synonyms ! 8. Constants - query expressions ! 9. Report options ! 9a. Options that affect how report code is loaded ! 9c. Option descriptions for the standard reports ! 9d. Initialization of options for "old-style" reports ! 10. Details about the portable syntax for reports !-- ! Customization information ! ! The information in this section supplements the Designing Programs manual. ! ! To customize report options: ! ! The Designing Programs manual tells how to modify report options for a ! report that uses the portable command interface (this includes all four ! of the reports provided by DIGITAL). ! ! It is also possible to modify report options for a report that does ! NOT use the portable command interface. Note that these techniques ! will not work to modify options of a report that uses the portable ! command interface. ! ! 1. Make a modified copy of SCA$REPORT_CUSTOMIZATIONS.TPU and change the ! value assigned to the option variable. ! ! 2. Use LSE to generate your report, and change the value of the option ! variable by issuing a TPU assignment from LSE: ! ! LSE> DO/TPU sca$report_load_report_tool ! LSE> DO/TPU "sca$report_option_xxx := yyy" ! LSE> REPORT ... ! ! where xxx is the option name, and yyy is the new value for it. You ! may change several option variables by issuing a sequence of ! assignment statements before the REPORT command. ! ! For example, suppose you are running a user-written report named ! USER_INTERNALS which is modeled after the standard INTERNALS report, ! but has not been upgraded to use the portable syntax. If you want ! only the top level of detail to be shown in the Body section of your ! USER_INTERNALS report, you can customize the overview_level option ! like this: ! ! LSE> DO/TPU sca$report_load_report_tool ! LSE> DO/TPU "sca$report_option_overview_level := 1" ! LSE> REPORT USER_INTERNALS ! ! How reports get started up: ! ! The file SCA$REPORT_CUSTOMIZATIONS.TPU is loaded first. The list of ! the rest of the TPU source files to be loaded is given by the variable ! sca$report_load_file_list in SCA$REPORT_CUSTOMIZATIONS.TPU. These ! source files are then loaded and compiled. (This step is skipped for ! subsequent REPORT commands within the same editing session.) ! ! After all the files are loaded and compiled, control is transferred to ! the top-level routine for the report. If "name" is the report name ! (possibly abbreviated) entered by the user in the REPORT command, the ! top-level routine is found using this algorithm: ! ! Look for a procedure named SCA_REPORT_name - if found, dispatch ! to it. ! ! Look for a procedure whose name starts with SCA_REPORT_name ! (followed by additional characters). If exactly one matching ! procedure name is found, dispatch to it. If more than one match is ! found, issue an error message and do not generate a report. If no ! match is found, issue an error message and do not generate a ! report. ! ! To customize the list of files loaded during report startup: ! ! To add a new report source file, edit SCA$REPORT_CUSTOMIZATIONS.TPU to ! add the new file name to sca$report_load_file_list, and use your ! modified SCA$REPORT_CUSTOMIZATIONS.TPU by following the procedure ! described in the section "To modify report source files" (above). ! ! Details of report definitions ! ! A report definition consists of definition entries. Each entry ! specifies a query or sequence of queries to be issued. Entries are ! organized in a hierarchy, where a lower-level entry is dependent on ! the higher-level entry immediately above it. For example, you could ! define a simple report consisting of 3 entries: ! ! entry 1 at level 1, query 1 (finds files within the report domain) ! entry 2 at level 2, query 2 (finds modules within each file) ! entry 3 at level 3, query 3 (finds routines within each module) ! ! Entry 2 will be processed only if query 1 is non-empty. If so, query 2 ! will be issued once for each entity in query 1's result. ! ! Entry 3 will be processed only if queries 1 and 2 are non-empty. If so, ! query 3 will be issued once for each entity in query 2's result. ! ! A query can use the results of a previous query or an occurrence within ! the query as part of its query expression. To use the result of a ! previous query, you can use a query of the form: ! FIND -name name1 ... ! ! and then, in a lower-level entry, include the query name as part of the ! query expression, such as: ! FIND @name1 AND OCCURRENCE=PRIMARY ! ! To use an occurrence within a query, you can specify a query name to ! be created for the entity by using the sca$report_add_entity_name ! call when building the definition entry. This query name can then be ! used in the queries of lower-level entries. You can see examples ! of this in the PACKAGE report definition. One example is the entity ! name SCA$REPORT_CURRENT_ROUTINE, which is used in the lower-level query ! for finding the parameters of the current routine. ! ! To simplify building a report definition, you may use subdefinitions. ! A subdefinition defines a sequence of report entries that may be ! needed at several places within the main definition. The subdefinition ! entries are entered into the main definition by calling the ! sca$report_definition_include_subdefinition utility routine. An ! example of the use of a subdefinition may be found in the PACKAGE report ! definition, where a subdefinition is used for the entries that specify ! queries needed for each routine. ! ! Constant values used for report definition calls are defined in ! sca$report_globals.tpu. ! ! Details of report execution ! ! Report execution is driven by the report definition tables for the ! report. For each entry, this processing is done: ! ! 1. The before_query action routine (if any) is invoked. Its ! context is: ! sca$report_current_entry_result is the result for the ! current entry's parent entry (since no entry result yet ! exists for the current entry). ! ! sca$report_current_occurrence_result is the result for the ! current entry's parent occurrence. ! ! 2. The query (or queries) for the entry is (are) issued. If the ! query result for the last query of the entry is empty, ! processing of the entry is complete, and processing proceeds to ! the next entry that is not dependent on the current entry. ! ! 3. The after_query action routine (if any) is invoked. Its ! context is: ! sca$report_current_entry_result is the result for the ! current entry's parent entry (since no entry result yet ! exists for the current entry). ! ! sca$report_current_occurrence_result is the result for the ! current entry's parent occurrencs. ! ! 4. The entry result for the current result is initialized. ! ! 5. For each unique name in the current query result (there are also ! options to process each unique symbol in the result or to process ! each occurrence in the result regardless of uniqueness) : ! ! 5a. The occurrence result is created and filled in for the ! occurrence. ! ! 5b. The before_each_entity action routine (if any) is invoked. ! Its context is: ! sca$report_current_entry_result is the entry result ! for the current entry. ! ! sca$report_current_occurrence_result is the occurrence ! result for the current occurrence. ! ! 5c. Lower-level (dependent) entries are processed recursively. ! ! 5d. The after_each_entity action routine (if any) is invoked. ! Its context is: ! sca$report_current_entry_result is the entry result ! for the current entry. ! ! sca$report_current_occurrence_result is the occurrence ! result for the current occurrence. ! ! 6. The after_all_entities action routine (if any) is invoked. ! Its context is: ! sca$report_current_entry_result is the entry result for the ! current entry. ! ! sca$report_current_occurrence_result is unreliable, and ! should not be referred to. ! ! 7. Cleanup for the current entry is done (this mainly consists of ! deleting the queries that were issued for the entry). ! ! 8. Processing proceeds to the next entry that is not dependent ! on the current entry, i.e., the next entry whose level number is ! less than or equal to the current entry's level number. ! ! Query cleanup is done automatically by the report processing code. A ! query is deleted when its entry has been completely processed. This ! includes the processing of all subentries. ! ! The structure of the result arrays is based on the structure of the ! report definition. For each level 1 definition entry, there is a ! corresponding entry result array. Each entry result array contains a ! list of occurrence result arrays, one for each occurrence with the ! entry's query result. Each occurrence array contains attribute ! information about the occurrence, plus a list of entry result arrays ! for subentries of the occurrence. These lower-level entry arrays in ! turn each contain a list of occurrence result arrays, and so forth. ! All the entry and occurrence results form a tree of result information ! (or several trees, if there are several level 1 entries) for the report. ! ! Result arrays are deleted when the report is complete. In order to ! keep memory usage optimal during report processing, utility routines ! are available to allow action routines to delete result arrays that are ! no longer needed. These utility routines ! (sca$report_clear_entry_result and sca$report_delete_occurrence_result) ! are defined in sca$report_utilities.tpu. ! Global variable declarations ! ! Report options (declarations) ! These variables correspond to options that control report processing. ! The default values of these options are set in the "Report options" ! section at the end of this file, and a description of each variable is ! also in that section. ! VARIABLE sca$report_load_file_list, sca$report_option_decl_class_modules, sca$report_option_decl_class_routines, sca$report_option_description_indent_width, sca$report_option_internals_maximum_fragment_size, sca$report_option_list_style, sca$report_option_load_success_flag, sca$report_option_overview_level, sca$report_option_sca_debug_messages, sca$report_option_status_messages, sca$report_option_traceback_flag, sca$report_option_trace_messages, sca$report_option_use_source_spelling; ! Constants - target file types ! ! Several synonyms are available for each target name. For example, the ! DOCUMENT target can be specified as either /TARGET=DOCUMENT or ! /TARGET=SDML. ! ! Each target name is mapped to a code; synonyms are mapped to the same code. ! For example, DOCUMENT and SDML are both mapped to ! SCA$REPORT_K_TARGET_DOCUMENT. ! CONSTANT sca$report_k_first_target_index := 1, sca$report_k_target_text := 1, ! TEXT or TXT sca$report_k_target_runoff := 2, ! RUNOFF, RNO, or DSR sca$report_k_target_document := 3, ! DOCUMENT or SDML sca$report_k_target_lse_vms := 4, ! VMS or (obsolete) LSE, LSEDIT sca$report_k_target_lse_portable := 5, ! PORTABLE sca$report_k_target_help := 6, ! HELP or HLP sca$report_k_target_other := 7, ! OTHER sca$report_k_last_target_index := 7; CONSTANT sca$report_k_target_lsedit := sca$report_k_target_lse_vms; ! Constants - tag formats ! ! The following constants are defined for the how_to_write_flag, which is ! passed to the SCA$REPORT_WRITE_TAGS_xxx routines. That flag indicates ! which of the formats listed below should be used when writing tagged ! comment text. ! CONSTANT sca$report_k_first_how_to_write := 1, sca$report_k_write_as_is := 1, sca$report_k_write_by_paragraphs := 2, sca$report_k_write_by_line := 3, sca$report_k_write_as_table := 4, sca$report_k_write_by_list := 5, sca$report_k_write_as_list_element := 6, sca$report_k_last_how_to_write := 6; ! Constants - list styles ! ! The following constants are defined for passing as the list_type to the ! sca$report_start_list procedure. ! CONSTANT sca$report_k_first_list_index := 1, sca$report_k_list_simple := 1, sca$report_k_list_unnumbered := 2, sca$report_k_list_numbered := 3, sca$report_k_list_lower_alpha := 4, sca$report_k_list_upper_alpha := 5, sca$report_k_list_lower_roman := 6, sca$report_k_list_upper_roman := 7, sca$report_k_last_list_index := 7; ! Constants - literal strings ! ! The following constants are collected together to simplify customizing ! strings such as chapter and section headings. ! ! CONSTANT sca$report_item_type := 'Type', sca$report_none := 'None', sca$report_no_description := 'No description was found.', sca$report_no_units := 'No units for this CSC.', sca$report_parent_line := 'This component is a sub-level component of:', sca$report_sub_line := 'This component has the following sub-level components:', sca$report_unknown := 'Unknown'; ! Section Headings. These are strings that are used as the headings for ! sections written by the report tool. To change the heading, simply change ! the value assigned to the appropriate constant. ! CONSTANT sca$report_section_body := 'Body', sca$report_section_common := 'COMMON data', sca$report_section_component_info_section := 'Component Information', sca$report_section_detailed_design := 'Detailed Design', sca$report_section_detailed_global_data := 'Global variables', sca$report_section_exported_types := 'Exported types', sca$report_section_exported_variables := 'Exported variables', sca$report_section_imported_routines := 'Imported routines', sca$report_section_imported_types := 'Imported types', sca$report_section_imported_variables := 'Imported variables', sca$report_section_included_files := 'Included files', sca$report_section_parent_csc := 'Parent Components', sca$report_section_sub_csc := 'Sub-level Components', sca$report_section_unit_section := 'Units', sca$report_section_routine_description := 'Functional Description', sca$report_section_variables := 'Intramodule variables'; ! Constants - tag synonyms ! ! These constants define the comment tags that are used (interchangeably) to ! get comment text used in certain sections of a report. For example, the ! HELP report uses the value of the constant sca$report_module_descriptions ! as part of the query to get comment text for the module description in ! level 1 help text. ! CONSTANT ! Tags used to find the comment text for the module description in ! level 1 help text. HELP report. ! sca$report_module_descriptions := '("PROGRAM DESCRIPTION" OR ' + '"PACKAGE DESCRIPTION" OR ' + '"MODULE DESCRIPTION" OR ' + '"ABSTRACT")', ! Tags that apply to an entire module. They are explicitly listed here, ! because we need a way to differentiate between routine tags and module ! tags for languages that don't have modules. INTERNALS report. ! sca$report_module_tags := '("PROGRAM DESCRIPTION" OR ' + '"PACKAGE DESCRIPTION" OR ' + '"MODULE DESCRIPTION" OR ' + '"ABSTRACT" OR ' + '"AUTHORS" OR ' + '"AUTHOR(S)" OR ' + '"AUTHOR" OR ' + '"CREATION DATE" OR ' + '"FACILITY" OR ' + '"DESIGN ISSUES")' , ! Tags for parameter description text. HELP and INTERNALS reports. ! sca$report_routine_parameters := '("FORMAL PARAMETERS" OR ' + '"FORMAL ARGUMENTS" OR ' + '"PARAMETERS" OR ' + '"ARGUMENTS")' , ! Tags for component description text. 2167A_DESIGN report. ! sca$report_component_descriptions := '(' + sca$report_module_descriptions + ' OR ' + '"COMPONENT DESCRIPTION")', ! Tags for top-level (component) names. 2167A_DESIGN report. ! sca$report_2167_csc_tags := '("COMPONENT")', ! Tags for lower-level (subcomponent) names. 2167A_DESIGN report. ! sca$report_2167_subcomponent_tags := '("COMPONENT OF" OR "SUBCOMPONENT OF")', ! Tags for the functional description of a routine. HELP report. ! sca$report_routine_description_tags := '("FUNCTIONAL DESCRIPTION")', ! Tags for the return value of a routine. HELP and INTERNALS reports. ! sca$report_routine_return_value := '("RETURN VALUE" OR "ROUTINE VALUE" OR "FUNCTION VALUE")'; CONSTANT sca$report_standard_query_filter := ' OCCURRENCE=EXPLICIT AND NOT DOMAIN=PREDEFINED ', ! Tag names that get special processing and should therefore be ! excluded from the query for top-level tagged comments of a routine. ! sca$report_excluded_tags := ' "MODIFICATION HISTORY" OR ' + ' "$TITLE" OR ' + ' "$SUBTITLE" OR ' + ' "FORMAL PARAMETERS" OR ' + ' "FORMAL ARGUMENTS" OR ' + ' "ARGUMENTS" OR ' + ' "PARAMETERS" OR ' + ' "RETURNS" OR ' + ' "RETURN VALUE" OR ' + ' "FUNCTION VALUE" '; CONSTANT sca$_nosuch_action_routine := 'No such action routine: '; ! Constants - query expressions ! CONSTANT sca$report_k_query_modules_1 := 'FIND SYMBOL=MODULE AND ' + 'OCCURRENCE=COMPILATION_UNIT AND ' + 'OCCURRENCE=', sca$report_k_query_modules_2 := ' AND FILE=', sca$report_k_query_nonmodules_1 := 'FIND -name SCA$REPORT_CURRENT_MODULE ' + '(NOT SYMBOL=MODULE) AND ' + 'OCCURRENCE=COMPILATION_UNIT AND ' + 'OCCURRENCE=', sca$report_k_query_nonmodules_2 := ' AND FILE=', ! Query to find the tagged comment containing the module description for ! a compilation unit that SCA sees as a module. ! sca$report_k_query_module_description_tag := 'FIND CONTAINED_BY (@SCA$REPORT_CURRENT_MODULE,' + 'SYMBOL=TAG AND ' + sca$report_module_descriptions + ' AND (NOT DOMAIN=INCLUDE),' + 'DEPTH=1, RESULT=BEGIN)', ! Query to find the tagged comment containing the module description for ! a compilation unit that SCA doesn't see as a module, e.g., a FORTRAN ! SUBROUTINE. ! sca$report_k_query_nonmodule_description := 'FIND CONTAINED_BY (@SCA$REPORT_CURRENT_MODULE,' + 'SYMBOL=TAG AND ' + sca$report_module_descriptions + ' AND (NOT DOMAIN=INCLUDE),' + 'DEPTH=ALL, RESULT=BEGIN)', sca$report_k_query_module_tags_1 := 'FIND -name SCA$REPORT_TEMP1 ' + 'CONTAINED_BY (@SCA$REPORT_CURRENT_MODULE,' + 'SYMBOL=TAG AND (NOT $REMARK) AND (NOT $UNTAGGED) AND ' + '(NOT DOMAIN=INCLUDE),' + 'DEPTH=1, RESULT=BEGIN)', sca$report_k_query_module_tags_2 := 'FIND @SCA$REPORT_TEMP1 AND NOT (' + sca$report_excluded_tags + ')', sca$report_k_query_nonmodule_module_tags_1 := 'FIND -name SCA$REPORT_TEMP1 ' + 'CONTAINED_BY (@SCA$REPORT_CURRENT_MODULE,' + 'SYMBOL=TAG AND (NOT $REMARK) AND (NOT $UNTAGGED) AND ' + '(NOT DOMAIN=INCLUDE),' + 'DEPTH=ALL, RESULT=BEGIN)', sca$report_k_query_nonmodule_tags_2 := 'FIND @SCA$REPORT_TEMP1 AND (' + sca$report_module_tags + ')', sca$report_k_query_routines_1 := 'FIND CONTAINED_BY (@SCA$REPORT_CURRENT_MODULE,' + 'SYMBOL=(ROUTINE,GENERIC,TASK) AND ' + 'OCCURRENCE=', ! some combination of PRIMARY and ASSOCIATED ! gets filled in here when the dynamic query ! is formed sca$report_k_query_routines_2 := ' AND ' + sca$report_standard_query_filter + ',' + 'DEPTH=', ! depth is filled in based on routine_depth ! option value (or default) sca$report_k_query_routines_3 := ', RESULT=BEGIN)', sca$report_k_query_common := 'FIND CONTAINED_BY (@SCA$REPORT_CURRENT_MODULE,' + 'SYMBOL=PSECT AND OCCURRENCE=PRIMARY AND NOT DOMAIN=PRED' + ',' + 'DEPTH=1, RESULT=BEGIN)', sca$report_k_query_exported_types := 'FIND CONTAINED_BY (@SCA$REPORT_CURRENT_MODULE,' + 'SYMBOL=TYPE AND DOMAIN=INHERITABLE AND OCCURRENCE=PRIMARY AND ' + sca$report_standard_query_filter + ',' + 'DEPTH=1, RESULT=BEGIN)', sca$report_k_query_exported_variables := 'FIND CONTAINED_BY (@SCA$REPORT_CURRENT_MODULE,' + 'SYMBOL=VARIABLE AND OCCURRENCE=PRIMARY AND ' + 'DOMAIN=(INHERITABLE,GLOBAL) AND ' + sca$report_standard_query_filter + ',' + 'DEPTH=1, RESULT=BEGIN)', sca$report_k_query_imported_routines_1 := 'FIND -name SCA$REPORT_REF_OR_DECL ' + 'IN (@SCA$REPORT_CURRENT_MODULE,' + 'SYMBOL=ROUTINE ', ! either nothing or AND (NOT OCCUR=ASSOC) ! is added here when the dynamic query is ! formed. sca$report_k_query_imported_2 := ' AND OCCURRENCE=EXPLICIT AND DOMAIN=(INHERITABLE,GLOBAL) )', sca$report_k_query_nonmodule_imported_routines_1 := 'FIND -name SCA$REPORT_REF_OR_DECL ' + '(@SCA$REPORT_CURRENT_MODULE AND SYMBOL=ROUTINE) OR ' + 'IN (@SCA$REPORT_CURRENT_MODULE,' + 'SYMBOL=ROUTINE ', ! either nothing or AND (NOT OCCUR=ASSOC) ! is added here when the dynamic query is ! formed. sca$report_k_query_imported_types_1 := 'FIND -name SCA$REPORT_REF_OR_DECL ' + 'IN (@SCA$REPORT_CURRENT_MODULE,' + 'SYMBOL=TYPE ', ! either nothing or AND (NOT OCCUR=ASSOC) ! is added here when the dynamic query is ! formed. sca$report_k_query_imported_variables_1 := 'FIND -name SCA$REPORT_REF_OR_DECL ' + 'IN (@SCA$REPORT_CURRENT_MODULE,' + 'SYMBOL=VARIABLE ', ! either nothing or AND (NOT OCCUR=ASSOC) ! is added here when the dynamic query is ! formed. sca$report_k_query_ref_not_decl_1 := 'FIND @SCA$REPORT_REF_OR_DECL' + ' AND NOT EXPAND(@SCA$REPORT_REF_OR_DECL AND OCCURRENCE=', ! some combination of PRIMARY and ASSOCIATED gets ! filled in here when the dynamic query is formed sca$report_k_query_ref_not_decl_2 := ')' , sca$report_k_query_included_files := 'FIND IN (@SCA$REPORT_CURRENT_MODULE,' + 'SYMBOL=FILE AND OCCURRENCE=INCLUDE)', sca$report_k_query_module_variables := 'FIND CONTAINED_BY (@SCA$REPORT_CURRENT_MODULE,' + 'SYMBOL=VARIABLE AND OCCURRENCE=PRIMARY AND ' + 'DOMAIN=MODULE_SPECIFIC AND ' + sca$report_standard_query_filter + ',' + 'DEPTH=1, RESULT=BEGIN)', sca$report_k_query_object_description := 'FIND -name SCA$REPORT_TAGS ' + 'CONTAINED_BY (@SCA$REPORT_CURRENT_OBJECT,' + 'SYMBOL=TAG AND (NOT $REMARK), DEPTH=1, RESULT=BEGIN)', sca$report_k_query_return_value := 'FIND CONTAINED_BY (@SCA$REPORT_CURRENT_ROUTINE,' + 'SYMBOL=TAG AND ' + sca$report_routine_return_value + ',' + 'DEPTH=1, RESULT=BEGIN)', sca$report_k_query_parameter_untagged_text := 'FIND CONTAINED_BY (@SCA$REPORT_CURRENT_PARAMETER,' + 'SYMBOL=TAG AND $UNTAGGED, DEPTH=1, RESULT=BEGIN)', sca$report_k_query_parameters := 'FIND TYPING (@SCA$REPORT_CURRENT_ROUTINE,' + 'SYMBOL=ARGUMENT AND OCCURRENCE=DECL, DEPTH=1, RESULT=BEGIN)', sca$report_k_query_parameter_tag := 'FIND -name SCA$REPORT_CURRENT_TAG ' + 'CONTAINED_BY (@SCA$REPORT_CURRENT_ROUTINE,' + 'SYMBOL=TAG AND (' + sca$report_routine_parameters + '),' + ' DEPTH=1, RESULT=BEGIN)', sca$report_k_query_parameter_all_subtags := 'FIND -name SCA$REPORT_CURRENT_SUBTAGS ' + 'CONTAINED_BY (@SCA$REPORT_CURRENT_TAG, SYMBOL=TAG,' + 'DEPTH=1, RESULT=BEGIN)', ! The specific parameter name is filled in by an action routine. ! sca$report_k_query_parameter_one_subtag := 'FIND @SCA$REPORT_CURRENT_SUBTAGS AND ', sca$report_k_query_routine_description_tag := 'FIND CONTAINED_BY (@SCA$REPORT_CURRENT_ROUTINE,' + 'SYMBOL=TAG AND ' + sca$report_routine_description_tags + ',' + 'DEPTH=1, RESULT=BEGIN)', ! The following 2 queries could be one except that the resulting query is ! longer than the maximum allowed command length. ! sca$report_k_query_routine_tags_1 := 'FIND -name SCA$REPORT_TEMP1 ' + 'CONTAINED_BY (@SCA$REPORT_CURRENT_ROUTINE,' + 'SYMBOL=TAG AND (NOT $UNTAGGED), ' + 'DEPTH=1, RESULT=BEGIN)', sca$report_k_query_routine_tags_2 := 'FIND @SCA$REPORT_TEMP1 AND (NOT (' + sca$report_excluded_tags + '))', ! The following 3 queries could be one except that the resulting query is ! longer than the maximum allowed command length. ! sca$report_k_query_routine_tags_nomodule_1 := 'FIND -name SCA$REPORT_TEMP1 ' + 'CONTAINED_BY (@SCA$REPORT_CURRENT_ROUTINE,' + 'SYMBOL=TAG AND (NOT $UNTAGGED), ' + 'DEPTH=1, RESULT=BEGIN)', sca$report_k_query_routine_tags_nomodule_2 := 'FIND -name SCA$REPORT_TEMP2 ' + '@SCA$REPORT_TEMP1 AND (NOT (' + sca$report_module_tags + '))', sca$report_k_query_routine_tags_nomodule_3 := 'FIND @SCA$REPORT_TEMP2 ' + 'AND (NOT (' + sca$report_excluded_tags + '))', sca$report_k_query_routine_remark := 'FIND CONTAINED_BY (@SCA$REPORT_CURRENT_ROUTINE,' + 'SYMBOL=TAG AND $REMARK AND (NOT DOMAIN=INCLUDE),' + 'DEPTH=2, RESULT=BEGIN)', ! Beginning of 2167a queries sca$report_k_query_domain := 'FIND @SCA$REPORT_DOMAIN AND SYMBOL=FILE', ! The following 2 queries are split up to make it easier to fill in the ! list of file names of the domain. ! sca$report_k_query_csc_tags_domain_1 := 'FIND CONTAINED_BY (' + sca$report_2167_csc_tags + ' AND SYMBOL=TAG ' + 'AND FILE=(', sca$report_k_query_csc_tags_domain_2 := '), SYMBOL=KEYWORD, DEPTH=1, RESULT=BEGIN)', sca$report_k_query_csc_tags_nodomain := 'FIND CONTAINED_BY (' + sca$report_2167_csc_tags + ' AND SYMBOL=TAG,' + 'SYMBOL=KEYWORD, DEPTH=1, RESULT=BEGIN)', sca$report_k_query_component_tags := 'FIND SYMBOL=TAG AND (' + sca$report_component_descriptions + ') ' + 'AND FILE=', sca$report_k_query_parent_csc := 'FIND -name SCA$REPORT_PARENT_CSC ' + sca$report_2167_subcomponent_tags + ' AND FILE=', sca$report_k_query_parent_keywords := 'FIND CONTAINED_BY (@SCA$REPORT_PARENT_CSC, SYMBOL=KEYWORD,' + 'DEPTH=1, RESULT=BEGIN)', ! The following query is split in 2 pieces so that the CSC name can be ! inserted in the middle. ! sca$report_k_query_subcomponent_csc_1 := 'FIND CONTAINED_BY(' + sca$report_2167_subcomponent_tags + ' AND SYMBOL=TAG,', sca$report_k_query_subcomponent_csc_2 := ' AND SYMBOL=KEYWORD, DEPTH=1, RESULT=BEGIN)', ! The following 2 queries are split up to make it easier to fill in the ! file name of the subcomponent. ! sca$report_k_query_subcomponent_keywords_1 := 'FIND CONTAINED_BY (' + sca$report_2167_csc_tags + ' AND SYMBOL=TAG ' + 'AND FILE=', sca$report_k_query_subcomponent_keywords_2 := ', SYMBOL=KEYWORD, DEPTH=1, RESULT=BEGIN)', sca$report_k_query_component_io := 'FIND SYMBOL=TAG AND "INPUT/OUTPUT DATA" AND FILE=', sca$report_k_query_component_algorithms := 'FIND SYMBOL=TAG AND "ALGORITHMS" AND FILE=', sca$report_k_query_component_error_handling := 'FIND SYMBOL=TAG AND "ERROR HANDLING" AND FILE=', sca$report_k_query_component_data_conversion := 'FIND SYMBOL=TAG AND "DATA CONVERSION" AND FILE=', sca$report_k_query_component_logic_flow := 'FIND SYMBOL=TAG AND "LOGIC FLOW" AND FILE=', sca$report_k_query_component_requirements := 'FIND SYMBOL=TAG AND "REQUIREMENTS ALLOCATION" AND FILE=', ! The following query is split in 2 so that the CSC name can be inserted ! in the middle. ! sca$report_k_query_2167a_units_1 := 'FIND CONTAINED_BY ("UNIT OF" AND SYMBOL=TAG,', sca$report_k_query_2167a_units_2 := ' AND SYMBOL=KEYWORD, DEPTH=1, RESULT=BEGIN)', sca$report_k_query_2167a_unit_description := 'FIND SYMBOL=TAG AND ("UNIT DESCRIPTION") AND FILE=', sca$report_k_query_2167a_unit_io := 'FIND SYMBOL=TAG AND "INPUT/OUTPUT DATA ELEMENTS" AND FILE=', sca$report_k_query_2167a_unit_data := 'FIND SYMBOL=TAG AND "LOCAL DATA ELEMENTS" AND FILE=', sca$report_k_query_2167a_unit_int := 'FIND SYMBOL=TAG AND "INTERRUPTS AND SIGNALS" AND FILE=', sca$report_k_query_2167a_unit_alg := 'FIND SYMBOL=TAG AND "UNIT ALGORITHMS" AND FILE=', sca$report_k_query_2167a_unit_error := 'FIND SYMBOL=TAG AND "UNIT ERROR HANDLING" AND FILE=', sca$report_k_query_2167a_unit_conv := 'FIND SYMBOL=TAG AND "UNIT DATA CONVERSION" AND FILE=', sca$report_k_query_2167a_unit_other := 'FIND SYMBOL=TAG AND "USE OF OTHER ELEMENTS" AND FILE=', sca$report_k_query_2167a_unit_logic := 'FIND SYMBOL=TAG AND "UNIT LOGIC FLOW" AND FILE=', sca$report_k_query_2167a_unit_struct := 'FIND SYMBOL=TAG AND "DATA STRUCTURES" AND FILE=', sca$report_k_query_2167a_unit_files := 'FIND SYMBOL=TAG AND ("LOCAL DATA FILES" OR "LOCAL DATABASES") AND FILE=', sca$report_k_query_2167a_unit_limits := 'FIND SYMBOL=TAG AND "LIMITATIONS" AND FILE=', sca$report_k_query_2167a_unit_req := 'FIND SYMBOL=TAG AND "REQUIREMENTS ALLOCATED TO THIS UNIT" AND FILE='; ! Query expressions that are no longer used by the standard reports - ! retained for compatibility with user-written reports that may still use ! them. ! CONSTANT sca$report_k_query_modules_pa := 'FIND SYMBOL=MODULE AND ' + 'OCCURRENCE=COMPILATION_UNIT AND ' + 'OCCURRENCE=(PRIMARY,ASSOCIATED) AND ' + 'FILE=', sca$report_k_query_nonmodules_pa := 'FIND -name SCA$REPORT_CURRENT_MODULE ' + '(NOT SYMBOL=MODULE) AND ' + 'OCCURRENCE=COMPILATION_UNIT AND ' + 'OCCURRENCE=(PRIMARY,ASSOCIATED) AND ' + 'FILE=', sca$report_k_query_modules_p := 'FIND SYMBOL=MODULE AND ' + 'OCCURRENCE=COMPILATION_UNIT AND ' + 'OCCURRENCE=PRIMARY AND ' + 'FILE=', sca$report_k_query_nonmodules_p := 'FIND -name SCA$REPORT_CURRENT_MODULE ' + '(NOT SYMBOL=MODULE) AND ' + 'OCCURRENCE=COMPILATION_UNIT AND ' + 'OCCURRENCE=PRIMARY AND ' + 'FILE=', sca$report_k_query_modules_a := 'FIND SYMBOL=MODULE AND ' + 'OCCURRENCE=COMPILATION_UNIT AND ' + 'OCCURRENCE=ASSOCIATED AND ' + 'FILE=', sca$report_k_query_nonmodules_a := 'FIND -name SCA$REPORT_CURRENT_MODULE ' + '(NOT SYMBOL=MODULE) AND ' + 'OCCURRENCE=COMPILATION_UNIT AND ' + 'OCCURRENCE=ASSOCIATED AND ' + 'FILE=', sca$report_k_query_routines_pa := 'FIND CONTAINED_BY (@SCA$REPORT_CURRENT_MODULE,' + 'SYMBOL=(ROUTINE,GENERIC,TASK) AND ' + 'OCCURRENCE=(PRIMARY,ASSOCIATED) AND ' + sca$report_standard_query_filter + ',' + 'DEPTH=1, RESULT=BEGIN)', sca$report_k_query_routines_p := 'FIND CONTAINED_BY (@SCA$REPORT_CURRENT_MODULE,' + 'SYMBOL=(ROUTINE,GENERIC,TASK) AND ' + 'OCCURRENCE=PRIMARY AND ' + sca$report_standard_query_filter + ',' + 'DEPTH=1, RESULT=BEGIN)', sca$report_k_query_routines_a := 'FIND CONTAINED_BY (@SCA$REPORT_CURRENT_MODULE,' + 'SYMBOL=(ROUTINE,GENERIC,TASK) AND ' + 'OCCURRENCE=ASSOCIATED AND ' + sca$report_standard_query_filter + ',' + 'DEPTH=1, RESULT=BEGIN)', sca$report_k_query_imported_routines_p := 'FIND -name SCA$REPORT_REF_OR_DECL ' + 'IN (@SCA$REPORT_CURRENT_MODULE,' + 'SYMBOL=ROUTINE AND (NOT OCCUR=ASSOC)' + ' AND OCCURRENCE=EXPLICIT AND DOMAIN=(INHERITABLE,GLOBAL) )', sca$report_k_query_imported_routines_pa := 'FIND -name SCA$REPORT_REF_OR_DECL ' + 'IN (@SCA$REPORT_CURRENT_MODULE,' + 'SYMBOL=ROUTINE' + ' AND OCCURRENCE=EXPLICIT AND DOMAIN=(INHERITABLE,GLOBAL) )', sca$report_k_query_nonmodule_imported_routines_p := 'FIND -name SCA$REPORT_REF_OR_DECL ' + '(@SCA$REPORT_CURRENT_MODULE AND SYMBOL=ROUTINE) OR ' + 'IN (@SCA$REPORT_CURRENT_MODULE,' + 'SYMBOL=ROUTINE AND (NOT OCCUR=ASSOC)' + ' AND OCCURRENCE=EXPLICIT AND DOMAIN=(INHERITABLE,GLOBAL) )', sca$report_k_query_nonmodule_imported_routines_pa := 'FIND -name SCA$REPORT_REF_OR_DECL ' + '(@SCA$REPORT_CURRENT_MODULE AND SYMBOL=ROUTINE) OR ' + 'IN (@SCA$REPORT_CURRENT_MODULE,' + 'SYMBOL=ROUTINE' + ' AND OCCURRENCE=EXPLICIT AND DOMAIN=(INHERITABLE,GLOBAL) )', sca$report_k_query_imported_types_p := 'FIND -name SCA$REPORT_REF_OR_DECL ' + 'IN (@SCA$REPORT_CURRENT_MODULE,' + 'SYMBOL=TYPE AND (NOT OCCUR=ASSOC)' + ' AND OCCURRENCE=EXPLICIT AND DOMAIN=(INHERITABLE,GLOBAL) )', sca$report_k_query_imported_types_pa := 'FIND -name SCA$REPORT_REF_OR_DECL ' + 'IN (@SCA$REPORT_CURRENT_MODULE,' + 'SYMBOL=TYPE' + ' AND OCCURRENCE=EXPLICIT AND DOMAIN=(INHERITABLE,GLOBAL) )', sca$report_k_query_imported_variables_p := 'FIND -name SCA$REPORT_REF_OR_DECL ' + 'IN (@SCA$REPORT_CURRENT_MODULE,' + 'SYMBOL=VARIABLE AND (NOT OCCUR=ASSOC)' + ' AND OCCURRENCE=EXPLICIT AND DOMAIN=(INHERITABLE,GLOBAL) )', sca$report_k_query_imported_variables_pa := 'FIND -name SCA$REPORT_REF_OR_DECL ' + 'IN (@SCA$REPORT_CURRENT_MODULE,' + 'SYMBOL=VARIABLE' + ' AND OCCURRENCE=EXPLICIT AND DOMAIN=(INHERITABLE,GLOBAL) )', sca$report_k_query_ref_not_decl_p := 'FIND @SCA$REPORT_REF_OR_DECL' + ' AND NOT EXPAND(@SCA$REPORT_REF_OR_DECL AND OCCURRENCE=PRIMARY)', sca$report_k_query_ref_not_decl_pa := 'FIND @SCA$REPORT_REF_OR_DECL' + ' AND NOT EXPAND(@SCA$REPORT_REF_OR_DECL' + ' AND OCCURRENCE=(PRIMARY,ASSOC) )'; ENDMODULE ! Report options ! Options that affect how report code is loaded. ! The list of TPU source files to be loaded on the first invocation of ! a portable report command (SET REPORT, SHOW REPORT, RESET REPORT, or ! REPORT) or of the CLI REPORT command. ! sca$report_load_file_list := 'SCA$QUERY_CALLABLE,SCA$REPORT_GLOBALS,' + 'SCA$REPORT_FORMAT,SCA$REPORT_FORMAT_DOCUMENT,SCA$REPORT_FORMAT_RUNOFF,' + 'SCA$REPORT_FORMAT_TEXT,' + 'SCA$REPORT_OUTPUT,SCA$REPORT_UTILITIES,SCA$REPORT_VALIDATE,' + 'SCA$REPORT_HELP,SCA$REPORT_INTERNALS,SCA$REPORT_PACKAGE,' + 'SCA$REPORT_2167A_DESIGN,SCA$REPORT_PORTABLE_SYNTAX'; ! Boolean option controlling the display of compilation success messages when ! report code is loaded. This option may not be set by the portable ! SET REPORT command, since the report code must be loaded before a SET ! REPORT command is given. ! Default value = False (suppress the messages). ! sca$report_option_load_success_flag := False; ! Option descriptions for the standard reports ! ! Note: Boolean options may be set to ON (or 1 or TRUE) or OFF (or 0 or ! FALSE). ! ! DOMAIN_QUERY ! ! A string giving the name of the query to be used as the domain for the ! report. The report will cover the source files in the domain query ! result. The domain query should normally be of the form: ! FIND SYMBOL=FILE AND OCCURRENCE=COMMAND AND ... ! If the domain query name is null, the report covers the entire SCA library. ! Default value = null string ! ! FILL ! ! Boolean option to control whether comment text in the report is filled. ! Default value = ON ! ! OUTPUT ! ! Output file specification for the report. The default value depends on the ! report name and target (see default values for each standard report above). ! ! TARGET ! ! String that indicates the type of output file to generate. The valid ! values of the TARGET are report-dependent (see standard report option lists ! above). ! ! LANGUAGES ! ! String containing the list of languages to be used in a PACKAGE report. ! For example, if you want the package to be available for Ada, C, and ! FORTRAN, set this option to the string '(Ada,C,FORTRAN)'. ! Default value = '({language-name1}...)' ! ! HELP_LIBRARY ! ! File specification to be used as the help library in a PACKAGE report. ! Default value = null string ! ! DECL_CLASS_MODULES, DECL_CLASS_ROUTINES ! ! Boolean options to control whether declaration class information appears in ! report output (ON means to include the information). ! Default value = ON (but overridden for some languages). ! ! The declaration class of each module and routine may be included in the ! report output (for INTERNALS and HELP reports). The default is to include ! this information, but the default is overridden for some languages in the ! standard before_each_entity action routine, because the declaration class ! description doesn't contribute any useful information for those languages. ! ! DECL_CLASS_MODULES ! ! Include the declaration class of each module in the report output. ! ! DECL_CLASS_ROUTINES ! ! Include the declaration class of each routine in the report output. ! ! DESCRIPTION_INDENT_WIDTH ! ! Integer option, giving the width of the first column of 2-column tables. ! 2-column tables are used in INTERNALS reports for displaying the name and ! type of imported variables, for example. ! Default value = 32. ! ! INTERNALS_MAXIMUM_FRAGMENT_SIZE ! ! Integer option, giving the maximum number of lines of source code to be ! displayed in a single code fragment of an INTERNALS routine body. If a ! fragment has more lines than this, it will be collapsed (if possible) and ! overview lines will be displayed to represent the source lines. ! Default value = 12. ! ! LIST_STYLE ! ! Integer option, giving the list style to use. The list style options are ! defined above in the section "Constants - list styles". ! Default value = 3 (numbered lists) ! ! LITERAL_ANGLE_BRACKETS ! ! Boolean option controlling whether text that looks like SDML tags should ! be surrounded by LITERAL<...>. ON means to add the LITERAL tags. ! Default value = ON. ! ! OPTION_OVERVIEW_LEVEL ! ! Integer option controlling what depth of detail to display for the Body ! section of an INTERNALS report. This section contains the code body for a ! routine, in overview format. ! To suppress the code body sections entirely, set this variable to 0. ! To limit the amount of detail shown in the code body, set this variable to ! the number of levels you wish to see (e.g., 2 means show the top 2 levels ! of detail). ! To show all levels of detail, set this variable to -1. ! ! Default value = -1 (show all levels of detail). ! ! SCA_DEBUG_MESSAGES ! ! Boolean option controlling whether to enable debugging messages giving SCA ! status values. ON means to enable these messages. ! Default value = OFF (suppress the messages). ! ! STATUS_MESSAGES ! ! Boolean option controlling whether to enable status messages. ON means ! to enable these messages. ! Default value = OFF (enable the messages). ! ! TRACEBACK_FLAG ! ! Boolean option controlling whether to enable TPU traceback messages during ! report execution. ON means to enable these messages. ! Default value = ON (enable the messages). ! ! TRACE_MESSAGES ! ! Boolean option controlling whether to enable trace messages (generated by ! calling sca$report_trace_message). ON means to enable these messages. ! Default value = OFF (suppress the messages). ! ! USE_SOURCE_SPELLING ! ! Boolean option controlling whether the spelling of routine/variable/type ! names should be taken from the source file or the spelling supplied by SCA ! (all upper-case) should be used. ON means to take the source file ! spelling. ! Default value = ON (get the spelling of identifiers from the source ! declaration). ! Initialization of options for "old-style" reports ! ! The following assigment statements set default values for "old-style" ! reports (those without a define_options procedure). For "new-style" ! reports, the list of valid options and their defaults are specified in the ! define_options procedure for the report. The naming convention for these ! option variables is that if the option name is XXX, then the corresponding ! option variable is named sca$report_option_XXX. ! sca$report_option_decl_class_modules := True; sca$report_option_decl_class_routines := True; sca$report_option_description_indent_width := 32; sca$report_option_internals_maximum_fragment_size := 12; sca$report_option_list_style := sca$report_k_list_numbered; sca$report_option_overview_level := -1; sca$report_option_sca_debug_messages := False; sca$report_option_status_messages := True; sca$report_option_traceback_flag := True; sca$report_option_trace_messages := False; sca$report_option_use_source_spelling := True; ! Details about the portable syntax for reports ! ! The portable syntax is supported by all the standard reports (HELP, ! INTERNALS, PACKAGE, and 2167A_DESIGN). To take full advantage of the ! portable syntax in customized or user-written reports, you need to: ! ! 1. provide a procedure named sca$report_define_options_XXX (where XXX ! is the full name of your report). This procedure specifies what ! options are available for your report, what their default values are, ! and any special processing that needs to be done when they are set. ! For an example of an options definition procedure, see ! sca$report_define_options_package in the file ! sys$library:sca$report_package.tpu. ! ! 2. call the new initialization procedure ! sca$report_portable_initialization instead of the procedure ! sca$report_common_initialization. This new procedure takes no ! parameters. ! ! 3. add the file SCA$REPORT_PORTABLE_SYNTAX to the list in ! sca$report_load_file_list (normally defined in ! sca$report_customizations.tpu). ! ! Existing reports do not require any changes, but you may not use the ! portable commands SET REPORT, SHOW REPORT, and RESET REPORT for a report ! that has not been updated to provide an options definition procedure. ! Updated reports may still be invoked via the VAX/VMS REPORT command, and ! non-updated reports may be invoked (with all default options) via the ! portable REPORT command.