PublicShow sourcepce_prolog_xref.pl

Source 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.
Source prolog:xref_source_directory(+Source, -Dir)[multifile]
Find the directory of a PceEmacs buffer to resolve relative paths.
Source prolog:xref_open_source(+Source, -Stream)[multifile]
Open the PceEmacs as a Prolog stream.

Re-exported predicates

The following predicates are exported from this file while their implementation is defined in imported modules or non-module files loaded by this module.

Source xref_source(+Source) is det
Source 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 (default false), 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 or non_built_in.
comments(+CommentHandling)
How to handle comments. If store, comments are stored into the database as if the file was compiled. If collect, comments are entered to the xref database and made available through xref_mode/2 and xref_comment/4. If ignore, comments are simply ignored. Default is to collect comments.
process_include(+Boolean)
Process the content of included files (default is true).
Arguments:
Source- File specification or XPCE buffer
Source xref_called(?Source, ?Called, ?By) is nondet
Source xref_called(?Source, ?Called, ?By, ?Cond) is nondet
Source xref_called(?Source, ?Called, ?By, ?Cond, ?Line) is nondet
True when By is called from Called in Source. Note that xref_called/3 and xref_called/4 use distinct/2 to return only distinct Called-By pairs. The xref_called/5 version may return duplicate Called-By if Called is called from multiple clauses in By, but at most one call per clause.
Arguments:
By- is a head term or one of the reserved terms '<directive>'(Line) or '<public>'(Line), indicating the call is from an (often initialization/1) directive or there is a public/1 directive that claims the predicate is called from in some untractable way.
Cond- is the (accumulated) condition as defined by :- if(Cond) under which the calling code is compiled.
Line- is the start line of the calling clause.
Source xref_source(+Source) is det
Source 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 (default false), 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 or non_built_in.
comments(+CommentHandling)
How to handle comments. If store, comments are stored into the database as if the file was compiled. If collect, comments are entered to the xref database and made available through xref_mode/2 and xref_comment/4. If ignore, comments are simply ignored. Default is to collect comments.
process_include(+Boolean)
Process the content of included files (default is true).
Arguments:
Source- File specification or XPCE buffer
Source 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.
Source xref_source_file(+Spec, -File, +Src) is semidet
Source xref_source_file(+Spec, -File, +Src, +Options) is semidet
Find named source file from Spec, relative to Src.
Source xref_meta(+Head, -Called) is semidet
Source 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.
deprecated
- New code should use xref_meta/3.
To be done
- Split predifined in several categories. E.g., the ISO predicates cannot be redefined.
- Rely on the meta_predicate property for many predicates.
Source xref_public_list(+File, -Path, -Export, +Src) is semidet
Source xref_public_list(+File, -Path, -Module, -Export, -Meta, +Src) is semidet
Source 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.

Arguments:
Path- is the canonical path to File
Module- is the module defined in Path
Export- is a list of predicate indicators.
Meta- is a list of heads as they appear in meta_predicate/1 declarations.
Src- is the place from which File is referenced.
deprecated
- New code should use xref_public_list/3, which unifies all variations using an option list.
Source xref_source_file(+Spec, -File, +Src) is semidet
Source xref_source_file(+Spec, -File, +Src, +Options) is semidet
Find named source file from Spec, relative to Src.
Source xref_clean(+Source) is det
Reset the database for the given source.
Source xref_current_source(?Source)
Check what sources have been analysed.
Source xref_done(+Source, -Time) is det
Cross-reference executed at Time
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.
Arguments:
Op- Term of the form op(Priority, Type, Name)
Source xref_module(?Source, ?Module) is nondet
True if Module is defined in Source.
Source xref_exported(?Source, ?Head) is nondet
True when Source exports Head.
Source xref_definition_line(+How, -Line)
If the 3th argument of xref_defined contains line info, return this in Line.
Source 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.

Undocumented predicates

The following predicates are exported, but not or incorrectly documented.

Source xref_defined_class(Arg1, Arg2, Arg3)
Source xref_used_class(Arg1, Arg2)
Source xref_built_in(Arg1)