% VAX-11 Librarian V04-00ZlXXY???5QR About_SCAANALYZECANCEL_LIBRARYH&Commands_for_Tailoring_the_Environment4Command_DefinitionsCREATE_LIBRARYhDELETE_ASSOCIATED_MODULEDELETE_LIBRARY 0 DELETE_MODULE DELETE_PRIMARY_MODULE  DELETE_QUERY &EXIT EXTRACT_ASSOCIATED_MODULE &EXTRACT_MODULE XEXTRACT_PRIMARY_MODULEFIND GOTO_QUERYS6HELP? Help_CommandsIMPORTINSERT_LIBRARY_AFTER Release_Notes@ SCA_Topics{INSERT_LIBRARY_BEFOREINSERT_LIBRARY_FIRST^INSERT_LIBRARY_LASTINSPECT?Library_CommandsLOADMODIFY_QUERY_NAMERt New_Features NEXT_QUERYJ"Parameter_Glossary0PREVIOUS_QUERYELProgram_Design_CommandsFQuery_CommandsF#Query_Session_Manipulation_CommandsRECOVER Release_Notes\ REORGANIZERESET_CASE_SENSITIVITYRESET_HYPHEN_SENSITIVITY  RESET_REPORT!|RESET_WILDCARDS! SAVE_QUERYTJINSERT_LIBRARY_AFTER REORGANIZE SAVE_QUERYVERIFY@ SCA_Topics"SET_CASE#SET_COMMAND_LANGUAGE$SET_DUPLICATE_INCLUSIONS% SET_HYPHEN& SET_LIBRARY' SET_REPORT)z SET_WILDCARDS,SHOW_ALL_MODULE-SHOW_COMMAND_LANGUAGE-SHOW_HIDDEN_MODULE.8 SHOW_LIBRARY/ SHOW_MODULE/ SHOW_QUERY0 SHOW_REPORT14 SHOW_SETTINGS2 SHOW_VERSION2SHOW_VISIBLE_MODULE3VERIFYREPORTRESET_CASE_SENSITIVITYRESET_HYPHEN_SENSITIVITY  RESET_REPORT!|RESET_WILDCARDS! SAVE_QUERY $x®1 Release_Notes1 Release notes for SCA are contained in the file:" SYS$HELP:SCAvvu.RELEASE_NOTESG The product name is followed by the version number (vvu). For example,@ the following is the release notes file for Version 4.6 of SCA." SYS$HELP:SCA046.RELEASE_NOTESww$x® 1 SCA_Topics1 Help is available on the following SCA topics:2 Advanced_Query_ExamplesE The examples in this section use the supplied example library. YouA are encouraged to try these queries using the example library./ 1. FIND CALLED_BY( END=translit, DEPTH=ALL)4 This query gives the full call tree for TRANSLIT.G 2. FIND CALLED_BY( END=translit, BEGIN=signal_duplicate, DEPTH=ALL)E This query returns all the call paths emanating from translit that# end up calling SIGNAL_DUPLICATE.> 3. FIND CALLED_BY( translit, DEPTH=ALL, TRACE=(NOT OPEN*))A This query gives the full call tree for TRANSLIT, but does notD sho w any calls from items named OPEN*. Calls to items named OPEN*D appear in the call tree; however, items which are called by OPEN*@ do not appear. Try the query without the trace expression and/ compare the results when the TRACE is given.$ 4. FIND CALLED_BY( END=translit,C BEGIN=(NOT DOMAIN=PREDEFINED and NOT lib$*)," DEPTH=ALL )? This example leaves predefined functions and functions namedA LIB$* out of the call graph. Functions such as CHR and WRITELN@ in Pascal, MAX in FORTRAN, a builtin like _ADAWI in C, and soE forth are predefined. These functions are defined by the language, not the programmer.4 5. FIND IN( build_table and occ=comp, max_code )? This example finds all occurrences of MAX_CODE in the module? BUILD_TABLE. In this case, module has the same meaning as itC does in SHOW MODULE. This is the fastest way to limit a query toD occurrences in a particular module. The first paramet er to the INC function tells SCA in what container to look. The "and occ=comp"A part of the query ensures that the BUILD_TABLE you are lookingA in is one of the modules displayed by SHOW MODULE, rather than something else.A The second parameter to the IN function tells SCA what to look5 for. This is faster than specifying the following:9 FIND IN( build_table and occ=comp ) and max_code8 Both queries in this example produce the same result.3 Routines Us !ed in a Module But Declared Elsewhere? In this example, you find functions that are used in a givenB module but have their primary declaration in some other module.A This example is a multistep process that makes use of previousB queries. Each query in this section is numbered so that you canA refer to a specific query. If you refer to a query, adjust theC query name (for example, where @1 is used) to refer to the query name you have created.; 1. FIND IN( translit " and occurrence=compilation_unit, -= symbol=function and domain=(global,inheritable) )E This query finds all occurrences of functions, either declarations) or references, in the module TRANSLIT.@ You use "domain=(global,inheritable)" to limit the query only= to occurrence in which you are interested. Only global and> inheritable symbols can be imported because module-specific@ symbols are from the same module, and predefined symbols comeA from the language. Ne #xt, you have to remove any functions that0 have their primary declaration in the module.: 2. FIND @1 AND NOT EXPAND( @1 and occurrence=primary )C This query removes any functions that have a primary declaration; in the module TRANSLIT. What remains are those global orB inheritable functions that do not have a primary declaration in TRANSLIT.A The EXPAND function in this query can be evaluated efficientlyB by SCA. The parameter to EXPAND, @1 and occurrence=primary, $ canD be evaluated by looking at the result of query 1, so SCA does notE have to use the SCA library. Because the overall query does @1 ANDE ..., everything in the result is present in the result of query 1.B All we are doing is removing occurrences. In this case, SCA canB evaluate the whole query expression by looking at the result of4 query 1 and does not have to use the SCA library.A Items Declared In a Module But Not Used Anywhere In the ModuleB In this example, %you find occurrences of functions or variablesE that are declared in a module but are not used in the module. ThisE example is a multistep process that makes use of previous queries.B The numbers by each query are used to refer to it later. If youD refer to a query, adjust the query name (for example, where @1 is6 used) to refer to the query names you have created.; 1. FIND IN( translit and occurrence=compilation_unit, -- symbol=(function, variable) )E Thi &s query finds all occurrences of functions or variables, either6 declarations or references, in the module TRANSLIT.< 2. FIND @1 AND NOT EXPAND( @1 and occurrence=reference )E This query removes from our first query any functions or variablesA that have a reference in the module TRANSLIT. What remains areA those functions or variables that are not used anywhere in the module.A The EXPAND function in this query can be evaluated efficiently@ by SCA. The parameter t 'o EXPAND, @1 and occ=reference, can beB evaluated just by looking at the result of query 1, so SCA doesB not have to use the SCA library. Because the overall query doesC @1 AND ..., everything in the result is present in the result ofE query 1. All we are doing is removing items. In this case, SCA canB evaluate the whole query expression by looking at the result of5 query 1, and does not have to use the SCA library. Finding Unused FunctionsC This example finds func (tions or subroutines that are never used.E It provides several ways of solving the problem. Some of these areD easy to understand, but can be very slow on larger SCA libraries.? The more complex ones are intended to improve performance onA larger SCA libraries. They do not have a significant impact on smaller libraries.C The first example finds unused functions only. Note that insteadE of saying "occurrence=call" to find functions that are called, youD specify "occurr )ence=reference" to find functions that are used at all. The query is as follows:2 FIND symbol=function AND occurrence=primary -C AND NOT EXPAND( symbol=function and occurrence=reference )> On the example library, this query works well because it is? a small library. On a larger library, it may be too slow. To@ evaluate this query, SCA must first evaluate "symbol=functionB and occurrence=primary." It must then evaluate "symbol=functionD and occurrence=reference" b *efore doing any additional processing.A In this case, SCA has to do twice what is essentially the sameD work. Also, SCA does not discard information about functions that< are referenced until the end, so it uses a lot of memory.? Using Previous Query Results to Find Unused Functions FasterA The next example also finds unused functions. However, it usesB previous query results, so the work is done only once. For this? reason, it is faster than the previous example. It also+ usesE somewhat less memory, but still not enough to make a difference on a large library.< FIND symbol=function and occurrence=(primary,reference)E In the previous query, we find all the occurrences that we want toC use. We ignore the associated declarations at this point because' they are not essential to the query.C Next, we must select those functions that are not used as in the following query:% FIND @1 AND occurrence=primary -7 AND NOT ,EXPAND( @1 AND occurrence=reference )B This query removes from the list of functions in our system anyD that are referenced, leaving only unreferenced functions. BecauseA you are using a previous query with all the information in it,B SCA does not have to access the SCA library, and performance is generally faster.B However, on a large library, this may still be slow. The reasonB for this is that it ends up keeping a list of all the functions& and all their references in- memory.2 Basic_Query_Concepts@ This section covers some of the basic concepts underlying SCA queries. What Queries AreB An SCA library is a collection of information about your sourceC code. This includes information, such as the names and locations? of all variables in your code, all the places where routines@ are called and what their arguments are, and many other kinds of information.; Issuing a query is the process of selecting some of thisB i.nformation from the library. By giving a query expression withE the FIND command, you specify exactly what information you want to retrieve from the library. OccurrencesA An occurrence is any instance of an entity in your program. An> entity can be any language construct, such as a variable, a@ routine, or a constant. To further clarify this, consider theB following code fragment (not written in a particular language): 1 MODULE myprog; 2 3 VAR/ i,j; 4 5 ROUTINE foo() 6 BEGIN 7 i = 5; 8 j = i; 9 END; 10 END;D The code contains four entities (myprog, foo, i, j). There is oneA occurrence each of the module myprog, and the routine foo. TheE variable i, however, has three occurrences, and the variable j has two. Attribute Selection@ Attribute selection is a query that selects occurrences basedB on certain attributes. For example, you can have SC0A return all@ occurrences in which the name attribute is XYZ. The following3 sections list the attributes used for selection. NAME Attribute< Generally, you think of entities in you program as havingA only a name. In fact, the name of an entity is only one of itsD attributes. What you are doing when you give the basic query FINDE X, is asking for all occurrences in the library that have the nameA attribute X. (The query FIND X is equivalent to the query FINDA N1AME=X. NAME= is the default attribute, so it may be omitted.) SYMBOL_CLASS Attribute> The symbol class attribute describes an occurrence in terms? of language constructs. In the previous example, myprog is aA MODULE, foo is a ROUTINE, and i and j are variables. Thus, youC could ask SCA to find things based on the symbol class only. ForB example, you can find all the routines in the library by giving1 the following query: FIND SYMBOL_CLASS=ROUTINE? Note that MOD 2ULE, ROUTINE, and VARIABLE are SCA keywords for< symbol classes. Because different languages use differentC terminology, there is a need to understand how the SCA language-C independent terms relate to the language-specific terms. We haveB provided tables to help you match the SCA terms to the specificB language constructs for all the languages that support SCA. See= the Getting_Started help subtopics for specific languages. OCCURRENCE AttributeB The occurrence cl 3ass attribute allows you to select occurrencesB based on attributes specific to the occurrence. In the previous= example, on line 3 the occurrence of the variable i has an= occurrence class of PRIMARY. On line 7, the occurrence has? an occurrence class of WRITE, and on the following line, itsC occurrence class is READ. To find all entities that are declared/ in your system, specify the following query: FIND OCCURRENCE=PRIMARYB Note that as with symbol classes, there i4s a need to understandA the relationship between the SCA occurrence class keywords andD the equivalent language terminology. See the Getting_Started help$ subtopics for specific languages. FILE_SPEC AttributeB Another attribute of all occurrences is the name of the file inB which they occur. If the previous example program was in a fileC called MYPROG.BAR, then the following query would return all theB occurrences found in the file; in this case, all occurrences of5 myprog, foo, i, and j: FIND FILE_SPEC="MYPROG.BAR" SYMBOL DOMAIN AttributeC The domain of an entity defines the scope within the source overA which the entity is known. Variables or routines, for example,E may be local to a particular module, or they might be known to allD modules in a system. To find all occurrences of entities that are; known throught your system, specify the following query: FIND DOMAIN=GLOBALA See the Getting_Started help subtop6ics for specific languages. Basic QueriesB You have already seen examples of the most basic type of query,@ that is a query based on the selection of just one attribute. These examples are: FIND X FIND SYMBOL=ROUTINE FIND OCCURRENCE=PRIMARY FIND DOMAIN=GLOBAL FIND FILE_SPEC="MYPROG.BAR"@ Each of these queries results in a set of occurrences. Often,@ the result of such a query contains more information than youB really want. You can explicitly i 7ndicate the result you want byA specifying multiple attributes and combining them by using set? operations. For example, if you only want the ROUTINES namedA X (rather than all items named X or all routines), specify the following query expression: FIND X AND SYMBOL=ROUTINEE In the previous example, the set operator AND was used to take theB intersection of the two sets. The other set operators availableB are OR, XOR, and NOT. In this manner, you can combine attribute8C selection expressions using multiple set operators. For example:8 FIND (X OR Y ) AND SYMBOL=ROUTINE AND OCCURRENCE=CALLA This query finds all call references to routines named X or Y. Relationship Queries> You have already learned how to select occurrences based onB their attributes. The following section describes how to selectB occurrences based on their relationship with other occurrences. Calls RelationshipD The most common of these relationsh9ips is the calls relationship.@ SCA provides two functions: CALLING and CALLED_BY. With these= functions, you can display the call tree structure of your? program. The most basic format of the query expression is as follows: FIND CALLED_BY FOOD In this example, the result shows a structured display of all theB routines that FOO directly calls. You can also display routines that call FOO as follows: FIND CALLING FOOC The previous two queries answer the que :stions, "Who is called by1 FOO?" and, "Who is calling FOO?" respectively.@ The full syntax of the relationship functions is complex, andD each relationship function is described in more detail under SCA_@ Topics. Without explaining why the parentheses are necessary,A and emphasizing that the order of parameters is important, theC following examples shows one more useful feature of relationshipE functions. It is possible to get a call tree of arbitrary depth by giving th;e following query:# FIND CALLED_BY (FOO, DEPTH=ALL )> This returns a display showing not only the routines calledA directly by FOO, but also the routines that they in turn call,D for all levels. You can replace the keyword ALL with any positive/ integer to limit the depth of the call tree. Contains Relationship= Another relationship available through SCA is the contains= relationship, which is obtained through the CONTAINING andB CONTAINED_BY functions. The<se functions have the same syntax as the calls functions.E The CONTAINED_BY function returns all entities logically containedD within the given parameter. For example, the query FIND CONTAINEDC FOO returns two occurrences of i and one occurrence of j, in the code fragment that follows: 1 MODULE myprog; 2 3 VAR i,j; 4 5 ROUTINE foo() 6 BEGIN 7 i = 5; 8 j = i; 9 END; 10 END;? Similarly, =the following query returns the occurrence of the module MYPROG: FIND CONTAINING FOO Types Relationship> The types relationship consists of the two functions TYPINGA and TYPED_BY. These functions also have the same syntax as theE previous functions. The TYPED_BY function returns type trees. ThisA is useful if there are many user-defined types in your system,A particularly if they are complex record structures. The TYPING- function returns the type of its ar >gument.E For more information about all the relationship functions, see the$ help topic for each relationship.2 Building_An_SCA_LibraryB To create your own SCA library, you must first create a libraryD directory for it. Once you have a directory in which to create aE library, create a library from inside SCA using the CREATE LIBRARY command.@ You now have an empty SCA library. To add a module to the SCAC library, you must first compile your source code and genera?te anG analysis_data (.ana) file. To load the analysis data file into yourH SCA library and show the new module, type the following SCA commands: SCA> LOAD myfile.ANA SCA> SHOW MODULEE You will see that the new module has been loaded into the library,2 and you will now be able to query that library.> For more information, see the help topics for Libraries and Reducing_LOAD_Time. 2 CALLED_BY> The CALLED_BY function is a relationship function. It finds? @ occurrences that have a CALLED_BY relationship between them.C For example, if routine B is called by routine A, then these twoB occurrences are in a CALLED_BY relationship. In its most common+ form, the function format is as follows:: CALLED_BY( , , DEPTH={ | ALL} )? In this format, and can be any legal query@ expression, and is a positive integer. A typical useE of the function is to find those routines which are calleAd by some" specified routine. For example:( FIND CALLED_BY( xyz, *, DEPTH=ALL )C This query finds the full call tree below XYZ, where XYZ is someD routine in the SCA database. In other words, this query finds allB routines which are either directly or indirectly called by XYZ.E The CALLED_BY function provides the power to return the exact call0 tree you want. The full format is as follows: CALLED_BY( [ END= ],! [ BEGIN= ],) B [ DEPTH={ | ALL} ],( [ RESULT=RESULT_KEYWORD ],* [ TRACE=query_expression ] )D In the previous format, and are any legal queryA expression, is a positive integer, RESULT_KEYWORD canA be STRUCTURE, NOSTRUCTURE, ANY_PATH, BEGIN, or END, and QUERY_, EXPRESSION is any legal query expression.@ For a full description of the CALLED_BY relationship, see the LSE/SCA User Manual. 2 CALLING< The CALLING functio Cn is a relationship function. It finds> occurrences with the CALLING relationship between them. For= example, if routine A is calling routine B, then these two@ occurrences are in a CALLING relationship. In its most common+ form, the function format is as follows:8 CALLING( , , DEPTH={ | ALL} )? In this format, and can be any legal queryB expression and is a positive integer. A typical use of@ the function is to find thoDse routines which are calling some' specified routine call. For example,& FIND CALLING( abc, *, DEPTH=ALL )C This query finds the full call tree above ABC, where ABC is someE routine in the SCA database. In other words, find all the routines/ that are directly or indirectly calling ABC.C The CALLING function provides the power to return the exact call( tree of interest. The full format is: CALLING ( [ END= ], [ BEGIN= ],( E [ DEPTH={ | ALL} ],' [ RESULT=RESULT_KEYWORD ],) [ TRACE=query_expression ] )D In the previous format, and are any legal queryD expression, is a positive integer, RESULT_KEYWORD can beB STRUCTURE, ANY_PATH, BEGIN, or END, and QUERY_EXPRESSION is any legal query expression.> For a full description of the CALLING relationship, see the LSE/SCA User Manual.2 CONTAINED_BYA The CONTAINED_BY function is a relaFtionship function. It findsE occurrences that have a CONTAINED_BY relationship between them. In; its most common form, the function format is as follows:C CONTAINED_BY( , , DEPTH={ | ALL} )E In this format, and can be any legal query2 expression, and is a positive integer.D Some examples will help you understand this function. The diagram* that follows applies to these examples. A (module G)( +-------------------------+( | |( | B (routine) |( | +-------------------+ |( | | | |( | | C (routine) | |( | | +-------------+ | |( | | | | | |( | | | D (variable)| | |( | | | | | |( | | | | | |( | | +-------------+ | |H( | | | |( | +-------------------+ |( | |( | E (variable) |( | |( +-------------------------+" Consider the following queries:* 1. FIND CONTAINED_BY( A, *, DEPTH=1 )* 2. FIND CONTAINED_BY( C, *, DEPTH=1 )* 3. FIND CONTAINED_BY( A, *, DEPTH=2 )B The first query returns A (the container), B (a containee), and@ E (a co Intainee). Similarly, the second query returns C and D.C The third query returns A, B, and C and E. The D variable is NOT: included because it is not reachable at a depth of two.* Now consider the following two queries:, 4. FIND CONTAINED_BY( A, D, DEPTH=ALL )* 5. FIND CONTAINED_BY( A, D, DEPTH=2 )E Query four returns A (the container), B (because it is on the pathE to D), C (becasue it is on the path) and D (which is the containee@ being searched for). The fifth qu Jery does not return anything> because the D variable cannot be reached at a depth of two.B Where a container begins and ends is determined by the languageC syntax. These boundaries are reported to SCA by the compiler and: used by the CONTAINED_BY function to determine nesting.C The CONTAINED_BY function provides the power to return the exact= nesting structure you want. The full format is as follows:% CONTAINED_BY( [ END= ],' [ BEGIN= ],, [ DEPTH={ | ALL} ],+ [ RESULT=RESULT_KEYWORD ],- [ TRACE=query_expression ] )C In the previous format, and is any legalC query expression, is a positive integer, RESULT_KEYWORDE can be STRUCTURE, NOSTRUCTURE, ANY_PATH, BEGIN, or END, and QUERY_, EXPRESSION is any legal query expression.C For a full description of the CONTAINED_BY relationship, see theD LSE/SCA User Manual. Se Le also the help topic for the IN function,5 which is similar to the CONTAINED_BY relationship. 2 CONTAINING? The CONTAINING function is a relationship function. It finds@ occurrences that have a CONTAINING relationship between them.> In its most common form, the function format is as follows:A CONTAINING( , , DEPTH={ | ALL} )E In this format, and can be any legal query2 expression, and is a positive integeMr.B Some examples will help you understand the CONTAINING function.6 The diagram that follows applies to these examples. A (module)( +-------------------------+( | |( | B (routine) |( | +-------------------+ |( | | | |( | | C (routine) | |( | | +-------------+ | |( | | | | | |( N | | | D (variable)| | |( | | | | | |( | | | | | |( | | +-------------+ | |( | | | |( | +-------------------+ |( | |( | E (variable) |( | |( +-------------------------+" Consider the following queries:( 1. FIND CONTAINING( D, *, DEPTH=1 )( 2. FINDO CONTAINING( C, *, DEPTH=1 )( 3. FIND CONTAINING( D, *, DEPTH=2 )D The first query returns D (the containee), and C (the container).? Similarly, the second query returns C and B. The third query returns D, C and B.( Now consider the following 2 queries:* 4. FIND CONTAINING( D, A, DEPTH=ALL )( 5. FIND CONTAINING( D, A, DEPTH=2 )@ Query four returns D (the containee), C (because it is on the@ path to A), B (because it is on the path) and A (which is the? con Ptainer being looked for). The fifth query does not return: anything because A cannot be reached at a depth of two.B Where a container begins and ends is determined by the languageC syntax. These boundaries are reported to SCA by the compiler and8 used by the CONTAINING function to determine nesting.A The CONTAINING function provides the power to return the exact= nesting structure you want. The full format is as follows:# CONTAINING( [ END= ],% Q [ BEGIN= ],* [ DEPTH={ | ALL} ],) [ RESULT=RESULT_KEYWORD ],+ [ TRACE=query_expression ] )C In the previous format, and is any legalC query expression, is a positive integer, RESULT_KEYWORDE can be STRUCTURE, NOSTRUCTURE, ANY_PATH, BEGIN, or END, and QUERY_, EXPRESSION is any legal query expression.A For a full description of the CONTAINING relationship, see the LSE/SCA User RManual. 2 DOMAIND DOMAIN is an attribute of an occurrence that determines the scopeC of the symbol defined. It is the range of source code in which a* symbol has the potential of being used.A For example, A BLISS OWN declaration creates a symbol that hasB a module-specific symbol domain; it cannot be used outside thatB module. On the other hand, a BLISS GLOBAL declaration creates aD symbol that has a multimodule symbol domain; it has the potential) of being used in moSre than one module.' The format for DOMAIN is as follows: DOMAIN=(keyword[,keyword...])+ The keyword can be one of the following:@ o INHERITABLE - able to be inherited into other modules (for@ example, through BLISS library, PASCAL environment, or Ada$ compilation system mechanisms)A o GLOBAL - known to multiple modules via linker global symbol definitions? o PREDEFINED - defined by the language (examples: BLISS ap," FORTRAN sin, PASCAL Twriteln)E o MULTI_MODULE - domain spans more than one module (domain=multi_D module is equivalent to domain=(inheritable,global,predefined)7 o MODULE_SPECIFIC - domain is limited to one module: The previous keywords are SCA terms. For information on> corresponding language-specific terms, request help for theE appropriate language table (for example, FORTRAN_ATTRIBUTES_TABLE)( under the Getting_Started help topic.1 An example using the DOMAIN attribute follows:U+ FIND DOMAIN=GLOBAL AND SYMBOL=VARIABLE) This query finds all global variables. 2 EXPANDC The EXPAND function determines the symbol to which an occurrenceB belongs and returns the full set of occurrences for the symbol.A For example, the following code fragments, written in a pseudo; language, declare and use the variable i in three files.+ file 1 file 2 file 3+ ------ ------ ------3 GLOBAL i (d) LOCAL i (Vd) EXTERNAL i (d)7 i := 0 (wr) i := 5 (wr) IF i EQUALS 0 (rr) (d) - declaration (wr) - write reference (rr) - read referenceB The pseudo language defines variables, such that the variable iD in "file 1" and the variable i in "file 3" are the same variable.D The variable i in "file 2", however, is a different variable. SCAD treats these variables in the same manner by saying there are two5 unique symbols which happen to have the same name.W? The important point in the previous example is that what theE programmer considers unique items SCA also considers unique items.) In SCA terms, these items are symbols.C Given the previous code fragments, consider the follwoing query:3 FIND SYMBOL_CLASS=VARIABLE AND OCCURRENCE=READD This query returns one occurrence, which is the read reference in) "file 3." Now consider the next query:= FIND EXPAND( symbol_class=variable and occurrence=read )D This qu Xery returns two occurrences of "i" in "file 1" and the twoD occurrences of "i" in "file 3." The EXPAND function uses the readC reference to determine the corresponding symbol and then returnsC all the occurrences for that symbol. In this case the symbol was the global variable "i".E Note that the two occurrences in "file 2" are not returned becauseB they belong to a different symbol. The programmer does not viewE the i in "file 2" to be the same as the i in "file 1" and "fi Yle 3" and SCA reflects that view.D When given more than one occurrence, the EXPAND function performsC this operation iteratively and removes any duplicate occurrences from the result.D In the following example, you use the EXPAND function to find theD declarations of routines defined in the system, but which are not1 used. To do this, specify the following query:9 FIND (SYMBOL=ROUTINE AND OCCURRENCE=PRIMARY) AND NOT4 EXPAND(SYMBOL=ROUTINE AND OCCURRENCE=REFEZRENCE) 2 FILE_SPECE FILE_SPEC is an attribute selection that specifies the name of theE file. You identify a source file by its file name. If it containsE a period (.), the file name should be enclosed in quotation marks.8 The format for the FILE_SPEC attribute is as follows:! FILE_SPEC="filename.extension"4 An example using the FILE_SPEC attribute follows: FIND FILE_SPEC="MYPROG.FOR"; This query finds all occurrences in the file MYPROG.FOR.2 Getting [_StartedC SCA works with many languages. See the subtopics in this sectionB for information about getting started with a specific language. 3 Using_AdaC This section contains some basic examples that show what SCA canC do to help you with your programs. The examples have very littleA explanation. For a more detailed explanation of the underlyingC concepts, see the Basic_Query_Concepts help topic. The remainder? of this section is written in terms that are specific to Ada\ programs.E If you want to follow along and try the examples, you will need toC have an SCA library available. The examples use generic variableG names (such as 'i'). You will have to substitute variable names that/ exist in your code when trying the examples.C The first example is the easiest query: It lets you find all theD items in your SCA library named 'i', and shows you all the places/ where they appear (all occurrences of 'i'). FIND i> You can sea ]rch for any name in this manner, including using. wildcard characters (for example, FIND i*).? Suppose you are looking for an occurrence, and you know that@ it occurs in a particular file. The following query finds allC occurrences of items that are named 'i' but will then limit them= to those which happen to occur in the file named PROG.ADA." FIND i AND FILE_SPEC="PROG.ADA"B Another typical question one might ask is, "Find all the placesB where this item is assigned t ^o (or read from, called, declared,B and so forth)." The next example finds all occurrences of itemsE that are named 'i', but then limits them to only those occurrences! where 'i' is assigned a value: FIND i AND OCCURRENCE=WRITEE (SCA understands many occurrence classes other then WRITE. See theE help subtopics under Getting_Started for tables containing all the; SCA attributes and their corresponding meanings in Ada.)A Often, you only want to know where (in what fil _e or package) a@ particular function is, so that you can go to it and edit it.A You can use the first query (where 'i' will be the name of the> function) and then look through the output. The output willA include all occurrences of the function, one of which would beE its declaration, which you can then select. Or, you can ask SCA to: limit the search for you by typing the following query: FIND i AND OCCURRENCE=PRIMARY> In SCA terms, a primary declaration is the most s `ignificantC declaration of an item. For an Ada function, this means the bodyD of the function, or package, or generic, and so forth. This is inC contrast to the specification, which is considered an associated declaration.B Another problem you might have is that there are many differentC items in your system having a given name. Some may be variables;C others may be functions, constants, tasks, and so forth. Suppose@ you want to find only the functions named i. Again, t ahe queryE FIND i will give you what you want, but it will also give you much7 more. It is preferable to issue the following query:# FIND i AND SYMBOL_CLASS=FUNCTIOND The previous four examples have selected information based on twoD attributes. The last example selected information based on a nameD attribute (in this case, i) and a symbol class attribute (in thisB case, FUNCTION). Note how the attributes are combined using theE boolean operator AND. In general, you can s belect items out of yourD library based on any combination of attributes, using AND as well3 as the other logical operators OR, XOR, and NOT.> The next example shows another primary feature of SCA - theE ability to display relationships between items. This example showsB the most common use of this feature. It finds the complete callB tree (that is, all functions called directly and indirectly) of the function named i. FIND CALLED_BY (i, DEPTH=ALL)? If you want to climit the depth of the call tree, replace the' keyword ALL by any positive integer.E To obtain help on the following topics, request help as indicated.C o For help on query language, see the Basic_Query_Concepts help topic.A o For help on libraries, see the Building_An_SCA_Library help topic.3 Ada_Attributes_Table= The following table lists the SCA symbol classes and their! corresponding meanings in Ada.= SCA Symbol Classes and Equivalent Ada Ldanguage Terminology, SCA Term Ada Term Explanation> Argument Formal A subprogram formal parameter parameterD Component, Component Record components and discriminants Field Constant, Constant Literal Exception Exception? File File A file used during compilation Function, All Procedure, subprograms, Program, entries, Routine, and ACCEPTe Subroutine statements? Generic Generic Generic subprograms or generic) packages0 Keyword Keyword PDF keyword tag Label Labels and loop identifiers Macro N/A Module, Packages Package0 Placeholder Placeholder LSE placeholder Psect N/A( Tag Tag PDF tag- Task Task f Task objects Type Type7 Unbound Unbound Pragmas and attributes Variable ObjectA The following table lists the SCA occurrence classes and their! corresponding meanings in Ada.A SCA Occurrence Classes and Equivalent Ada Language Terminology, SCA Term Ada Term Explanation: Primary Body For example, package bodyC Associated Specification For example, package specificationC Declaragtion Declaration Any declaration, either primary or+ associated3 Reference Reference Any nondeclaration Read, Fetch Read Write, Store Write Address, N/A Pointer Call CallB Command_line Command line A file referred to on the command? line; for example, ADA foo.ada Include N/A Precompiled N/AD Separate Separate Any h Ada package or sub-program unit4 defined as SEPARATEJ With With Any WITH of an Ada package or sub-program% unit= Explicit Explicit An entity that is explicitly7 declared. For example,D declarations resulting from generic0 instantiations.E Implicit Implicit Any symbol declared b iy the compiler,8 for example a loop nameB Visible Visible A symbol whose name is visible in+ the sourceC Hidden Hidden A symbol whose name is not visible< in the source; for example,0 anonymous types@ Compilation_ Compilation Subprogram declaration or body,D unit unit package declaration or body, jand so& forth= Limited Limited Any Ada limited private type5 Private Private Any Ada private type= The following table lists the SCA domain classes and their! corresponding meanings in ADA.= SCA Domain Classes and Equivalent Ada Language Terminology, SCA Term Ada Term Explanation> Inheritable Objects declared in a package. specification k Global N/A Predefined N/AC Multi_module Inheritable, Global and PredefinedA Module_ Module Objects known to only one module specific specific3 Using_BLISSC This section contains some basic examples that show what SCA canC do to help you with your programs. The examples have very littleA explanation. For a more detailed explanation of the underlyingC concepts, see the Basic_Query_Concepts help topic. The rema linderA of this section is written in terms that are specific to BLISS programs.E If you want to follow along and try the examples, you will need toC have an SCA library available. The examples use generic variableG names (such as 'i'). You will have to substitute variable names that/ exist in your code when trying the examples.C The first example is the easiest query. It lets you find all theB items in your SCA library named i, and shows you all the places, wherem they appear (all occurrences of i): FIND i> You can search for any name in this manner, including using. wildcard characters (for example, FIND i*).C Now suppose you are looking for an occurrence, and you know that@ it occurs in a particular file. The following query finds allE occurrences of items that are named i, but will then limit them to9 those that happen to occur in the file named PROG.B32." FIND i AND FILE_SPEC="PROG.B32"B Another typical question yo nu might ask is, "Find all the placesE where this item is assigned to (or read from, called, declared andC so forth)." The next example finds all occurrences of items thatD are named i, but then limits them to only those occurrences where i is assigned a value: FIND i AND OCCURRENCE=WRITEE (SCA understands many occurrence classes other then WRITE. See theE help subtopics under Getting_Started for tables containing all the= SCA attributes and their corresponding meanin ogs in BLISS.)@ Often, you only want to know where (in what file or module) aC particular routine is, so that you can go to it and edit it. YouD can use the first query (where i will be the name of the routine)@ and then look through the output. The output will include allD occurrences of the routine, one of which will be its declaration,E which you can then select. Or, you can ask SCA to limit the search) for you by typing the following query: FIND i AND OCCURRENCE=PRI pMARY> In SCA terms, a primary declaration is the most significant> declaration of an item. For a BLISS routine, this means the> place where the routine is actually implemented. This is inE contrast to FORWARD or EXTERNAL declarations, which are associated declarations.B Another problem you might have is that there are many differentC items in your system having a given name. Some may be variables;B others may be routines, literals, macros, and so forth. Suppose? you w qant to find only the routines named i. Again, the queryB FIND i will give you what you wanted, but it will also give you< much more. It is preferable to issue the following query:" FIND i AND SYMBOL_CLASS=ROUTINED The last four examples have all selected information based on twoD attributes. The last example selected information based on a nameD attribute (in this case, i) and a symbol_class attribute (in thisA case, ROUTINE). Note how the attributes are combined using theE r boolean operator AND. In general, you can select items out of yourD library based on any combination of attributes, using AND as well3 as the other logical operators OR, XOR, and NOT.> The next example shows another primary feature of SCA - theE ability to display relationships between items. This example showsB the most common use of this feature. It finds the complete callE tree (that is, all routines called directly and indirectly) of the routine named i. FIND sCALLED_BY (i, DEPTH=ALL)? If you want to limit the depth of the call tree, replace the' keyword ALL by any positive integer.E To obtain help on the following topics, request help as indicated.C o For help on query language, see the Basic_Query_Concepts help topic.A o For help on libraries, see the Building_An_SCA_Library help topic.3 BLISS_Attributes_Table= The following table lists the SCA symbol classes and their# corresponding meanings in BLItSS.? SCA Symbol Classes and Equivalent BLISS Language Terminology, SCA Term BLISS Term Explanation9 Argument Parameter Routine formal parameterB Component, Field Subpart of a BLOCK or BLOCKVECTOR* Field structure* Constant, Literal A literal Literal Exception N/A? File file A file used during compilation* Function, routine A routine Proucedure, Program, Routine, Subroutine Generic N/A0 Keyword Keyword PDF keyword tag3 Label Label A label identifier( Macro Macro A macro3 Module, Module A compilation unit Package3 Placeholder Placeholder An LSE placeholder( Psect Psect A psect* Tag Tag A PDF tag Task N/A6 Type Type v For example, fieldsetB Unbound Unbound A name the compiler does not knowD the purpose of. This is common when1 macros are used.3 Variable Variable A program variableA The following table lists the SCA occurrence classes and their# corresponding meanings in BLISS.C SCA Occurrence Classes and Equivalent BLISS Language Terminology, SCA Term BLISS Term Explanationw? Primary Declaration The declaration containing the6 actual implementationB Associated Declaration A FORWARD or EXTERNAL declaration? Declaration Declaration Either a PRIMARY or ASSOCIATED, declaration Read, Fetch Fetch Write, Store Store Address, Address Pointer Call call@ Command_line Input file A file specified on the commandA x specification line; for example, BLISS foo.b32A Include Require A file specified in a REQUIRE or3 %REQUIRE statement> Precompiled Library A file specified in a LIBRARY* statement3 Reference Reference Any nondeclaration@ Explicit Explicit Any symbol declared by the userE Implicit Implicit Any symbol declared by the compiler;= y for example, a loop variableB Visible Visible A symbol whose name is visible in+ the sourceC Hidden Hidden A symbol whose name is not visible< in the source; for example,9 contained inside a macro) Compilation_ Module A module unit declaration= The following table lists the SCA domain classes and ztheir# corresponding meanings in BLISS.? SCA Domain Classes and Equivalent BLISS Language Terminology, SCA Term BLISS Term ExplanationE Inheritable Inheritable A symbol declared in a library file,3 and used elsewhere Global GLOBALC Predefined Defined by For example, CH$FILL, BLOCKVECTOR,- the language and so forthC Multi_module GLOBAL, Predefined, or Inhe{ritable Module_ LOCAL or OWN specific 3 Using_CA This section contains some basic examples that illustrate whatD SCA can do to help you with your programs. The examples have veryE little explanation. If you want a more detailed explanation of theD underlying concepts, see the Basic_Query_Concepts help topic. TheE remainder of this section is written in terms that are specific to C programs.E If you want to follow along and try the examples, you will ne |ed toC have an SCA library available. The examples use generic variableG names (such as 'i'). You will have to substitute variable names that/ exist in your code when trying the examples.C The first example is the easiest query: It lets you find all theB items in your SCA library named i, and shows you all the places, where they appear (all occurrences of i). FIND i> You can search for any name in this manner, including using. wildcard characters (for example, F }IND i*).@ Now let's say you are looking for an occurrence, and you knowE that it occurs in a particular file. The following query finds allD occurrences of items that are named i but will then limit them to: those which happen to occur in the file named 'PROG.C'. FIND i AND FILE_SPEC="PROG.C"A Another typical question one might ask is "Find all the placesE where this item is assigned to (or read from, called, declared,andC so forth)." The next example finds all occurr ~ences of items thatD are named i, but then limits them to only those occurrences where i is assigned a value. FIND i AND OCCURRENCE=WRITEE (SCA understands many occurrence classes other then WRITE. See theE help subtopics under Getting_Started for tables containing all the9 SCA attributes and their corresponding meanings in C.)@ Often, you only want to know where (in what file or module) a@ particular function is, so that you can go to it and edit it.B You could  use the first query (where i would be the name of the? function) and then look through the output. The output wouldA include all occurrences of the function, one of which would beE its definition, which you could then select. Or, you could ask SCA= to limit the search for you by typing the following query: FIND i AND OCCURRENCE=PRIMARY> In SCA terms, a primary declaration is the most significantD declaration of an item. For a C function, this means the function> defin ition. This is in contrast to a C function declarationA (for example, extern i()), which in SCA terms is an associated declaration.B Another problem you might have is that there are many differentC items in your system having a given name. Some may be variables;E others may be functions, #define constants, macros, and so forth.B Suppose you want to find only the functions named i. Again, theA query FIND i would give you what you wanted, but it would alsoE give you much more. It is preferable to issue the following query:# FIND i AND SYMBOL_CLASS=FUNCTIOND The last four examples have all selected information based on twoD attributes. The last example selected information based on a nameD attribute (in this case, i) and a symbol class attribute (in thisB case, FUNCTION). Note how the attributes are combined using theE boolean operator AND. In general, you can select items out of yourD library based on any combination of attributes, using A ND as well2 as the other logical operators OR, XOR and NOT.> The next example shows another primary feature of SCA - the> ability to display relationships between items. The exampleA given here shows the most common use of this feature. It findsE the complete call tree (that is, all functions called directly and( indirectly), of the function named i. FIND CALLED_BY (i, DEPTH=ALL)C If you want to limit the depth of the call tree, you can replace+ the keyword ALL by any positive integer.E To obtain help on the following topics, request help as indicated.C o For help on query language, see the Basic_Query_Concepts help topic.A o For help on libraries, see the Building_An_SCA_Library help topic.3 C_Attributes_Table= The following table lists the SCA symbol classes and their corresponding meanings in C.; SCA Symbol Classes and Equivalent C Language Terminology, SCA Term C Term ExplanationA Argument Formal The variable named in a function+ Parameter definitionA Component, Member A member of a structure or union FieldE Constant, Constant A defined value that does not change Literal Exception N/A? File File A file used during compilation@ Function, Function Any function ( such as 'main' ) Procedure, Program, Routine, Subroutine Generic N/A0 Keyword Keyword PDF keyword tag3 Label Label A label identifier; Macro Macro A Macro created by #defineA Module, Module Each .c source file represents a' Package module3 Placeholder Placeholder An LSE placeholder Psect N/A* Tag Tag A PDF tag Task N/AC Type Type int, float, struct {...}, typedef,- and so forth Unbound N/A1 Variable Variable Program variableA The following table lists the SCA occurrence classes and their corresponding meanings in C.? SCA Occurrence Classes and Equivalent C Language Terminology, SCA Term C Term ExplanationB Primary Declaration Most significant declaration; forD or definition example, a vari able declaration, or6 a function definitionA Associated Declaration Other declarations; for example,@ function declarations or EXTERN- declarationsC Declaration Definition or Any declaration, either primary or+ Declaration associated@ Read, Fetch Read The act of retrieving an RvalueC Write, Store Write Changing the contents of an Lvalue: Address, Address The use of the & operator Pointer0 Call Call A function call@ Command_line Command_line A file specified on the command< line, for example, CC foo.c? Include Include A file specified in a #include7 preprocessor directive Precompiled N/A3 Reference Reference Any nondeclaration= Explicit Explicit An entity that is explicitly) declared= Implicit Implicit An entity that is implicitly> declared by the compiler; forA example, a function with no type> is implicitly declared as INT= Visible Visible Occurrence appears in source> Hidden Hidden Occurrence does not appear in@  source; for example, it appearsA only in the expansion of a macro) Compilation_ Module A module unit= The following table lists the SCA domain classes and their corresponding meanings in C.; SCA Domain Classes and Equivalent C Language Terminology, SCA Term C Term Explanation Inheritable N/A@ Global Globally For example, extern, globaldef,7 visible  globalref, globalvalue> Predefined Defined by For example, int, float, char the language6 Multi_module Predefined and globalD Module_ Local to one For example, static, auto, register specific module 3 Using_C++A This section contains some basic examples that illustrate whatD SCA can do to help you with your programs. The examples have veryE little explanation. If you want a more detailed explanation of th eD underlying concepts, see the Basic_Query_Concepts help topic. TheE remainder of this section is written in terms that are specific to C++ programs.E If you want to follow along and try the examples, you will need toC have an SCA library available. The examples use generic variableG names (such as 'i'). You will have to substitute variable names that/ exist in your code when trying the examples.C The first example is the easiest query: It lets you find all theB items in your SCA library named i, and shows you all the places, where they appear (all occurrences of i). FIND i> You can search for any name in this manner, including using. wildcard characters (for example, FIND i*).@ Now let's say you are looking for an occurrence, and you knowE that it occurs in a particular file. The following query finds allD occurrences of items that are named i but will then limit them to< those which happen to occur in the file named 'PROG.CXX'." FIND i AND FILE_SPEC="PROG.CXX"A Another typical question one might ask is "Find all the placesE where this item is assigned to (or read from, called, declared,andC so forth)." The next example finds all occurrences of items thatD are named i, but then limits them to only those occurrences where i is assigned a value. FIND i AND OCCURRENCE=WRITEE (SCA understands many occurrence classes other then WRITE. See theE help subtopics under Getting_Started for tables containing all the; SCA attributes and their corresponding meanings in C++.)@ Often, you only want to know where (in what file or module) a@ particular function is, so that you can go to it and edit it.B You could use the first query (where i would be the name of the? function) and then look through the output. The output wouldA include all occurrences of the function, one of which would beE its definition, which you could then select. Or, you could ask SCA= to li mit the search for you by typing the following query: FIND i AND OCCURRENCE=PRIMARY> In SCA terms, a primary declaration is the most significantF declaration of an item. For a C++ function, this means the functionE definition. This is in contrast to a C++ function declaration (forI example, extern i()), which in SCA terms is an associated declaration.B Another problem you might have is that there are many differentC items in your system having a given name. Some may be v ariables;E others may be functions, #define constants, macros, and so forth.B Suppose you want to find only the functions named i. Again, theA query FIND i would give you what you wanted, but it would alsoE give you much more. It is preferable to issue the following query:# FIND i AND SYMBOL_CLASS=FUNCTIOND The last four examples have all selected information based on twoD attributes. The last example selected information based on a nameD attribute (in this case, i) a nd a symbol class attribute (in thisB case, FUNCTION). Note how the attributes are combined using theE boolean operator AND. In general, you can select items out of yourD library based on any combination of attributes, using AND as well2 as the other logical operators OR, XOR and NOT.> The next example shows another primary feature of SCA - the> ability to display relationships between items. The exampleA given here shows the most common use of this feature. It findsE the complete call tree (that is, all functions called directly and( indirectly), of the function named i. FIND CALLED_BY (i, DEPTH=ALL)C If you want to limit the depth of the call tree, you can replace+ the keyword ALL by any positive integer.E To obtain help on the following topics, request help as indicated.C o For help on query language, see the Basic_Query_Concepts help topic.A o For help on libraries, see the Building_An_SCA_Library help topic.3 C++_Attributes_Table= The following table lists the SCA symbol classes and their! corresponding meanings in C++.= SCA Symbol Classes and Equivalent C++ Language Terminology. SCA Term C++ Term ExplanationE Argument Formal Formal arguement such as a routine4 Parameter or macro argumentI Class Class Any C++ class object defined by class,5 structure or unionD Component, Class, structure A component of a class, structure+ Field or union member or union? Constant, Constant Named compile-time constants LiteralC Exception Exception A program exception specified byF the catch, throw and try statementsA File File A file used during compilationH Function, Function Callable routines defined by function- Procedure,  statements Program, Routine, SubroutineE Generic Template Generic object defined by template* objects2 Keyword Keyword PDF keyword tag7 Label Function Label User-specified label= Macro Macro A Macro created by #defineE Module, Module Any logical program unit typicallyE Package each .cxx source file represents a) module5 Placeholder Placeholder An LSE placeholder Psect N/A, Tag Tag A PDF tag Task N/AE Type Type int, float, struct {...}, typedef,/ and so forth Unbound N/A3 Variable Variable Program variableA The following table lists the SCA occurrence classes and their! corresponding meanings in C++.A SCA Occurrence Classes and Equivalent C++ Language Terminology. SCA Term C++ Term ExplanationB Primary Declaration Most significant declaration; forD or definition example, a variable declaration, or6 a function definitionA Associated Declaration Other declarations; for example,@ function declarations or EXTERN-  declarationsC Declaration Definition or Any declaration, either primary or+ Declaration associated@ Read, Fetch Read The act of retrieving an RvalueC Write, Store Write Changing the contents of an Lvalue: Address, Address The use of the & operator Pointer0 Call Call A function call@ Command_line Command_line A file specified on the command=  line, for example, Cxx foo.c? Include Include A file specified in a #include7 preprocessor directive Precompiled N/A: Base Base Any base class of a class6 Friend Friend Any friend of a class6 Member Member Any member of a class3 Reference Reference Any nondeclaration= Explicit Explicit An entity that is explicitly) declared= Implicit Implicit An entity that is implicitly> declared by the compiler; forA example, a function with no type> is implicitly declared as INT= Visible Visible Occurrence appears in source> Hidden Hidden Occurrence does not appear in@ source; for example, it appearsA  only in the expansion of a macro) Compilation_ Module A module unit3 Private Private Any private object5 Protected Protected Any protected object2 Public Public Any public object3 Virtual Virtual Any virtual object= The following table lists the SCA domain classes and their! corresponding meanings in C++.= SCA Domain Classes and Equivalent C++ Language Terminology.  SCA Term C++ Term Explanation Inheritable N/A@ Global Globally For example, extern, globaldef,7 visible globalref, globalvalue> Predefined Defined by For example, int, float, char the language6 Multi_module Predefined and globalD Module_ Local to one For example, static, auto, register specific module3 Using_FORTRANA This section contains som e basic examples that illustrate whatD SCA can do to help you with your programs. The examples have veryE little explanation. If you want a more detailed explanation of theD underlying concepts, see the Basic_Query_Concepts help topic. TheE remainder of this section is written in terms that are specific to FORTRAN programs.E If you want to follow along and try the examples, you will need toC have an SCA library available. The examples use generic variableG names (such as 'i'). You will have to substitute variable names that/ exist in your code when trying the examples.C The first example is the easiest query: It lets you find all theB items in your SCA library named i, and shows you all the places, where they appear (all occurrences of i). FIND i% characters (for example, FIND i*).@ Now let's say you are looking for an occurrence, and you knowE that it occurs in a particular file. The following query finds allD occurrences of items that are named i but will then limit them to< those which happen to occur in the file named 'PROG.FOR'." FIND i AND FILE_SPEC="PROG.FOR"A Another typical question one might ask is "Find all the placesB where this item is assigned to (or read from, called, declared,B and so forth)." The next example finds all occurrences of itemsC that are named i, but then limits them to only those occurrences where i is assigned a value. FIND i AND OCCURRENCE=WRITEE (SC A understands many occurrence classes other then WRITE. See theE help subtopics under Getting_Started for tables containing all the? SCA attributes and their corresponding meanings in FORTRAN.)@ Often, you only want to know where (in what file or module) aB particular subroutine is, so that you can go to it and edit it.B You could use the first query (where i would be the name of theA subroutine) and then look through the output. The output wouldC include all occurrences of the subroutine, one of which would beE its definition, which you could then select. Or, you could ask SCA= to limit the search for you by typing the following query: FIND i AND OCCURRENCE=PRIMARY> In SCA terms, a primary declaration is the most significantB declaration of an item. For a FORTRAN subroutine, this is where? the actual SUBROUTINE statement is. This is in contrast to aD FORTRAN EXTERNAL declaration, which in SCA terms is an associatedE declaration. The FORT RAN compiler also creates implicit associated- declarations for any undeclared functions.B Another problem you might have is that there are many differentC items in your system having a given name. Some may be variables;@ others may be subroutines, PARAMETER constants, and so forth.D Suppose you want to find only the subroutines named i. Again, theA query FIND i would give you what you wanted, but it would alsoE give you much more. It is preferable to issue the following que ry:% FIND i AND SYMBOL_CLASS=SUBROUTINED The last four examples have all selected information based on twoD attributes. The last example selected information based on a nameD attribute (in this case, i) and a symbol class attribute (in thisD case, SUBROUTINE). Note how the attributes are combined using theE boolean operator AND. In general, you can select items out of yourD library based on any combination of attributes, using AND as well2 as the other logical operators OR, XOR and NOT.> The next example shows another primary feature of SCA - the> ability to display relationships between items. The exampleA given here shows the most common use of this feature. It findsC the complete call tree (that is, all subroutines called directly. and indirectly), of the subroutine named i. FIND CALLED_BY (I, DEPTH=ALL)C If you want to limit the depth of the call tree, you can replace+ the keyword ALL by any positive integer.E To obtain help on the following topics, request help as indicated.C o For help on query language, see the Basic_Query_Concepts help topic.A o For help on libraries, see the Building_An_SCA_Library help topic.3 FORTRAN_Attributes_Table= The following table lists the SCA symbol classes and their% corresponding meanings in FORTRAN.A SCA Symbol Classes and Equivalent FORTRAN Language Terminology, SCA Term FORTRAN Term ExplanationA Argument Dummy The variable named in a function, argument declaration Component, record Field component Constant, PARAMETER Literal Exception N/A? File File A file used during compilation@ Function, SUBROUTINE or A SUBROUTINE, FUNCTION, or main( Procedure, FUNCTION program Program, Routine, Subroutine Generic N/A. Keyword Keyword A PDF keyword2 Label Label A statement label Macro N/A Module, BLOCK DATA, Package SUBROUTINE3 Placeholder Placeholder An LSE placeholder Psect COMMON block* Tag tag A PDF tag Task N/AD Type Type For example, INTEGER, REAL, COMPLEX- and so forth Unbound N/A Variable VariableA The following table lists the SCA occurrence classes and their% corresponding meanings in FORTRAN.E SCA Occurrence Classes and Equivalent FORTRAN Language Terminology, SCA Term FORTRAN Term Explanation? Primary Declaration The declaration containing the6 actual implementation8 Associated Declaration An EXTERNAL declarationC Declaration Declaration Any declaration, either primary or+  associated Read, Fetch Read Write, Store Write7 Address, Address %LOC, actual arguments Pointer> Call Call For example, a CALL statement@ Command_line Command line A file specified on the commandC line; for example, FORTRAN foo.for? Include INCLUDE A file specified in an INCLUDE* statement Precompiled N/A3 Reference Reference Any nondeclaration@ Explicit Explicit Any symbol declared by the userD Implicit Implicit Any symbol declared by the compilerA when it sees the first referenceB Visible Visible A symbol whose name is visible in+ the sourceC Hidden Hidden A symbol whose name is not visible. in the sourceA Compilation_ Program unit A SUBROUTINE, FUNCTION, PROGRAM,9 unit BLOCK DATE, and so forth= The following table lists the SCA domain classes and their% corresponding meanings in FORTRAN.A SCA Domain Classes and Equivalent FORTRAN Language Terminology, SCA Term FORTRAN Term Explanation Inheritable N/AB Global A SUBROUTINE, FUNCTION, or COMMON& blockE Predefined Defined by For example, INTEGER, REAL*4, and so& the language forth Multi_module GLOBAL, predefined, and inheritable@ Module_ Only known within a SUBROUTINE,7 specific FUNCTION, and so forth 2 Glossary3 analysis_data_file@ A file produced by a compiler which contains information that? describes the source code to SCA. It may contain one or more analysis data modules.3 analysis_data_module> A module containing all the information used by SCA for one compilation unit. 3 appearanceC One of the attributes of an occurrence. It tells you whether theD name of the occurrence is visible or hidden. You can instruct SCAE to show only occurrences with a particular appearance by using theB "occurrence=" attribute selection. For example, you can ask for8 hidden occurrences by specifying "occurrence=hidden."3 associated_declarationA Any declaration which is not a primary declaration. Typically,E associated declarations provide information needed by the compiler to refer to an object.3 attribute_selectionC A way of limiting a result of a query to those occurrences which> match certain characteristics. You can select the followingC attributes: NAME, SYMBOL_CLASS, OCCURRENCE, DOMAIN, or FILE_SPECD attributes. In the query language, you use phrases like name=foo,C symbol=ar gument, occurrence=declaration, domain=module_specific,E and file="foo.c" to specify which attributes you want. You combine0 these phrases with AND, OR and NOT operators.!3 attribute_selection_expressionC A query question which combines one or more attribute selectionsB (such as name=foo, symbol=routine) using AND, OR, NOT, and XOR. Some examples are:7 name=foo and symbol=routine and occurrence=primary4 name=foo_module and occurrence=compilation_unit 3 call_graphD Shows what procedures and functions are called from a subroutine,. and all subsequent calls in the call graph. 3 CALLED_BY+ See the SCA_Topics CALLED_BY help topic. 3 CALLING) See the SCA_Topics CALLING help topic.3 compilation_line_number@ A line number generated by the compiler which starts at 1 for@ the first file used during the compile and goes up by one forD each line read. If there is an include file, the compilation lineC number is increased by one for each line in the include file. ByA default, the line numbers in the query display produced by the9 FIND or INSPECT commands are compilation line numbers.3 compilation_unit? A compilation unit is the smallest piece of source code that? can be separately compiled. For example, in FORTRAN, this is> a subroutine or function; in C, this is a single file. Some@ languages allow you to compile more than one compilation unitA at once. Even if you compile more than one unit a t a time, SCA& considers the units to be separate.3 consistency_checksB A check that INSPECT makes in which all occurrences of a symbol@ are checked for consistency. For example, you can ensure that= all calls to a routine have the correct number and type of@ arguments. In this type of check, each occurrence is comparedB with a single occurrence selected by INSPECT to be the standardD against which all occurrences are checked. In this type of check,= each particular occurrence is either correct or incorrect.3 CONTAINED_BY. See the SCA_Topics CONTAINED_BY help topic. 3 CONTAINING, See the SCA_Topics CONTAINING help topic.3 declarationB Tells the compiler about an object before the compiler uses it.C This can make the compiler create the object, or it can tell theE compiler about an object that was created elsewhere. A declarationB has a position in the source code with both a start and an end,B and can contain other declaration s or references. A declarationD can be either a primary declaration or an associated declaration.3 declaration_class< Tells you what symbol class a declaration is (subroutine,B function, variable). For example, both procedures and functionsB (in Pascal terms) belong to the routine symbol class, but theirA declaration classes are different. The declaration class tells= the user whether a declaration is a primary declaration or? an associated declaration. SCA uses the declaration class toD decide what to display as the occurrence class in the result of aB FIND command. The user can find the declaration class using the callable interface.3 diagnostic_error_messagesB The error messages that INSPECT produces. The query result fromD an INSPECT command is like that of a FIND command, but with error( messages attached to each occurrence. 3 explicit See expression. 3 expressionC One of the attributes of an occurrence. The expression attr ibuteC tells you whether the occurrence is one that you the user placed? in the source code, or is one which the compiler created for> the user. An occurrence can be either explicit or implicit.B Explicit occurrences are those placed by the user in the sourceB code; implicit occurrences are those created by the compiler onE behalf of the user. For example, in the following FORTRAN program,C there are three references to i which are explicit. There is oneE implicit declaration of i which is created by the FORTRAN compiler) when it sees the first reference to i. program test i = 0 i = i + 1 end 3 hidden* See both appearance and hidden modules.3 hidden_modulesE A module in one of the libraries in the current library list whichE is also present in a library which is earlier in the library list.C The module in the earlier library is visible. The same module inD any later library is a hidden module, hidden by the first module. 3 implicit See expression. 3 indicatedA This term is specific to using SCA with LSE. It refers to theC symbol underneath the current cursor location within the editor, ie., the indicated symbol.3 intersection? The operation performed by the AND operator, which indicates@ that SCA will accept any occurrence that matches both X and Y as follows: FIND X AND Y 3 library8 Generic term usually referring to a physical library.3 lib rary_listE A list of one or more physical libraries which compose the virtual? library. The order of the physical libraries is important. AA module found in one physical library in the library list hidesE the same module in other physical libraries that come later in the library list.D For example, suppose you have three libraries. Library 1 contains> module A. Library 2 contains modules A, B, and C. Library 3> contains modules C and D. SCA uses module A from Library 1, ? modules B and C from library 2, and module D from library 3.3 library_numberC Refers to the position of a single physical library in a libraryC list. This can be used with any command that refers to a library< already in the library list. For example, the command SET? NOLIBRARY 1 removes the first library from the library list. 3 moduleA Represents a single compilation unit. You can list the modules? with the SHOW MODULE command. Each module shown represents aB single compilation unit - the smallest piece of source that canC be separately compiled. Even if several of these are compiled atA once (which is common in languages such as FORTRAN and BASIC),, each compilation unit appears separately.@ In the query language, SYMBOL=MODULE specifies a certain typeA of symbol. This is not the same as a compilation unit. You can@ have modules which are not compilation units, and compilationC units which are not modules. How a module is defi ned varies from language to language.3 nameA A string of characters used to identify symbols in your sourceE code. Legal characters for a name are defined by whatever language@ you use. Each name has zero or more characters. Any characterA may appear in a name. Special characters that appear in a nameF must be quoted using double quotes. Which characters are consideredC special characters is system dependent. See the system specific guide for further details.3 name_selection_expressionC Selects occurrences with a particular name. For example, you can specify the following: FIND name=xyz= You can use wildcards in the name expression. Unlike otherA atttributes, you can omit "name=" from the expression and only specify the following: FIND xyz(3 nonstructured_relationship_expressionB A relationship query (such as CONTAINED_BY, CALLED_BY, CALLING)A which requests that structure information be excluded. You ca nA specify RESULT=NOSTRUCTURE, RESULT=BEGIN, or RESULT=END as oneA of the parameters to the relationship function. If you specify? RESULT=BEGIN or RESULT=END, this is displayed like any query> which does not have a relationship function. If you specifyB RESULT=NOSTRUCTURE, this is displayed like any query which doesE not have a relationship function, but has all the occurrences that2 would be present if the structure were present.3 nonstructured_setE A query result th at contains occurrences, but does not contain anyC relationships between occurrences. These are produced by queriesA that do not involve relationship functions, or queries that doA involve relationship functions but specify RESULT=NOSTRUCTURE, RESULT=BEGIN, or RESULT=END. 3 occurrenceA An occurrence is any instance of an entity in your program. An> entity can be any language construct, such as a variable, a@ routine, or a constant. To further clarify this, consider theB following code fragment (not written in a particular language): 1 MODULE myprog; 2 3 VAR i,j; 4 5 ROUTINE foo() 6 BEGIN 7 i = 5; 8 j = i; 9 END; 10 END;C The code contains four entities: myprog, foo, i, j. There is oneA occurrence each of the module myprog, and the routine foo. TheE variable i, however, has three occurrences, and the variable j has two.3 occurrence_checksE A check that INSPECT performs on a single occurrence. For example,E INSPECT can check whether an occurrence is an implicit declarationA of a variable without having to look at any other occurrences.3 occurrence_classE One of the attributes of an occurrence that tells you what kind ofD occurrence it is. The occurrence class indicates if an occurrenceE is a declaration, a reference, or another class. It also indicatesD what kind of declaration or reference it is. You can instruct S CAB to show you only occurrences with a particular occurrence classB using the OCCURRENCE= attribute selection. For example, you can3 ask for write references using OCCURRENCE=WRITE."3 occurrence_selection_expressionE The expression containing the occurrence class for each occurrence you want to find.3 physical_library? A single directory containing an SCA database. The directory? should not contain anything else. SCA always locks an entire? physical library when it accesses it. When you are reading aC physical library (for example, with a FIND command), other usersD are not allowed to write to the physical library, but other usersA are allowed to read the physical library. When you are writingD to a physical library (for example, using LOAD), no other user is4 allowed to read or write to the physical library.3 primary_declarationC Any declaration which affects how a particular object, such as a) routine or a variable, is impleme nted.3 primary_libraryC The first library in the library list. Commands which change theA SCA library, such as LOAD and REORGANIZE, apply to the primary6 library, unless you use select a different library.3 queryE The question you ask SCA together with the information you receiveC from SCA. The question uses the SCA query language with the FINDD or INSPECT commands. The answer is called a query result. You useD the FIND or INSPECT commands to display the query resul t. You canE also use the query result as part of the question for a subsequent query.3 query_result@ A query result is the information you get when you evaluate aE query, using the FIND or INSPECT commands. It consists of a set of6 occurrences, and relationships between occurrences. 3 referenceD The use of some object in the source code. For example: X = X + 1C In this example, there are two references to the variable X. OneC (to the left of the =) is a write ref erence; the other is a readC reference. A reference has a position in the source code, but it1 is a single point and cannot contain anything.3 relationshipE An association between two different occurrences. For example, theD CALLED_BY relationship in SCA associates a primary declaration ofE a procedure with call references to other procedures and functionsD in that procedure. A relationship has both a source and a target.C A relationship also has a relationship type. Re lationships go inB both directions. For example, the CALLED_BY relationship is the' inverse of the CALLING relationship.3 relationship_typeC The kind of relationship between two occurrences. For example, aD CALLED_BY relationship between a declaration of a routine FOO andD a reference to a routine BAR shows that routine FOO calls routineE BAR. The relationship types that are valid for SCA are: CALLED_BY,; CALLING, CONTAINED_BY, CONTAINING, TYPED_BY, and TYPING.3 set / The occurrences that result from each query.3 static_analysis@ The analysis of a software system performed by looking at theA source code. This is in contrast to dynamic analysis, which is0 analysis of the software while it is running.E SCA has some commands which do static analysis. These commands areF the INSPECT command, which does consistency checking, and some uses@ of the FIND command, to generate call graphs and type graphs.%3 structured_relationship_expression@ A query that uses a relationship function (such as CONTAINED_A BY, CALLED_BY, or TYPED) which asks for structure information.D Structure information shows the relationships between occurrencesC found as well as the occurrences found. Structure information is provided by default.3 structured_set> A query result which has both occurrences and relationshipsC between occurrences. These are produced by queries which involve relationship functions. 3 symbolB Any object in a program. For example, a FUNCTION, a VARIABLE, aE CONSTANT, or any of the entities with which a programmer typically deals.< A symbol has occurrences. For example, the declaration of< a variable is an occurrence, and uses of the variable are@ occurrences. SCA determines which occurrences belong to which= symbols using the rules of the language you are using. For? example, you may have two different variables named INDEX inA separate subroutines. According to the rules of your language,? these are usually different variables, so they are different symbols for SCA.@ It does not matter whether all occurrences of a symbol are in@ a single compilation unit, or spread over several compilationB units. All the occurrences still belong to the same symbol. ForC example, you may have a subroutine SUB1 in one module, and callsC to that subroutine in several other modules. These all appear as. occurrences of the same symbol, named S UB1.A The programmer and SCA should have the same definition of whatE constitutes a unique item. SCA's term for a unique item is symbol.3 symbol_checks@ A check that INSPECT performs on all occurrences of a symbol.? For example, INSPECT can ensure that there are both read andC write references to a variable. In this type of check, no singleD occurrence is either correct or incorrect. If there are problems,/ the problems are with the symbol as a whole.3 SYMBOL_CLAS SC An attribute selection that identifies the type of symbol. Tells@ you whether the symbol is a variable, constant, or some other@ class. You can use the FIND command to find only symbols with@ a particular symbol class. For example, you can specify "FINDE symbol=argument." You can abbreviate both "symbol" and "argument".$3 symbol_class_selection_expressionA The expression containing the symbol class for each symbol you want to find. 3 type_graphB A set of occurr ences and relationships that describes a complexB data type. For example, a declaration of a record consists of aA record and some record components. Each record component has aC type, which may be another record, a pointer to the same record,D a basic data type such as integer, and so forth. In SCA, the typeC graph connects all these together, with relationships connectingB the record to its components and the components to their types. 3 TYPED_BY* See the SCA_Topics TYPED_BY help topic. 3 TYPING( See the SCA_Topics TYPING help topic.3 unionC The operation performed by the OR operator, which indicates that? SCA will accept any occurrence that matches either X or Y as follows: FIND X OR Y3 virtual_libraryC A library that allows you to split your SCA library into pieces.B Each piece is called a physical library. SCA works the same way@ whether your virtual library has only one physical library or several physical libraries.C Some of the reasons for using more than one physical library are as follows:@ o Physical libraries can be placed on more than one disk, if0 there is not enough room on a single disk.C o Analysis date files can be loaded into more than one physical8 library at the same time, to make LOAD run faster.D o A small personal physical library can be used to keep track of: your personal changes without affecting other users.< o A separate physical library can be used for each major component in your system.= A single virtual library is a list of one or more physical> libraries. The order is important. A module in one physicalB library hides the same module in physical libraries later on in@ the list. This list of physical libraries is called a library list. 3 visible+ See both appearance and visible modules.3 visible_modulesA Modules that SCA can examine when performing a FIND or INSPECT? command. Th e current library list tells you what modules are@ visible. All modules in the first library in the library listB are visible. Modules in the second library which are not in theD first library are visible. Modules in the third library which areE not in the first or second libraries are visible. Any module which is not visible is hidden. 3 wildcards? Wildcards are used to match more than one name at once. What? wildcards are available is system dependent. See the system& specific guide for further details.2 INC The IN function searches for occurrences inside a container. TheE IN function is a special case of the CONTAINED_BY function. In its7 most common form, the function format is as follows:! IN( , )E In this format, and can be any legal queryE expression. The IN function returns all occurrences that match theD expression as long as those occurrences are somewhere  inside the container.> Some examples will help you understand the IN function. The9 following picture applies to the examples that follow. A (module)( +-------------------------+( | |( | B (routine) |( | +-------------------+ |( | | | |( | | C (routine) | |( | | +-------------+ | |( | | |  | | |( | | | D (variable)| | |( | | | | | |( | | | | | |( | | +-------------+ | |( | | | |( | +-------------------+ |( | |( | E (variable) |( | |( +-------------------------+" Consider the following queries: 1. FIND IN( A, *) 2. FI ND IN( B, D)D 3. FIND IN( A, SYMBOL_CLASS=ROUTINE and OCCURRENCE=DECLARATION)A The first query returns B (a containee), C (a containee), D (aB containee) and E (a containee). A is not returned because it is the container.E The second query returns only D (the containee). C is not returnedA because it does not match the expression. B is not( returned because it is the container.E The third query returns all routine declarations inside A. In this case, B and C are returned.< The IN function is a convenient way to limit a query to a particular container.4 The full format of the In function is as follows: IN( [END=], [BEGIN=] )E In this format, and can be any legal query expression. 2 INDICATED@ The INDICATED function is available only from within LSE. TheC INDICATED function matches the occurrence on which the cursor isC positioned. The INDICATED function has no parameters. The format is as follows: INDICATED()< An example of using the INDICATED function is as follows: FIND EXPAND( INDICATED() )C This query finds all occurrences of the item on which the cursor is positioned in LSE.2 Language_Specific_Tables> For information about SCA terms and corresponding language-A specific terminology, see the tables under the Getting_Started help topic. 2 Libraries3 Project_LibrariesB There are many ways you can organize the SCA libraries for your? project. Usually, there is one library (or set of libraries)? for the whole project. Each developer has a personal libraryB containing modules that they have changed but have not yet madeA available to the entire project. However, if there is only oneA developer working on the project, it makes more sense to use a single SCA library.C There are many ways you can organize your project libraries. YouC can have one pr oject SCA library if it is a reasonable size. YouE can use several libraries, one for each subsystem. You may want toC organize your SCA libraries the way your development environment? is organized. For example, have one SCA library for each CMSA library. If your project is divided into different subsystems,3 you may want one SCA library for each subsystem.A For information on creating your own SCA library, see the help! topic Building_An_SCA_Library. Examples of Typical LibrariesD Consider a project with three developers: Paul, Mark, and Joanna.F The project consists of two different subsystems, each with its own SCA library.K Each of the developers also has a personal SCA library in their personal directories.I Paul, Mark and Joanna set up their SCA libraries using the SCA library command as follows:D SCA> SET LIBRARY personal_lib,subsystem_1_lib,subsystem_2_libI When Paul changes a module in Subsystem 1, he c ompiles it and loads itJ into his personal library. For Paul, this hides the old version of theJ module in the project library for Subsystem 1, so his SCA library is up+ to date and consistent with his changes.C Mark and Joanna do not see Paul's changes in their SCA librariesI because they the SCA library that Paul updated is not in their libraryE list. They still see the old version of the module in the project library for Subsystem 1.K Once Paul has completed his change, the nightly build updates everythingJ for Subsystem 1, replacing the module in the project library. Now Mark& and Joanna can both see the change.3 Virtual_LibrariesD SCA can use more than one SCA library at the same time when doing? queries using the FIND and INSPECT commands. The list of SCAA libraries used for this is called a virtual library. The orderA of SCA libraries in the library list is important. A module inB the first library in the library list will hide the same moduleC in other libraries, further on in the library list. For example,@ suppose PROJECT_LIB has modules A, B, C and library MYLIB has8 modules A, and D. You can set the library as follows:/ LSE Command> SET LIBRARY MYLIB,PROJECT_LIB> The modules visible in the virtual library would be A (from? MYLIB), B, and C (both from PROJECT_LIB) and D (from MYLIB).E There are many reasons for using more than one physical library as your virtual library:C o Using more than one library, you can improve LOAD performance@ by loading multiple libraries simultaneously. See the help topic Reducing_LOAD_Time.B o You can use virtual libraries to allow several developers to? maintain a consistent view of their changes to a project,@ without affecting the other developers, and without having8 to copy the entire SCA library for each developer.= o You can put your SCA libraries on different disks or on; differen t nodes (using the SCA server). This improvesA performance or takes advantage of the available disk space.J o You can easily change the order of libraries in your virtual libraryG list with the INSERT LIBRARY BEFORE, INSERT LIBRARY AFTER, INSERTK LIBRARY FIRST, and INSERT LIBRARY LAST commands, eliminating the needM to reenter a library list. Libraries may also be removed from the listI with the CANCEL LIBRARY command. You can specify libraries in yourJ library list using library numbers. For example, the command CANCELE LIBRARY 2 removes the second SCA library from the library list.2 NAMEB NAME is an attribute of an occurrence that is a string of ASCII= characters which identifies symbols in your source code. A= specific name can be associated with more than one symbol.> The language you are using defines the legal characters for? a name. Each name has zero or more characters. Any characterA may appear in a name. Special characters that appear in a nameF must be quoted using double quotes. Which characters are consideredC special characters is system dependent. See the system specific guide for further details.B You can use wildcards in the name expression. See the entry on% WILDCARDS for further information.3 The format for NAME can be one of the following: name NAME=(name[,name...]) 2 New_UsersA The Compaq Source Code Analyzer (SCA) is an interactive cross- E reference and static analysis tool that works with many languages.B It can help you understand the complexities of a large softwareE project. Because it allows you to analyze and understand an entire@ system, SCA is extremely useful during the implementation and# maintenance phases of a project.D SCA is included in the DECset Software Engineering Tools Package.> SCA is integrated with the Compaq Language-Sensitive Editor@ (LSE). When SCA is used with LSE, you can interactively edit,D compile, debug, navigate, and analyze source code during a single development session.2 For more information, see the following topics:A o Basic_Query_Concepts - Describes some of the basic concepts underlying SCA queries.A o Getting_Started - Provides subtopics with information about. getting started with specific languages.B o Building_An_SCA_Library - Describes how to quickly create an SCA library.D o Advanced_Query_Examples - Provides advanced examples using the supplied example library.3 o Glossary - Provides definitions of SCA terms.C o Libraries - Provides subtopics with information about project& libraries and virtual libraries.E o Reducing_LOAD_Time - Provides guidelines for reducing your LOAD time.D o Quick_Reference_Card - Provides a pointer to a quick reference& card for the SCA query language.E Under SCA_Topics, there is help information for specific ke ywords.C These keywords include attributes, relationships, and functions.B For example, you can request help on SCA_Topics SYMBOL_CLASS to4 get information about the SYMBOL_CLASS attribute. 2 OCCURRENCE= The occurrence class is an attribute of an occurrence thatD identifies the type of occurrence. The occurrence class indicatesA if the occurrence is a declaration, a reference, or one of theE other classes in the list that follows. If the occurrence class isB 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 value1 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 macro0 o COMMAND_LINE - command line file reference. o INCLUDE - source file include referenece7 o PRECOMPILED - precompiled file include refereneceD 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 declared0 o VISIBLE - occurrence appears in the source7 o HIDDEN - occurrence does not appear in the source: o COMPILATION_UNIT - the declaration that contains all2 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 theE 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.2 Quick_Reference_CardA ATTRIBUTE SELECTIONS: |RELATIONSHIP FUNCTIONS:* |5 Name Class: |Short form:5 ---------- |-----------N |CALLED_BY(,,)L NAME= |CALLING(,,)* NAME=(,...) |O |CONTAINED_BY(,,? Symbol Class: | )M ------------- |CONTAINING(,,= SYMBOL= | )* SYMBOL=(,...) |J  |TYPED_BY(,,)H Symbol Class keywords: |TYPING(,,)* |4 Argument, Component, Constant, |Long form:4 Exception, File, Field, Function, |----------L Generic, Keyword, Label, Literal, |(END=,N Macro, Module, Package, Placeholder, | BEGIN=,M Procedure, Program, Psect, Routine, | DEPTH={ | ALL },M Subroutine, Tag ,Task, Type, Unbound, | RESULT=,N Variable, Other, All, None | TRACE=)* |: Occurrence Class: |Result keywords:* ----------------- |M OCCURRENCE= |Begin, End, [No]Structure, Any_path* OCCURRENCE=(,...) |: | OTHER FUNCTIONS:4 Occurrence Class keywords: |----------* |E Declaration, Primary, Associated, |IN (END=,G Reference, Address, Call, | BEGIN=)* Command_line, Fetch, Include, |E Pointer, Precompiled, Read, Store, |EXPAND ()* Write, Other, All, None |9 |@()* Domain Class: |M ------------- |INDICATED() (NOTE: LSE required)* DOMAIN= |A DOMAIN=(,...) |NOT()* |* Domain Class keywords: |* |* Global, Inheritable, Module_specific, |* Multi_module, Predefined, All, None |* |* File Class:  |* ---------- |* FILE= |* FILE=(,...) |* |* OPERATORS: |* ---------- |* AND, OR, XOR, Pathname (\ or \\) |* |* ATTRIBUTE SELECTION EXPRESSIONS: |* [ ]...|2 Reducing_LOAD_time@ There are different m eans you can use to try to decrease LOADC 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-B consuming operation. Loading more than one module at a time> is more efficient than loading modules separately. UsingA LOAD *.ANA is a common method for loading multiple modules.D LOAD -DELETE can be used to clean up .ANA files after they areD loaded successfully and to use a lit tle less disk space during the load.@ o With large software systems, it is a good idea to use moreA than one SCA library and load them all simultaneously. ThisB can lessen the elapsed LOAD time considerably. You should be? able to load several libraries simultaneously on a singleB disk. Additionally, using more than one CPU to do your loadsC also helps, but SCA loading is mainly I/O intensive. For moreC information about how to use multiple libraries, see the help subtopics under Libraries.A o SCA uses a large number of I/Os during LOAD. Loading an SCAC library on a heavily used or badly fragmented disk causes the load to be less efficient.2 SYMBOL_CLASSE SYMBOL_CLASS is an attribute selection that identifies the type ofE symbol. A symbol can be a variable, constant, or some other class.- The format for SYMBOL_CLASS is as follows:& SYMBOL_CLASS=(keyword[,keyword...])9 The SYMBOL_CLASS can be one of the following keywords:E o ARGUMENT - formal argument (such as a routine argument or macro argument)B o CLASS - Any C++ class object construct defined by the union,# structure or class statements- o COMPONENT,FIELD - component of a record: o CONSTANT,LITERAL - named compile-time constant value o EXCEPTION - exception o FILE - file@ o FUNCTION,PROCEDURE, PROGRAM,ROUTINE, SUBROUTINE - callable program function o GENERIC - generic unit o KEYWORD - keyword" o LABEL - user-specified label o MACRO - macro@ o MODULE, PACKAGE - collection of logically related elements7 o PLACEHOLDER - marker where program text is needed o PSECT - program section o TAG - comment heading o TASK - task o TYPE - user-defined type o UNBOUND - unbound name! o VARIABLE - program variable' o OTHER - any other class of symbol: The previous keywords are SCA terms. For information on> corresponding language-specific terms, request help for theE appropriate language table (for example, FORTRAN_ATTRIBUTES_TABLE)( under the Getting_Started help topic.7 An example using the SYMBOL_CLASS attribute follows:$ FIND X AND SYMBOL_CLASS=ROUTINE) This query finds all routines named X. 2 TYPINGD The TYPING function is a relationship function. It finds the type@ of some occurrence. Occurrences related in this manner have a ? TYPING relationship between them. For example, if INTEGER is@ typing variable X, then these two occurrences are in a TYPINGC relationship. In its most common form, the function format is as follows:4 TYPING( , , DEPTH={ | ALL} )< In this format, and can be any legal query@ expression, and is a positive integer. A typical useB of the function is to find the type of a variable. For example: FIND TYPING( X, *, DEPTH=1)B This query finds the type of X, where X is some variable in the SCA database.D The TYPING function also works on user-defined types. The definedB type can have many levels, in which case the user can specify a depth as follows:2 FIND TYPING( user_defined_type, *, DEPTH=ALL)= This query gives the full type tree for USER_DEFINED_TYPE.B The TYPING function provides the power to return the exact type0 tree you want. The full format is as follows: TYPING( [ END= ], [ BEGIN= ],& [ DEPTH={ | ALL} ],% [ RESULT=RESULT_KEYWORD ],' [ TRACE=query_expression ] )@ In the previous format, and is any legal queryA expression, is a positive integer, RESULT_KEYWORD canA be STRUCTURE, NOSTRUCTURE, ANY_PATH, BEGIN, or END, and QUERY_, EXPRESSION is any legal query expression.= For a full description of the TYPING relationship, see the LSE/SCA User Manu al. 2 TYPED_BY= The TYPED_BY function is a relationship function. It finds> occurrences that have a TYPED_BY relationship between them.A For example, if variable X is typed by INTEGER, then these twoA occurrences are in a TYPED_BY relationship. In its most common+ form, the function format is as follows:6 TYPED_BY( , , DEPTH={ | ALL} )< In this format, and can be any legal query@ expression, and is a positive integer. A typical useA of the function is to find what is being typed by INTEGER. For example:( FIND TYPED_BY( INTEGER, *, DEPTH=1)D This query finds everything that is of type INTEGER. The TYPED_BYE function can also tell you the items that are in some way affectedC by a given type. The type can be predefined by language elements8 such as INTEGER, or can be user defined. For example:4 FIND TYPED_BY( user_defined_type, *, DEPTH=ALL)A This query finds all the items that are directly or indirectly! affected by USER_DEFINED_TYPE.D The TYPED_BY function provides the power to return the exact type0 tree you want. The full format is as follows: TYPED_BY( [ END= ], [ BEGIN= ],( [ DEPTH={ | ALL} ],' [ RESULT=RESULT_KEYWORD ],) [ TRACE=query_expression ] )@ In the previous format, and is any legal queryA expression, is a positive integer, RESULT_KEYWORD canA be STRUCTURE, NOSTRUCTURE, ANY_PATH, BEGIN, or END, and QUERY_, EXPRESSION is any legal query expression.? For a full description of the TYPED_BY relationship, see the LSE/SCA User Manual.2 \_(Pathname)C The path name expression allows you to identify specific symbols> based on the path of the expression. This is similar to theB debugger pathname notation. The format of this expression is as follows:: query_expression\query_expression[\query_ex pression...]> Typically, you use this expression to identify a particularE variable in a routine when you may have declared a variable of theE same name in more than one routine. For example, RETURN_STATUS mayB be a common variable in multiple routines. Some typical queries are as follows:$ 1. FIND MYROUTINE\RETURN_STATUS- 2. FIND MYMODULE\MYROUTINE\RETURN_STATUS* 3. FIND MYMODULE\SYMBOL_CLASS=ROUTINE? The first query returns all occurrences of the RETURN_STA TUSB variable that are declared inside MYROUTINE. The second exampleB returns all occurrences of the RETURN_STATUS variable which are@ declared inside MYROUTINE, where MYROUTINE is declared insideB MYMODULE. The third example returns all occurrences of routines& which are declared inside MYMODULE.B You may also use the pathname when the exact path is not known.D For example, assume that you know the module name and that XYZ isB declared somewhere inside the MYMODULE, but you do not know the8 exact pathname. You can then use the following query: FIND MYMODULE\\XYZA This query locates the XYZ variable that is declared somewhere6 inside MYMODULE and returns all occurrences of XYZ.2 @_(Query_Usage)> A query usage function incorporates the results of previousA queries into query expressions. The function has the following form: @( query_name )A The value of this expression is that of the expression that isA specified as query_name. The default query name is the current query, SCA$CURRENT_QUERY.A You can see an example of its use in the following sequence of queries: FIND X2 FIND @(SCA$CURRENT_QUERY) AND SYMBOL=ROUTINEB The advantage of using this notation is that the results of theD previous query are not reevaluated. Thus the second query will be faster than the query: FIND X AND SYMBOL=ROUTINEww 1 ANALYZE4 Syntax: ANALYZE [-OUTPUT file_name] file_spec_listF Creates analysis data files that describe the indicated source files.A This command produces analysis data files that contain a minimalF description of the source file. The analysis data files describe the? source file primarily as a set of references to unbound names.@ The ANALYZE command understands the language-specific rules for; forming names (identifiers), comments, quoted strings, andF placeholders. It assumes that tokens are reserved words and does not( inclu de them in the analysis data file.D The ANALYZE command uses the LSE environment files to determine the? appropriate language based on the file type. It uses the sameE logical names (LSE$ENVIRONMENT and LSE$SYSTEM_ENVIRONMENT) to access the environment files.C You must have a language defined in an environment file to use theF ANALYZE command with that language. It analyzes the specified sourceF file based on the description of the language in that file. With the= ANALYZE command, you can use SCA with languages not directly? supported by SCA. Do not use this command with languages that support SCA. RELATED COMMANDS: 9 LOAD ww1 CANCEL_LIBRARY, Syntax: CANCEL LIBRARY [library_spec_list]D Removes the specified SCA libraries from the current list of active libraries.B If you do not specify a library, SCA removes all active libraries from the list. RELATED COMMANDS: 9  DELETE LIBRARY SHOW LIBRARY 9 SET LIBRARY ww1 CREATE_LIBRARY, Syntax: CREATE LIBRARY directory_spec_listD Creates and initializes library files in the specified directories.? This command initializes a library and defines it as an activeB library in your current SCA session. On VMS, this results in theB logical name SCA$LIBRARY being set: when you subsequently invokeD SCA, it uses the logical name SCA$LIBRARY to reestablish the activeF library list. On Ultrix, the environment variable SCALIB must be setE for the library setting to be retained across subsequent invocations of SCA. RELATED COMMANDS: 9 DELETE LIBRARY SET LIBRARY 9 LOAD SHOW LIBRARY ww1 DELETE_ASSOCIATED_MODULE3 Syntax: DELETE ASSOCIATED MODULE module_spec_listE Deletes the associated modules of source analys is data files from an SCA library.; The associated module contains module specification files. RELATED COMMANDS: 9 DELETE MODULE DELETE PRIMARY MODULE wwޡ1 DELETE_LIBRARY* Syntax: DELETE LIBRARY library_spec_list1 Physically deletes an SCA library from the disk.; The library is removed from the current list of libraries. RELATED COMMANDS: 9 CANCEL LIBRARY SET LIBRARY 9 CREATE LIBRARY   SHOW LIBRARY wwޡ1 DELETE_MODULE( Syntax: DELETE MODULE module_spec_listA Deletes specified modules of source analysis data files from SCA libraries.E SCA deletes specified modules from the primary library. The primaryC library is the first library in the list of current SCA libraries. RELATED COMMANDS: 9 DELETE ASSOCIATED MODULE DELETE PRIMARY MODULE wwޡ1 DELETE_PRIMARY_MODULE0 Syntax: DELETE P RIMARY MODULE module_spec_listF Deletes the primary modules of source analysis data files from an SCA library.9 The primary module contains module implementation files. RELATED COMMANDS: 9 DELETE ASSOCIATED MODULE DELETE MODULE wwޡ1 DELETE_QUERY( Syntax: DELETE QUERY [query_spec_list] Deletes the indicated queries.8 If no query is specified, the current query is deleted. RELATED COMMANDS: 9 FIND SH OW QUERY wwޡ1 EXIT Syntax: EXIT Exits SCA. RELATED COMMANDS: wwޡ1 EXTRACT_ASSOCIATED_MODULE7 Syntax: EXTRACT ASSOCIATED MODULE [-OUTPUT file_name] module_spec_listF Extracts the associated modules of source analysis data files from an SCA library.D Associated modules are modules that contain implemen- tation files.< SCA writes the modules to a file with the default file name> module-name.ANA . The module name is the name of the file theE compiler created. This command performs the reverse function of the LOAD command. RELATED COMMANDS: 9 EXTRACT MODULE LOAD 9 EXTRACT PRIMARY MODULE wwޡ1 EXTRACT_MODULE= Syntax: EXTRACT MODULE [-OUTPUT file_name] module_spec_list? Extracts specified modules of source analysis data from an SCA library.< SCA writes the modules to a file with the default file nameC module-name.ANA, where the module name is the name of the file theE compiler created. This command performs the reverse function of the LOAD command. RELATED COMMANDS: 9 EXTRACT ASSOCIATED MODULE LOAD 9 EXTRACT PRIMARY MODULE wwޡ1 EXTRACT_PRIMARY_MODULEE Syntax: EXTRACT PRIMARY MODULE [-OUTPUT file_name] module_spec_listC Extracts the primary modules of source analysis data files from an SCA library.F Primary modules are modules that contain implementa- tion files. SCA8 writes the modules to a file with the default file name> module-name.ANA. The module name is the name of the file theE compiler created. This command performs the reverse function of the LOAD command. RELATED COMMANDS: 9 EXTRACT ASSOCIATED MODULE LOAD 9 EXTRACT MODULE ww(1 FIND? Syntax: FIND [-NAME query_name] [-OUTPUT file_name] query_expF Locates occurrences in the current SCA libraries that match the given query expression.< This command displays the name, class, module, line number,B occurrence, type, and relationship for each query. Each time youF enter a FIND command, SCA creates a new query to describe the result.E This example finds all occurrences of symbols whose name begins with build. SCA> FIND build*= This example finds the primary declarations of all routines.. SCA> FIND occ=primary and symbol=routine= This example displays the complete call tree below translit.0 SCA> FIND called_by( translit, depth=all )6 This example finds all the variables of type integer.4 SCA> FIND typed_by( integer, symbol=variable ) RELATED COMMANDS: 9 DELETE QUERY MODIFY QUERY NAME 9 GOTO QUERY SHOW QUERY ww( 1 GOTO_QUERY Syntax: GOTO QUERY query_name1 Makes the specified query the current SCA query.D This command splits the current window (when possible) and maps theE named query to the current window and the buffer associated with the query to the screen. RELATED COMMANDS: 9 FIND SHOW QUERY 9 INSPECT ww(1 HELP/ Syntax: HELP [-OUTPUT file_name] [help_topic]> Displays informat ion about SCA commands and requested topics.F After exiting from HELP, a help buffer contains the text displayed by this command.ww(1 IMPORT3 Syntax: IMPORT [-OUTPUT file_name] file_spec_listF Creates analysis data files that describe the indicated source files.< This command produces analysis data files from source filesA containing XREF information generated by a DIGITAL C++ compiler. RELATED COMMANDS: 9 LOAD  ww(1 INSERT_LIBRARY_AFTERB Syntax: INSERT LIBRARY AFTER prev_library_spec library_spec_listE Places the indicated libraries into the list of active SCA libraries after the library you specify. RELATED COMMANDS: 9 INSERT LIBRARY BEFORE INSERT LIBRARY LAST 9 INSERT LIBRARY FIRST wwr1 INSERT_LIBRARY_BEFOREC Syntax: INSERT LIBRARY BEFORE next_library_spec library_spec_listE Places the indicated libraries into the list of active SCA libraries before the library you specify. RELATED COMMANDS: 9 INSERT LIBRARY AFTER INSERT LIBRARY LAST 9 INSERT LIBRARY FIRST wwr1 INSERT_LIBRARY_FIRST0 Syntax: INSERT LIBRARY FIRST library_spec_list? Places the indicated libraries first in the list of active SCA libraries. RELATED COMMANDS: 9 INSERT LIBRARY AFTER INSERT LIBRARY LAST 9 INSERT LIBRARY BEFORE wwr1 INSERT_LIBRARY_LAST/ Syntax: INSERT LIBRARY LAST library_spec_listD Places the indicated libraries at the end of the list of active SCA libraries. RELATED COMMANDS: 9 INSERT LIBRARY AFTER INSERT LIBRARY FIRST 9 INSERT LIBRARY BEFORE wwr 1 INSPECTB Syntax: INSPECT [-NAME query_name] [-OUTPUT file_name] query_expD Inspects the consistency between declarations or references for the same symbol.B This command performs consistency checking based on the following conditions:9 o Checks all characteristics of an occurrence: that: symbols are explicitly declared and used, that all; types of a symbol match, that multiple declarations7 have the same name, and for specific usage of a symbol9 o Creates a new query with each INSPECT command and* does not modify the existing query RELATED COMMANDS: 9 FIND wwr1 LOAD' Syntax: LOAD [-DELETE] file_spec_listC Loads one or more files of compiler-generated source analysis data into an SCA library.E SCA updates the primary library and replaces existing modules of theB same name with new information. The primary library is the firstB library in the list of current SCA libraries. If you specify theB optional parameter -delete, SCA deletes analysis data files after8 they have been successfully loaded into an SCA library. RELATED COMMANDS: 9 CREATE LIBRARY SET LIBRARY wwr1 MODIFY_QUERY_NAME& Syntax: MODIFY QUERY NAME query_name& Change the name of the current query.D The name of the current query is modified to be the specified query5 name. Different queries may not have the same name. RELATED COMMANDS: 9 FIND SHOW QUERY 9 GOTO QUERY wwr 1 NEXT_QUERY Syntax: NEXT QUERYD Makes the next query after the current query the new current query.< SCA maps the query display and moves the cursor to the lastF remembered position in that query.It determines the order of multiple@ query sessions by the order in which the sessions were created. RELATED COMMANDS: 9 GOTO QUERY  PREVIOUS QUERY wwr1 PREVIOUS_QUERY Syntax: PREVIOUS QUERYB Makes the previous query before the current query the new current query.< SCA maps the query display and moves the cursor to the last? remembered position in that query. It determines the order of@ multiple query sessions by the order in which the sessions were created. RELATED COMMANDS: 9 GOTO QUERY NEXT QUERY wwr 1 RECOVER Syntax: RECOVER [library_spec]" Recovers corrupted SCA libraries.D This command performs checks for corrupted libraries resulting fromD abnormal termination of a LOAD or DELETE MODULE command and repairs corrupted libraries. RELATED COMMANDS: 9 VERIFY wwr 1 REORGANIZE( Syntax: REORGANIZE [library_spec_list]C Organizes the specified SCA libraries for optimal query and update performance.F If you do not specify a library, SCA reorganizes the primary library.B In this example, the REORGANIZE command creates and optimizes the+ size and organization of your SCA library.* SCA> CREATE LIBRARY library-directory( SCA> LOAD data-file-directory:*.ANA SCA> REORGANIZE RELATED COMMANDS: 9 LOAD ww<61 REPORT Syntax: REPORT [report_name] Produces the specified report.E This command generates a user-written report or one of the following standard reports:; o HELP-a help file generated from your code or design) o PACKAGE-an LSE package definition8 o INTERNALS- a comprehensive report that describes3 your software design in an organized manner: o 2167A_DESIGN- a report that meets the requirements9 of the U.S. Department of Defense's DOD-STD-2167A Software Design DocumentA You specify the type of report with the SET REPORT command or byA specifying this command with the optional report_name parameter.F This command uses default report option values or those you set usingC the SET REPORT command. These option values include, for example,1 the target file types for each report generated.@ This command produces a PACKAGE REPORT with the Trace_ Messages option value enabled." SCA> SET REPORT NAME package' SCA> SET REPORT trace_messages on SCA> REPORT package RELATED COM MANDS: 9 RESET REPORT SHOW REPORT 9 SET REPORT ww<61 RESET_CASE_SENSITIVITY Syntax: RESET CASE SENSITIVITY/ Returns case sensitivity to the default value.' The default value is case insensitive. RELATED COMMANDS: 9 SET CASE SHOW SETTINGS ww1 RESET_HYPHEN_SENSITIVITY" Syntax: RESET HYPHEN SENSITIVITY1 Returns hyphe!n sensitivity to the default value.) The default value is hyphen insensitive. RELATED COMMANDS: 9 SET HYPHEN SHOW SETTINGS ww1 RESET_REPORT( Syntax: RESET REPORT option_expression8 Restores the default values of a set of report options.E This command restores the default values for a single report option,C several specified options, or all options (using a global wildcard character). RELATED COMMANDS: 9 REPO"RT SHOW REPORT 9 SET REPORT ww1 RESET_WILDCARDS Syntax: RESET WILDCARDS. Returns wildcard syntax to the default style.E The two styles available are VMS and ULTRIX. The default values are platform dependent. RELATED COMMANDS: 9 SET WILDCARDS SHOW SETTINGS ww 1 SAVE_QUERY: Syntax: SAVE QUERY [-OUTPUT file_name] [query_#spec_list]: Saves one or more SCA queries as FIND commands to a file.> This command saves to the output file a FIND command for eachD specified query. The FIND commands can be executed by SCA by means of the @file-spec command.D If no query name is specified, information on all queries is saved.6 The default output file name is sys$disk:[]query.com. RELATED COMMANDS: 9 FIND SHOW QUERY ww 1 SET_CASE$ Syntax: SE$T CASE sensitivity_state> Sets queries to be either case sensitive or case insensitive. RELATED COMMANDS: 9 RESET CASE SENSITIVITY SHOW SETTINGS ww1 SET_COMMAND_LANGUAGE/ Syntax: SET COMMAND LANGUAGE command_language3 Sets the command language to the specified syntax.? The current command language options are PORTABLE or VMS. TheC PORTABLE option enables the portable command- language parser. OnF VMS, the VMS option enables the% VMS-only Command Language Interpreter: (CLI) parser. The VMS option is not available on ULTRIX. RELATED COMMANDS: 9 SHOW COMMAND LANGUAGE ww1 SET_DUPLICATE_INCLUSIONS3 Syntax: SET DUPLICATE INCLUSIONS processing_state< En(dis)ables special processing of include file symbols and occurrences.D SET DUPLICATE INCLUSIONS HIDDEN causes queries to recognize include< file symbols and occurrences; this will eliminate duplicate&A occurrences and symbols resulting from multiples inclusions of aE single include file. SET DUPLICATE INCLUSIONS VISIBLE disables this recognition. RELATED COMMANDS: 9 SHOW SETTINGS ww 1 SET_HYPHEN& Syntax: SET HYPHEN sensitivity_state? Sets queries to be hyphen/underscore sensitive or insensitive.E SET HYPHEN SENSITIVE causes queries to distinguish be- tween hyphensA and underscores. SET HYPHEN INSENSITIV'E causes queries to treat. hyphens and underscores as indistinguishable. RELATED COMMANDS: 9 RESET HYPHEN SENSITIVITY SHOW SETTINGS wwC 1 SET_LIBRARY' Syntax: SET LIBRARY library_spec_listD Identifies the SCA physical libraries to be used for subsequent SCA functions.F This command lets you activate a specified library for use during theD current SCA session. If you list several libraries, SCA can accessF all of them during your sessi(on as a single logical library. On VMS,F the SET LIBRARY command will define a logical name which will be usedF to reestablish the active library list upon subsequent invocations ofE SCA. On Ultrix, the environment variable SCALIB must be set outsideA of SCA for the library settings to be retained across subsequent invocations of SCA. RELATED COMMANDS: 9 CANCEL LIBRARY SHOW LIBRARY 9 INSERT LIBRARY commands ww)C 1 SET_REPORT Syntax: SET REPORT option_name# Sets an option value for a report.E This command allows you to set report option values for a particularF type of report and override default option values. The report optionF values allow you to, for example, specify the type of output file forF a report. You can see a list of these values by entering SHOW REPORT% command followed by an asterisk (*).E Before setting the report option values, first specify a report typeE* by entering this command with the option_name parameter, followed byD the name of report you want to produce. For example, to set option? values for a PACKAGE report, enter the command SET REPORT NAME PACKAGE. RELATED COMMANDS: 9 REPORT SHOW REPORT 9 RESET REPORT wwC1 SET_WILDCARDS' Syntax: SET WILDCARDS wildcard_syntax6 Sets queries to use either ULTRIX or VMS wildcardin+g.C SET WILDCARDS ULTRIX lets you use the ULTRIX syntax for specifying; wildcards. SET WILDCARDS VMS lets you use the VMS syntax.: These are the VMS Wildcard Characters and their meanings. % matches any single character.1 * matches any string of zero or more characters.F & overrides wildcard characters. Example: to find a name equal to *2 character you would use a name expression of &* .= These are the Ultrix Wildcard Characters and their meanings.! ? matches any single , character.1 * matches any string of zero or more characters.F \ overrides wildcard characters. Example: to find a name equal to *2 character you would use a name expression of \* .D [abc] matches any single character from the expression abc (match aC or b or c). Also excepts ranges: ab[cd- f] matches abc or abd orC abe or abf. Also excepts negative ranges: ab[^a-c] matches namesA starting with ab but NOT ending with single character a, b or c. Ranges like 0-9 are also legal.-< {A,B,C} matches A or B or C where they may each be wildcard( containing name expressions. Examples:. ab{cd,ef}g matches abcdg or abefg.3 ab{cd*,[ab]c} matches abcd*, abac or abbc.M {aa?,{cd,ef}g,z} matches aa followed by any single character, cdg, efg, or z. RELATED COMMANDS: 9 RESET WILDCARDS SHOW SETTINGS wwC1 SHOW_ALL_MODULE@ Syntax: SHOW ALL MODULE [-OUTPUT file_name] [mod.ule_spec_list]< Displays information about both hidden and visible modules. RELATED COMMANDS: 9 SET LIBRARY SHOW MODULE 9 SHOW HIDDEN MODULE SHOW VISIBLE MODULE wwC1 SHOW_COMMAND_LANGUAGE Syntax: SHOW COMMAND LANGUAGEB Displays the name of the current command language setting; either PORTABLE or VMS. RELATED COMMANDS: 9 SET COMMAND LANGUAGE ww/C1 SHOW_HIDDEN_MODULEC Syntax: SHOW HIDDEN MODULE [-OUTPUT file_name] [module_spec_list]+ Displays information about hidden modules. RELATED COMMANDS: 9 SHOW ALL MODULE SHOW VISIBLE MODULE 9 SHOW MODULE wwC1 SHOW_LIBRARY Syntax: SHOW LIBRARYC Displays the directory specification for all active SCA libraries. RELATED COMMANDS: 9 CREATE LIBRARY SET LIBR0ARY wwC 1 SHOW_MODULE< Syntax: SHOW MODULE [-OUTPUT file_name] [module_spec_list]8 Displays information about visible SCA library modules.> If you do not specify a module name, SCA displays all visible3 modules. The default output file name is SCA.LIS. RELATED COMMANDS: 9 SET LIBRARY SHOW HIDDEN MODULE 9 SHOW ALL MODULE SHOW VISIBLE MODULE ww 1 SHOW_QUERY! Syntax: SHOW Q1UERY [query_name]; Displays information about one or more SCA query sessions.@ This command displays (in tabular format) the query name, query5 expression, and description for the indicated query.= If no query name is specified, information on all queries is displayed. RELATED COMMANDS: 9 FIND GOTO QUERY wwdQ 1 SHOW_REPORT' Syntax: SHOW REPORT option_expression1 Displays the values for a set of report optio2ns.? You can display the values for a single report option, several; specified options, or all options (using a global wildcard character). RELATED COMMANDS: 9 REPORT SET REPORT 9 RESET REPORT wwdQ1 SHOW_SETTINGS Syntax: SHOW SETTINGS0 Displays the current state of various settings.C This command displays the state of all the switches settable using the SET command3. RELATED COMMANDS: 9 RESET CASE SENSITIVITY SET DUPLICATE INCLUSIONS 9 RESET HYPHEN SENSITIVITY SET HYPHEN 9 RESET WILDCARDS SET WILDCARDS 9 SET CASE wwdQ1 SHOW_VERSION Syntax: SHOW VERSION% Displays the current version of SCA.wwdQ1 SHOW_VISIBLE_MODULED Syntax: SHOW VISIBLE MODULE [-OUTPUT file_name] [module_spec_list], Dis4plays information about visible modules.D This command performs the same function as the SHOW MODULE command. RELATED COMMANDS: 9 SHOW ALL MODULE SHOW MODULE 9 SHOW HIDDEN MODULE wwdQ1 VERIFY$ Syntax: VERIFY [library_spec_list]5 Verifies that the specified SCA libraries are valid.= This command verifies that valid SCA libraries are free from@ corruptions resulting from an abnormal terminat5ion of a LOAD or DELETE MODULE command. RELATED COMMANDS: 9 DELETE MODULE RECOVER 9 LOAD wwdQ1 Command_Definitions@ The following is an alphabetized list of SCA commands and their definitions: ANALYZE@ Creates analysis data files that describe the indicated source files. CANCEL LIBRARYE Removes the specified SCA libraries fro6m the current list of active libraries. CREATE LIBRARY? Creates and initializes library files in the specified directories. DELETE ASSOCIATED MODULEE Deletes the associated modules of source analysis data files from an SCA library. DELETE LIBRARY9 Physically deletes an SCA library from the disk. DELETE MODULEE Deletes specified modules of source analysis data files from SCA lib7raries. DELETE PRIMARY MODULEB Deletes the primary modules of source analysis data files from an SCA library. DELETE QUERY' Deletes the indicated queries. EXIT Exits SCA. EXTRACT ASSOCIATED MODULEF Extracts the associated modules of source analysis data files from an SCA library. EXTRACT MODULEC Extracts specified modules of source analysis data from an SCA library.8 EXTRACT PRIMARY MODULEC Extracts the primary modules of source analysis data files from an SCA library. FINDD Locates occurrences in the current SCA libraries that match$ the given query expression. GOTO QUERY9 Makes the specified query the current SCA query. HELPF Displays information about SCA commands and requested topics. IMPORT@ Creates analysis data files that describe the ind9icated source files. INSERT LIBRARY AFTERC Places the indicated libraries into the list of active SCA1 libraries after the library you specify. INSERT LIBRARY BEFOREC Places the indicated libraries into the list of active SCA2 libraries before the library you specify. INSERT LIBRARY FIRSTC Places the indicated libraries first in the list of active SCA libraries. INSERT LIBRARY LASTA : Places the indicated libraries at the end of the list of active SCA libraries. INSPECTD Inspects the consistency between declarations or references for the same symbol. LOADF Loads one or more files of compiler-generated source analysis" data into an SCA library. MODIFY QUERY NAME. Change the name of the current query. NEXT QUERYE Makes the next query after the current query the new current; query. PREVIOUS QUERYB Makes the previous query before the current query the new current query. RECOVER* Recovers corrupted SCA libraries. REORGANIZED Organizes the specified SCA libraries for optimal query and update performance. REPORT' Produces the specified report. RESET CASE SENSITIVITY7 Returns case sensitivity to the default value. RESET HYPHEN SENSITIVITY<9 Returns hyphen sensitivity to the default value. RESET REPORT@ Restores the default values of a set of report options. RESET WILDCARDS6 Returns wildcard syntax to the default style. SAVE QUERYB Saves one or more SCA queries as FIND commands to a file. SET CASEF Sets queries to be either case sensitive or case insensitive. SET COMMAND LANGUAGE; Sets the command language to the specified synt=ax. SET DUPLICATE INCLUSIONSD En(dis)ables special processing of include file symbols and occurrences. SET HYPHEN: Sets queries to be hyphen/underscore sensitive or insensitive. SET LIBRARY= Identifies the SCA physical libraries to be used for" subsequent SCA functions. SET REPORT+ Sets an option value for a report. SET WILDCARDS> Sets queries to use either ULTRIX or VMS >wildcarding. SHOW ALL MODULED Displays information about both hidden and visible modules. SHOW COMMAND LANGUAGEC Displays the name of the current command language setting; either PORTABLE or VMS. SHOW HIDDEN MODULE3 Displays information about hidden modules. SHOW LIBRARY@ Displays the directory specification for all active SCA libraries. SHOW MODULE@ Displays information about visibl?e SCA library modules. SHOW QUERYC Displays information about one or more SCA query sessions. SHOW REPORT9 Displays the values for a set of report options. SHOW SETTINGS8 Displays the current state of various settings. SHOW VERSION- Displays the current version of SCA. SHOW VISIBLE MODULE4 Displays information about visible modules. VERIFY= Verifies that the specified SCA libraries a@re valid.ww.1 Help_Commands HELPF Displays information about SCA commands and requested topics. SHOW COMMAND LANGUAGEC Displays the name of the current command language setting; either PORTABLE or VMS. SHOW SETTINGS8 Displays the current state of various settings. SHOW VERSION- Displays the current version of SCA.ww.1 Library_Commands ANALYZE@ A Creates analysis data files that describe the indicated source files. CANCEL LIBRARYE Removes the specified SCA libraries from the current list of active libraries. CREATE LIBRARY? Creates and initializes library files in the specified directories. DELETE ASSOCIATED MODULEE Deletes the associated modules of source analysis data files from an SCA library. DELETE LIBRARY9 PhysicaBlly deletes an SCA library from the disk. DELETE MODULEE Deletes specified modules of source analysis data files from SCA libraries. DELETE PRIMARY MODULEB Deletes the primary modules of source analysis data files from an SCA library. EXTRACT ASSOCIATED MODULEF Extracts the associated modules of source analysis data files from an SCA library. EXTRACT MODULEC Extracts specified modules of souCrce analysis data from an SCA library. EXTRACT PRIMARY MODULEC Extracts the primary modules of source analysis data files from an SCA library. IMPORT@ Creates analysis data files that describe the indicated source files. INSERT LIBRARY AFTERC Places the indicated libraries into the list of active SCA1 libraries after the library you specify. INSERT LIBRARY BEFOREC Places the indiDcated libraries into the list of active SCA2 libraries before the library you specify. INSERT LIBRARY FIRSTC Places the indicated libraries first in the list of active SCA libraries. INSERT LIBRARY LASTA Places the indicated libraries at the end of the list of active SCA libraries. LOADF Loads one or more files of compiler-generated source analysis" data into an SCA library. RECOVER* E Recovers corrupted SCA libraries. REORGANIZED Organizes the specified SCA libraries for optimal query and update performance. SET LIBRARY= Identifies the SCA physical libraries to be used for" subsequent SCA functions. SHOW ALL MODULED Displays information about both hidden and visible modules. SHOW HIDDEN MODULE3 Displays information about hidden modules. SHOW LIBRARY@ Displays the Fdirectory specification for all active SCA libraries. SHOW MODULE@ Displays information about visible SCA library modules. SHOW VISIBLE MODULE4 Displays information about visible modules. VERIFY= Verifies that the specified SCA libraries are valid.ww^1 Program_Design_Commands REPORT' Produces the specified report. RESET REPORT@ Restores the default values of a set ofG report options. SET REPORT+ Sets an option value for a report. SHOW REPORT9 Displays the values for a set of report options.ww^1 Query_Commands FINDD Locates occurrences in the current SCA libraries that match$ the given query expression. INSPECTD Inspects the consistency between declarations or references for the same symbol.ww%1 Query_Session_ManipulaHtion_Commands DELETE QUERY' Deletes the indicated queries. EXIT Exits SCA. GOTO QUERY9 Makes the specified query the current SCA query. MODIFY QUERY NAME. Change the name of the current query. NEXT QUERYE Makes the next query after the current query the new current query. PREVIOUS QUERYB Makes the previous query before the current query the new current queryI. SAVE QUERYB Saves one or more SCA queries as FIND commands to a file. SHOW QUERYC Displays information about one or more SCA query sessions.ww(1 Commands_for_Tailoring_the_Environment RESET CASE SENSITIVITY7 Returns case sensitivity to the default value. RESET HYPHEN SENSITIVITY9 Returns hyphen sensitivity to the default value. RESET WILDCARDS6 Returns wildcard syntax to thJe default style. SET CASEF Sets queries to be either case sensitive or case insensitive. SET COMMAND LANGUAGE; Sets the command language to the specified syntax. SET DUPLICATE INCLUSIONSD En(dis)ables special processing of include file symbols and occurrences. SET HYPHEN: Sets queries to be hyphen/underscore sensitive or insensitive. SET WILDCARDS> Sets queries to use either ULTRIXK or VMS wildcarding.ww1 Parameter_Glossary command_language? Specifies either the VMS or PORTABLE command language.F Uses the parameter value PORTABLE to set the command languageF to SCA Version 4 open-system commands and the parameter value? VMS to set the command language to the SCA Version 3.1D VMS-specific commands. The VMS option is only available on VMS systems. directory_spec_list+ 'L Specifies one or more directories. file_name' Specifies one valid file name. file_spec_list0 Specifies one or more valid file names.2 You may use wildcard file specifications. help_topic5 Indicates the topic for which you want help. library_spec Specifies one library. library_spec_list) Specifies one or more libraries.D A library is specified Mby the directory it is in or you canB use a library number in place of a library specification.9 You can also specify a wildcard name expression. module_spec_list' Specifies one or more modules./ You may specify wildcard module names. next_library_specF Specifies the next library after a given library in a library list.? If you do not specify a value, SCA adds the library or0 libraries to the Nbeginning of the list. option_expression2 Specifies the set of options to be shown. option_name) Specifies an report option type. prev_library_specB Specifies the previous library after a given library in a library list.? If you do not specify a value, SCA adds the library or* libraries to the end of the list. processing_state@ Specifies the state for duplicate inclusion pro!Ocessing.+ Valid choices are SEEN and UNSEEN. query_exp6 Specifies the set of occurrences to be found.B For information on query expressions, see the chapters onA query expressions and query language in the user manual. query_name1 Specifies the name of the query session. query_spec_list' Specifies one or more queries.# You can specify wildcards. report_name5 Spe Pcifies the name of the report to produce.A The report name should be the name of one of the DigitalD supplied reports or the name of a user-written report. YouF can abbreviate the report name if the abbreviation is unique.9 The REPORT command uses this parameter to find a; corresponding TPU procedure whose name starts withB SCA_REPORT_report-name. This TPU procedure is invoked toC produce the report. Because there is a TPU restr Qiction onE the length of procedure names, a report name must not exceed 121 characters.7 Digital has implemented the following reports:@ o HELP-A help file, suitable for processing by the2 VMS Librarian into a help library.? o PACKAGE-An LSE package definition, which can beB processed by LSE and put into an environment file,A to create templates for calling the procedures in R your code.@ o INTERNALS-A comprehensive report on the softwareA in your system, all of the information in comment> headers, and a structural presentation of your code.? o 2167A_DESIGN-The design section of the DOD-STD-/ 2167A Software Design Document. sensitivity_state$ Specifies case sensitivity., Valid choices are either ON or OFF. wildcard_syntaxS* Specifies a style of wildcarding.0 Valid choices are either ULTRIX or VMS.wwl1 New_Features: For information on new features for this release, see the release notes.wwl 1 About_SCAL The Compaq Source Code Analyzer (SCA) is an interactive, multilanguage,D source code cross-reference and static analysis tool that isD designed to aid developers in understanding the complexities of large-scale software syTstems.B SCA is included in the DECset Software Engineering Tools Package.< SCA is integrated with the Compaq Language-Sensitive Editor> (LSE). When SCA is used with LSE, you can interactively edit,B compile, debug, navigate, and analyze source code during a single development session.wwl1 Help? Displays information about SCA commands. In response to the; Topic? prompt, you can also display such information as:0 o New features in the update ("New_FeaturUes")8 o Definition for each command ("Command_Definitions")7 o Commands listed by category ("Command_Categories"), o Brief introduction to SCA ("About_SCA") Help Commands < HELP SHOW SETTINGS < SHOW COMMAND LANGUAGE SHOW VERSION   Library Commands < ANALYZE INSERT LIBRARY FIRST < CANCEL LIBRARY INSERT LIBRARY LAST < CREATE LIBRARY V LOAD < DELETE ASSOCIATED MODULE RECOVER < DELETE LIBRARY REORGANIZE < DELETE MODULE SET LIBRARY < DELETE PRIMARY MODULE SHOW ALL MODULE < EXTRACT ASSOCIATED MODULE SHOW HIDDEN MODULE < EXTRACT MODULE SHOW LIBRARY < EXTRACT PRIMARY MODULE SHOW MODULE < IMPORT SWHOW VISIBLE MODULE < INSERT LIBRARY AFTER VERIFY < INSERT LIBRARY BEFORE   Program Design Commands < REPORT SET REPORT < RESET REPORT SHOW REPORT   Query Commands < FIND INSPECT  % Query Session Manipulation Commands < DELETE QUERY NEXT QUERY X< EXIT PREVIOUS QUERY < GOTO QUERY SAVE QUERY < MODIFY QUERY NAME SHOW QUERY  ( Commands for Tailoring the Environment < RESET CASE SENSITIVITY SET COMMAND LANGUAGE < RESET HYPHEN SENSITIVITY SET DUPLICATE INCLUSIONS < RESET WILDCARDS SET HYPHEN < SET CASE SET WILDCARDS   COMMAND SUMMARY CATEGORIES  Help Commands Library Commands Program Design Commands Query Commands* Query Session Manipulation Commands- Commands for Tailoring the Environment  OTHER TOPICS  Command_Definitions Parameter_Glossary New_Features About_SCAww