CMUCL provides a number of functions in the XREF package that may be used to query the cross-reference database:
Returns the list of xref-contexts where function (either a
symbol that names a function, or a function object) may be called
at runtime. XREF does not record calls to macro-functions (such as
defun) or to special forms (such as
Returns the list of program contexts that may reference global-variable.
Returns a list of program contexts where the specified global
variable may be bound at runtime (for example using
Returns a list of program contexts where the given global variable
may be modified at runtime (for example using
An xref-context is the originating site of a cross-reference.
It identifies a portion of a program, and is defined by an
xref-context structure, that comprises a name, a source file and a
Returns the name slot of an xref-context, which is one of:
labels, or anonymous lambdas) that is named by a list of the form
(:internal outer inner).
(:method foo (specializer1 specializer2)).
"Creation Form for #<KERNEL::CLASS-CELL STRUCT-FOO>"
defclassform causes accessor functions to be generated by the compiler; this code is compiler-generated (it does not appear in the source file), and so is identified by the XREF facility by a string.
Return the truename (in the sense of the variable
compile-file-truename) of the source file from which the
referencing forms were compiled. This slot will be
nil if the
code was compiled from a stream, or interactively from the
Return a list of positive integers identifying the form that
contains the cross-reference. The first integer in the source-path
is the number of the top-level form containing the cross-reference
(for example, 2 identifies the second top-level form in the source
file). The second integer in the source-path identifies the form
within this top-level form that contains the cross-reference, and so
on. This function will always return
nil if the file slot of an