HELPLIB.HLB  —  SCA
very similar to what you did for the examples in the previous section. 4. FIND @3 and occurrence=primary - AND NOT EXPAND( @3 and occurrence=reference ) This finds those functions in a particular module that are not referenced anywhere. Steps 2 through 4 must be repeated for each module.

24.2  –  Basic Query Concepts

    This section covers some of the basic concepts underlying SCA
    queries.

    You may want to have a hardcopy of this section. The directions
    for producing a hardcopy are as follows:

    1. Place the contents of Basic_Query_Concepts in a printable file
       by typing the following command at the DCL command line:

         $ 
    The occurrence class is an attribute of an occurrence that
    identifies the type of occurrence. The occurrence class indicates
    if the occurrence is a declaration, a reference, or one of the
    other classes in the list that follows. If the occurrence class is
    a declaration or reference, the occurrence class indicates what
    type of declaration or reference it is.

    The format for the occurrence class attribute is as follows:

    OCCURRENCE=(keyword[,keyword...])

    The occurrence class can be one of the following keywords:

    Declarations

    o  PRIMARY - most significant declaration

    o  ASSOCIATED - associated declaration

    o  DECLARATION - primary or associated

    References

    o  READ, FETCH - fetch of a symbol value

    o  WRITE, STORE - assignment of a symbol value

    o  ADDRESS, POINTER - reference to the location of a symbol

    o  CALL - call to a routine or macro

    o  COMMAND_LINE - command line file reference

    o  INCLUDE - source file include referenece

    o  PRECOMPILED - precompiled file include referenece

    o  OTHER - any other kind of reference (such as a macro expansion
       or use of a constant)

    o  REFERENCE - any of the preceding values

    o  BASE - Any base class of a C++ class

    o  FRIEND - Any friend of a C++ class

    o  MEMBER - Any member of a C++ class

    o  SPEPARATE - Any Ada package or sub-program unit defined
       as SEPARATE

    o  WITH - Any WITH of an Ada package or sub-program unit

    Other Occurrence Classes

    o  EXPLICIT - explicitly declared

    o  IMPLICIT - implicitly declared

    o  VISIBLE - occurrence appears in the source

    o  HIDDEN - occurrence does not appear in the source

    o  COMPILATION_UNIT - the declaration that contains all
       occurrences in a particular compilation unit

    o  LIMITED - Any Ada limited private type

    o  PRIVATE - Any private C++ objects, or Ada private type

    o  PROTECTED - Any protected c++ object

    o  PUBLIC - Any public C++ object

    o  VIRTUAL - Any virtual C++ object

    The previous keywords are SCA terms. For information on
    corresponding language-specific terms, request help for the
    appropriate language table (for example, FORTRAN_ATTRIBUTES_TABLE)
    under the Getting_Started help topic.

    An example using the occurrence class attribute follows:

      FIND OCCURRENCE=PRIMARY

    This query finds all PRIMARY occurrences of declarations.

24.23  –  Reducing LOAD Time

    There are different means you can use to try to decrease LOAD
    time. Listed below are a few guidelines that may help you reduce
    LOAD time:

    o  Loading an SCA library for a software system is a time
       consuming operation and should be done in batch. Loading
       more than one module at a time is more efficient than loading
       modules separately. Using LOAD *.ANA is a common method for
       loading multiple modules. You use LOAD/DELETE to clean up .ANA
       files after they are loaded successfully and to use a little
       less disk space during the load.

    o  With large software systems, it is a good idea to use more
       than one SCA library and load them all simultaneously. This
       can lessen the elapsed LOAD time considerably. You should be
       able to load several libraries simultaneously on a single
       disk. Additionally, using more than one CPU to do your loads
       also helps, but SCA loading is mainly I/O intensive. For more
       information about how to use multiple libraries, see the help
       subtopics under Libraries.

    o  Once your SCA library starts getting above 20K blocks, you
       should consider preallocating the library when you create it.
       SCA currently extends the library file by 1000 blocks at a
       time, so for large libraries it frequently extends the library.

       You can preallocate an SCA library by specifying CREATE LIBRARY
       /SIZE=xxx, where xxx is the size of the library in disk blocks.

       Use the size of the SCA$EVENT.DAT file in your current SCA
       library directory as the value to the /SIZE qualifier.

    o  SCA uses a large number of I/Os during LOAD. Loading an SCA
       library on a heavily used or badly fragmented disk causes the
       load to be less efficient.

       You can tell how badly your SCA libraries are fragmented by
       using the following command:

         $ DUMP/HEADER/BLOCK=COUNT=0 -
         _$ DISK:[sca_library_directory]SCA$EVENT.DAT

       The interesting portion of the output is the Map area. Each
       retrieval pointer represents a contiguous section on the disk.
       Because SCA extends SCA libraries 1000 blocks at a time, having
       a lot of retrieval pointers smaller than this is a strong
       indication that some defragmentation is needed.

