pce_prolog_xref.pl
- prolog:xref_source_identifier(+Object, -Ref)[multifile]
- The cross-referencer runs faster if the reference is an indexable term. Therefore we strip the XPCE @ from the object.
- prolog:xref_source_directory(+Source, -Dir)[multifile]
- Find the directory of a PceEmacs buffer to resolve relative paths.
- prolog:xref_open_source(+Source, -Stream)[multifile]
- Open the PceEmacs as a Prolog stream.
Re-exported predicates
The following predicates are re-exported from other modules
- xref_source(+Source) is det
- xref_source(+Source, +Options) is det
- Generate the cross-reference data for Source if not already
done and the source is not modified. Checking for modifications
is only done for files. Options processed:
- silent(+Boolean)
- If
true
(defaultfalse
), emit warning messages. - module(+Module)
- Define the initial context module to work in.
- register_called(+Which)
- Determines which calls are registerd. Which is one of
all
,non_iso
ornon_built_in
. - comments(+CommentHandling)
- How to handle comments. If
store
, comments are stored into the database as if the file was compiled. Ifcollect
, comments are entered to the xref database and made available through xref_mode/2 and xref_comment/4. Ifignore
, comments are simply ignored. Default is tocollect
comments. - process_include(+Boolean)
- Process the content of included files (default is
true
).
- xref_called(?Source, ?Called, ?By) is nondet
- xref_called(?Source, ?Called, ?By, ?Cond) is nondet
- Enumerate the predicate-call relations. Predicate called by directives have a By '<directive>'.
- xref_source(+Source) is det
- xref_source(+Source, +Options) is det
- Generate the cross-reference data for Source if not already
done and the source is not modified. Checking for modifications
is only done for files. Options processed:
- silent(+Boolean)
- If
true
(defaultfalse
), emit warning messages. - module(+Module)
- Define the initial context module to work in.
- register_called(+Which)
- Determines which calls are registerd. Which is one of
all
,non_iso
ornon_built_in
. - comments(+CommentHandling)
- How to handle comments. If
store
, comments are stored into the database as if the file was compiled. Ifcollect
, comments are entered to the xref database and made available through xref_mode/2 and xref_comment/4. Ifignore
, comments are simply ignored. Default is tocollect
comments. - process_include(+Boolean)
- Process the content of included files (default is
true
).
- xref_source_file(+Spec, -File, +Src) is semidet
- xref_source_file(+Spec, -File, +Src, +Options) is semidet
- Find named source file from Spec, relative to Src.
- xref_meta(+Head, -Called) is semidet
- xref_meta_src(+Head, -Called, +Src) is semidet
- True when Called is a list of terms called from Head. Each element in Called can be of the form Term+Int, which means that Term must be extended with Int additional arguments. The variant xref_meta/3 first queries the local context.
- xref_public_list(+File, -Path, -Export, +Src) is semidet
- xref_public_list(+File, -Path, -Module, -Export, -Meta, +Src) is semidet
- xref_public_list(+File, -Path, -Module, -Export, -Public, -Meta, +Src) is semidet
- Find meta-information about File. This predicate reads all terms
upto the first term that is not a directive. It uses the module
and meta_predicate directives to assemble the information
described below.
These predicates fail if File is not a module-file.
- xref_hook(?Callable)
- Definition of known hooks. Hooks that can be called in any module are unqualified. Other hooks are qualified with the module where they are called.
- xref_current_source(?Source)
- Check what sources have been analysed.
- xref_source_file(+Spec, -File, +Src) is semidet
- xref_source_file(+Spec, -File, +Src, +Options) is semidet
- Find named source file from Spec, relative to Src.
- xref_done(+Source, -Time) is det
- Cross-reference executed at Time
- xref_clean(+Source) is det
- Reset the database for the given source.
- xref_op(?Source, Op) is nondet
- Give the operators active inside the module. This is intended to setup the environment for incremental parsing of a term from the source-file.
- xref_module(?Source, ?Module) is nondet
- True if Module is defined in Source.
- xref_exported(?Source, ?Head) is nondet
- True when Source exports Head.
- xref_defined(?Source, +Goal, ?How) is nondet
- Test if Goal is accessible in Source. If this is the case, How
specifies the reason why the predicate is accessible. Note that
this predicate does not deal with built-in or global predicates,
just locally defined and imported ones. How is one of of the
terms below. Location is one of Line (an integer) or File:Line
if the definition comes from an included (using :-
include(File)
) directive.dynamic(Location)
thread_local(Location)
multifile(Location)
public(Location)
local(Location)
foreign(Location)
constraint(Location)
imported(From)
- xref_definition_line(+How, -Line)
- If the 3th argument of xref_defined contains line info, return this in Line.
Undocumented predicates
The following predicates are exported, but not or incorrectly documented.