
prolog_xref.pl -- Prolog cross-referencer data collection
This module implements to data-collection part of the cross-referencer.
This code is used in two places:
- gxref/0 (part of XPCE) provides a graphical front-end for this
module
- PceEmacs (also part of XPCE) uses the cross-referencer to color
goals and predicates depending on their references.
- bug
- - meta_predicate/1 declarations take the module into consideration.
Predicates that are both available as meta-predicate and normal
(in different modules) are handled as meta-predicate in all
places.
prolog:called_by(+Goal, +Module, +Context, -Called) is semidet[multifile]- True when Called is a list of callable terms called from Goal,
handled by the predicate Module:Goal and executed in the context
of the module Context. Elements of Called may be qualified. If
not, they are called in the context of the module Context.
prolog:called_by(+Goal, -ListOfCalled)[multifile]- If this succeeds, the cross-referencer assumes Goal may call any
of the goals in ListOfCalled. If this call fails, default
meta-goal analysis is used to determine additional called goals.
- deprecated
- - New code should use prolog:called_by/4
prolog:meta_goal(+Goal, -Pattern)[multifile]- Define meta-predicates. See the examples in this file for
details.
prolog:hook(Goal)[multifile]- True if Goal is a hook that is called spontaneously (e.g., from
foreign code).
Undocumented predicates
The following predicates are exported, but not or incorrectly documented.
xref_uses_file(Arg1, Arg2, Arg3)
xref_called(Arg1, Arg2, Arg3, Arg4)
xref_module(Arg1, Arg2)
xref_done(Arg1, Arg2)
xref_definition_line(Arg1, Arg2)
xref_defined(Arg1, Arg2, Arg3)
xref_mode(Arg1, Arg2, Arg3)
xref_op(Arg1, Arg2)
xref_source(Arg1, Arg2)
xref_exported(Arg1, Arg2)
xref_source(Arg1)
xref_called(Arg1, Arg2, Arg3)
xref_hook(Arg1)
xref_used_class(Arg1, Arg2)
xref_meta(Arg1, Arg2)
xref_defined_class(Arg1, Arg2, Arg3)
xref_meta(Arg1, Arg2, Arg3)
xref_source_file(Arg1, Arg2, Arg3, Arg4)
xref_built_in(Arg1)
xref_public_list(Arg1, Arg2, Arg3, Arg4)
xref_public_list(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6)
xref_source_file(Arg1, Arg2, Arg3)
xref_public_list(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7)
xref_prolog_flag(Arg1, Arg2, Arg3, Arg4)
xref_clean(Arg1)
xref_option(Arg1, Arg2)
xref_current_source(Arg1)
xref_comment(Arg1, Arg2, Arg3, Arg4)
xref_public_list(Arg1, Arg2, Arg3)
xref_comment(Arg1, Arg2, Arg3)