ToC DocOverview CGDoc RelNotes FAQ Index PermutedIndex
Allegro CL version 11.0

cross-reference operators


discard-all-xref-info

function, cross-reference package

Arguments:

This function returns nil but is used for its side effects. It clears the cross reference database, which will then be ready to receive new information.

See cross-reference.html for more information on the cross reference facility.


get-relation

function, cross-reference package

Arguments: relation name1 name2 &key in-files in-functions exhaustive errorp

This function returns (rather than prints) information on whether the function identified by name1 has the relation identified by relation to the function or global variable identified by name2. (Of course, a relation will be identified only if the cross reference database contains information on the relation.)

name1 should always be a function name or :wild. A function name is a symbol or certain types of lists. See Function specs in implementation.html for information on allowable types of lists. :wild indicates that a list of all functions in the database having relation to name2 (but perhaps restricted by in-files and in-functions - see below). name2 should be a function name if relation is one of the calls relations and should be a global variable if relation is one of the uses relations. Calls and uses relations are defined just below. name2 can also be the keyword :wild, in which case a list is returned with all functions in the database (perhaps restricted by the in-files and in-functions arguments) which have the relationship specified by relation to name1.

Only one of name1 and name2 can be :wild. If both are specified :wild, an error will be signaled.

The value of relation can be any of the following keywords. The first four are calls relations and the second four are uses relations.

The in-functions and in-files keyword arguments can be used to restrict the search to particular functions (for in-functions) or functions defined in particular files (for in-files). The default value for each argument is nil, which calls for an unrestricted search. If either or both is true, their values should be lists, of functions or global variables (as appropriate) for in-functions and files for in-files. If either is true, the return result will be restricted to functions or global variables specified in the in-functions list and to functions defined in the files specified by the in-files list. Note that although it is not an error, it is unusual to specify values for either of these arguments unless one of name1 or name2 is :wild.

The exhaustive keyword argument is a boolean. When true, get-relation will look for relations established in the actual implementation (by examining code vectors of function objects) allowing some information to be retrieved even when there is no information in the xref database. This argument defaults to the opposite of *use-xref-database-only* (i.e. default to nil when that variable is true and to t when that variable is nil).

This function returns nil if name1 does not have relation with name2 and neither is :wild. If neither is :wild and relation is true, name2 is returned. If either is :wild, a (possibly empty) list of functions or global variables satisfying relation with the non-:wild argument is returned. What is returned is filtered through the lists which are the values of in-functions or in-files if such are specified.

See cross-reference.html for more information on the cross reference facility.


macros-called-by

function, cross-reference package

Arguments: name &key in-files inverse in-functions stream

When the value of the :inverse argument is nil (the default), this function prints information in the database about the macros called by the function identified by name. When the value of the inverse argument is true, this function prints information on the functions which call the macro identified by name.

name should be a symbol or a function name. (A function name is a list. See Function specs in implementation.html for more information.)

The in-functions and in-files keyword arguments can be used to restrict the search to particular functions (for in-functions) or functions defined in particular files (for in-files). The default value for each argument is nil, which calls for an unrestricted search. A true value should be a list of function names or file names (respectively) and the information printed will be the intersection of the functions found in the database and the functions in the list or defined in files in the list (respectively). Note that source file information must have been recorded for the files in the in-files list.

This function does not return any value. The information is printed to the stream specified by the stream keyword argument, which defaults to *standard-output*. The function get-relation can be used when you wish information returned rather than printed.

See cross-reference.html for more information on the cross reference facility.


start-xref

function, cross-reference package

Arguments:

This function returns t but is called for its side effects. It sets the values of *record-xref-info* and *load-xref-info* to t and thus provides a convenient shorthand way to start collecting cross reference data.

See cross-reference.html for more information on the cross reference facility.


stop-xref

function, cross-reference package

Arguments:

This function returns nil but is called for its side effects. It sets the values of *record-xref-info* and *load-xref-info* to nil and thus provides a convenient shorthand way to stop collecting cross reference data.

See cross-reference.html for more information on the cross reference facility.


who-binds

function, cross-reference package

