This section describes the categories of predicates and how they are indicated in the reference pages for predicates of each given category. The names of categories hookable, hook, extendible, declaration, and meta-logical appear to the right of the title of the reference page. The annotation development is used for predicates that are not available in runtime systems.
hookable: The behavior of the predicate can be customized/redefined by defining one or more hooks. The mode and type annotations of a hookable predicate might not be absolute, since hooks added by the user can change the behavior.
hook: The predicate is user defined, and is called by a hookable builtin. A hook must be defined in module user. For a hook, the mode and type annotations should be seen as guide-lines to the user who wants to add his own hook; they describe how the predicate is used by the system.
extendible: A dynamic, multifile predicate, to which new clauses can be added by the user. For such a predicate, the mode and type annotations should be seen as guide-lines to the user who wants to extend the predicate; they describe how the predicate is used by the system.
declaration: You cannot call these directly but they can appear in
files as :-
declaration and give information to the compiler.
The goal template is preceded by
:-
in the Synopsis.
Meta-predicates and operators are recognizable by the implicit conventions described below.
Meta-predicates are predicates that need to assume some module. A list of built-in predicates that do module name expansion is provided in ref-mod-mne. The reference pages of these predicates indicate which arguments are in a module expansion position by marking them as [MOD] in the Arguments field. That is, the argument can be preceded by a module prefix (an atom followed by a colon). For example:
assert(mod:a(1), Ref)If no module prefix is supplied, it will implicitly be set to the calling module. If the module prefix is a variable, an instantiation error will be raised. If it is not an atom a type error will be raised. So in any meta-predicate reference page the following exceptions are implicit:
instantiation_error
type_error
:- initialization
+Goal (A) +Term1@>
+Term2 (B)
It is thus always possible to see if a name is an operator or not. The predicate can, of course, be written using the canonical representation, even when the name is an operator. Thus (A) and (B) can be written as (C) and (D), respectively:
:- initialization
(+Goal) (C)@>
(+Term1, +Term2) (D)