24.24  –  Quick Reference Card

       The following page contains a reference of the SCA query language.  It
       is intended to be printed out and used as a Quick Reference Card.

       ATTRIBUTE SELECTIONS:                  |RELATIONSHIP FUNCTIONS:
                                              |
       Name Class:                            |Short form:
       ----------                             |-----------
       <name-expression>                      |CALLED_BY(<caller>,<callee>,<depth>)
       NAME=<name-expression>                 |CALLING(<callee>,<caller>,<depth>)
       NAME=(<name-expression>,...)           |
                                              |CONTAINED_BY(<container>,<containee>,
       Symbol Class:                          |             <depth>)
       -------------                          |CONTAINING(<containee>,<container>,
       SYMBOL=<symbol-class-keyword>          |           <depth>)
       SYMBOL=(<symbol-class-keyword>,...)    |
                                              |TYPED_BY(<type>,<typee>,<depth>)
       Symbol Class keywords:                 |TYPING(<typee>,<type>,<depth>)
                                              |
       Argument, Component, Constant,         |Long form:
       Exception, File, Field, Function,      |----------
       Generic, Keyword, Label, Literal,      |<rel-func>(END=<query-expression>,
       Macro, Module, Package, Placeholder,   |           BEGIN=<query-expression>,
       Procedure, Program, Psect, Routine,    |           DEPTH={<number> | ALL },
       Subroutine, Tag ,Task, Type, Unbound,  |           RESULT=<result-keyword>,
       Variable, Other, All, None             |           TRACE=<query-expression>)
                                              |
       Occurrence Class:                      |Result keywords:
       -----------------                      |
       OCCURRENCE=<occ-class-keyword>         |Begin, End, [No]Structure, Any_path
       OCCURRENCE=(<occ-class-keyword>,...)   |
                                              |OTHER FUNCTIONS:
       Occurrence Class keywords:             |----------
                                              |
       Declaration, Primary, Associated,      |IN (END=<query-expression>,
       Reference, Address, Call,              |    BEGIN=<query-expression>)
       Command_line, Fetch, Include,          |
       Pointer, Precompiled, Read, Store,     |EXPAND (<query-expression>)
       Write, Other, All, None                |
                                              |@(<query-name>)
       Domain Class:                          |
       -------------                          |INDICATED()    (NOTE: LSE required)
       DOMAIN=<domain-class-keyword>          |
       DOMAIN=(<domain-class-keyword>,...)    |NOT(<query-expression>)
                                              |
       Domain Class keywords:                 |
                                              |
       Global, Inheritable, Module_specific,  |
       Multi_module, Predefined, All, None    |
                                              |
       File Class:                            |
       ----------                             |
       FILE=<filename-expression>             |
       FILE=(<filename-expression>,...)       |
                                              |
       OPERATORS:                             |
       ----------                             |
       AND, OR, XOR, Pathname (\ or \\)       |
                                              |
       ATTRIBUTE SELECTION EXPRESSIONS:       |
       <attri-select> [<op> <attri-select>]...|

24.25  –  SCA Tutorial

    This tutorial is for character cell LSE and SCA on
    the OpenVMS platform.  For a tutorial on the
    DECwindows interface, please see the DECset Guide to
    Source Code Analyzer.

    If you do not have DECwindows, you may want to have a hardcopy
    of this tutorial to follow it along interactively.  The directions
    for producing a hardcopy are as follows:

    1. Place the contents of SCA_Tutorial in a printable file
       by typing the following command on the DCL command line:

         $ Close
Help