Arguments: name &key inverse in-files in-functions stream

When the value of the inverse argument is nil (the default), this function prints information in the database about those functions which bind the global variable identified by name. When the value of the inverse argument is true, this function prints information on the global variables bound by the function identified by name.

When inverse is nil, name can be any Lisp object but only global variables make sense as the value (no cross reference information is gathered for other types of Lisp objects). When inverse is true, name must be a function name (either a symbol or a list of the type described in the discussion of function specs in Function specs in implementation.html).

The in-functions and in-files keyword arguments can be used to restrict the search to particular functions (for in-functions) or functions defined in particular files (for in-files). The default value for each argument is nil, which calls for an unrestricted search. When inverse is nil (so a list of functions is printed by this function) a true value for in-functions or in-files should be a list of function names or file names (respectively) and the information printed will be the intersection of the functions found in the database and the functions in the list or defined in files in the list (respectively). Note that source file information must have been recorded for the files in the in-files list. When inverse is true (so this function is printing the list of global variables bound by the function identified by name), the list that is the value of in-functions should be a list of global variables and only those found in the database and in the list will be printed.

This function does not return any value. The information is printed to the stream specified by the stream keyword argument, which defaults to *standard-output*. The function get-relation can be used when you wish information returned rather than printed.

The top-level command :who-binds calls this function.

See cross-reference.html for more information on the cross reference facility.


who-calls

function, cross-reference package

Arguments: name &key inverse in-files in-functions stream

This function prints the information that would be printed by successively calling who-directly-calls, who-indirectly-calls, and macros-called-by with exactly the arguments passed to this function. Thus, this function is a shorthand for the other three functions. See the description of those functions just above for information on what is printed and what the effect of various argument values are.

This function does not return any value. The information is printed to the stream specified by the stream keyword argument, which defaults to *standard-output*. The function get-relation can be used when you wish information returned rather than printed.

The top-level command :who-calls calls this function.

See cross-reference.html for more information on the cross reference facility.


who-directly-calls

function, cross-reference package

Arguments: name &key inverse in-files in-functions stream

When the value of the inverse argument is nil (the default), this function prints information in the database about those functions which directly call the function identified by name. When the value of the inverse argument is true, this function prints the names of the functions directly called by the function identified by name.

name should be a symbol or a function name. (A function name is a list. See Function specs in implementation.html for more information.)

The in-functions and in-files keyword arguments can be used to restrict the search to particular functions (for in-functions) or functions defined in particular files (for in-files). The default value for each argument is nil, which calls for an unrestricted search. A true value should be a list of function names or file names (respectively) and the information printed will be the intersection of the functions found in the database and the functions in the list or defined in files in the list (respectively). Note that source file information must have been recorded for the files in the in-files list.

This function does not return any value. The information is printed to the stream specified by the stream keyword argument, which defaults to *standard-output*. The function get-relation can be used when you wish information returned rather than printed.

See cross-reference.html for more information on the cross reference facility.


who-indirectly-calls

function, cross-reference package

Arguments: name &key inverse in-files in-functions stream

When the value of the inverse argument is nil (the default), this function prints information in the database about those functions which indirectly call the function identified by name. When the value of the inverse argument is true, this function prints the names of the functions indirectly called by the function identified by name.

name should be a symbol or a function spec. (A function name is a list. See Function specs in implementation.html for more information.)

The in-functions and in-files keyword arguments can be used to restrict the search to particular functions (for in-functions) or functions defined in particular files (for in-files). The default value for each argument is nil, which calls for an unrestricted search. A true value should be a list of function names or file names (respectively) and the information printed will be the intersection of the functions found in the database and the functions in the list or defined in files in the list (respectively). Note that source file information must have been recorded for the files in the in-files list.

This function does not return any value. The information is printed to the stream specified by the stream keyword argument, which defaults to *standard-output*. The function get-relation can be used when you wish information returned rather than printed.

See cross-reference.html for more information on the cross reference facility.


who-references

function, cross-reference package

Arguments: name &key inverse in-files in-functions stream

When the value of the inverse argument is nil (the default), this function prints information in the database about those functions which reference the global variable identified by name. When the value of the inverse argument is true, this function prints information on the global variables referenced by the function identified by name.

When inverse is nil, name can be any Lisp object but only global variables make sense as the value (no cross reference information is gathered for other types of Lisp object). When inverse is true, name must be a function name (either a symbol or a list of the type described in the discussion of function specs in Function specs in implementation.html).

The in-functions and in-files keyword arguments can be used to restrict the search to particular functions (for in-functions) or functions defined in particular files (for in-files). The default value for each argument is nil, which calls for an unrestricted search. When inverse is nil (so a list of functions is printed by this function) a true value for in-functions or in-files should be a list of function names or file names (respectively) and the information printed will be the intersection of the functions found in the database and the functions in the list or defined in files in the list (respectively). Note that source file information must have been recorded for the files in the in-files list. When inverse is true (so this function is printing the list of global variables referenced by the function identified by name), the list that is the value of in-functions should be a list of global variables and only those found in the database and in the list will be printed.

This function does not return any value. The information is printed to the stream specified by the stream keyword argument, which defaults to *standard-output*. The function get-relation can be used when you wish information returned rather than printed.

The top-level command :who-references calls this function.

See cross-reference.html for more information on the cross reference facility.


who-sets

function, cross-reference package

Arguments: name &key inverse in-files in-functions stream

When the value of the inverse argument is nil (the default), this function prints information in the database about those functions which set the global variable identified by name. When the value of the inverse argument is true, this function prints information on the global variables set by the function identified by name.

When inverse is nil, name can be any Lisp object but only global variables make sense as the value (no cross reference information is gathered for other types of Lisp object). When inverse is true, name must be a function name (either a symbol or a list of the type described in the discussion of function specs in Function specs in implementation.html).

The in-functions and in-files keyword arguments can be used to restrict the search to particular functions (for in-functions) or functions defined in particular files (for in-files). The default value for each argument is nil, which calls for an unrestricted search. When inverse is nil (so a list of functions is printed by this function) a true value for in-functions or in-files should be a list of function names or file names (respectively) and the information printed will be the intersection of the functions found in the database and the functions in the list or defined in files in the list (respectively). Note that source file information must have been recorded for the files in the in-files list. When inverse is true (so this function is printing the list of global variables set by the function identified by name), the list that is the value of in-functions should be a list of global variables and only those found in the database and in the list will be printed.

This function does not return any value. The information is printed to the stream specified by the stream keyword argument, which defaults to *standard-output*. The function get-relation can be used when you wish information returned rather than printed.

The top-level command :who-sets calls this function.

See cross-reference.html for more information on the cross reference facility.


who-uses

function, cross-reference package

Arguments: name &key inverse in-files in-functions stream

This function prints the information that would be printed by successively calling who-binds, who-references, and who-sets with exactly the arguments passed to this function. Thus, this function is a shorthand for the other three functions. See the description of those functions just above for information on what is printed and what the effect of various argument values are.

This function does not return any value. The information is printed to the stream specified by the stream keyword argument, which defaults to *standard-output*. The function get-relation can be used when you wish information returned rather than printed.

The top-level command :who-uses calls this function.

See cross-reference.html for more information on the cross reference facility.


with-xref

macro, cross-reference package

Arguments: body

This macro enables recording and loading of cross reference information during the execution of body. The macro binds *record-xref-info* and *load-xref-info* to t during the execution of body and so ensures that cross reference information is generated and loaded during compiles and loads within body.

See cross-reference.html for more information on the cross reference facility.


xref-describe

function, cross-reference package

Arguments: name

This function prints what would be printed by who-calls and who-uses applied to name. name should either be a function name or a global variable depending on the information desired. See the descriptions of who-calls and who-uses for information on exactly what is printed by this function.

This function does not return any value. The information is printed to *terminal-io* instead. The function get-relation can be used when you wish information returned rather than printed.

See cross-reference.html for more information on the cross reference facility.


Copyright (c) Franz Inc. Lafayette, CA., USA. All rights reserved.

ToC DocOverview CGDoc RelNotes FAQ Index PermutedIndex
Allegro CL version 11.0