- hidden_module(M)
- empty_module(?Module)
- Generate or test empty modules (which contain no own
predicate declaration, let alone any clauses).
- module_of_file(?File, ?Module)
- Module is the module defined in File (or 'user'
if the file defines no explicit module or the
defined module is a hidden system module.
- visible_in_module(?Module, ?Name, ?Arity) is nondet
- Suceed if the predicate Name/Arity is visible in Module
either via a local declaration or import.
The used predicate_property(Head,visible)
is documented as:
True when predicate can be called without raising a predicate
existence error. This means that the predicate is (1)
defined, (2) can be inherited from one of the default modules
(see default_module/2) or (3) can be autoloaded. The behaviour
is logically consistent iff the propery visible is provided
explicitly. If the property is left unbound, only defined
predicates are enumerated.
- declared_in_module(?Module, ?Name, ?Arity, ?DeclaringModule) is nondet
- Succeed if the predicate Name/Arity visible in Module is declared in
DeclaringModule. Module = DeclaringModule holds if Module contains
a local (non-imported) declaration. Otherwise, DeclaringModule is the
module from which the declaration is imported.
Note that predicate suceeds even if there is no defining clause for
Name/Arity in DeclaringModule (definition implies declaration but
not vice versa).
- declared_in_module(?Module, +Head, ?DeclaringModule) is nondet
- Unlike
declared_in_module(Module,Name,Arity,DeclaringModule)
,
functor(Head,Name,Arity)
this call does not generate, it assumes Head is instantiated!
- defined_in_module(?Module, +Head) is nondet
- There is at least one clause for Head that is physically
contained in Module (not just visible by import).
The
clause(es)
in the module can come from different files
(because of multifile predicates).
- defined_in_module(?Module, ?Name, ?Arity) is nondet
- There is at least one clause for Name/Arity that is physically
contained in Module (not just visible by import).
The
clause(es)
in the module can come from different files
(because of multifile predicates).
- defined_in_module(?ReferencedModule, ?Name, ?Arity, ?DefiningModule) is nondet
- The predicate Name/Arity visible in ReferencedModule is defined in
DefiningModule. That is, there is at least one clause for Name/Arity
that is physically contained in DefiningModule (not just visible by import).
The
clause(es)
in DefiningModule can come from different files
(because of multifile predicates).
- referenced_but_undeclared(?Module, ?Name, ?Arity) is nondet
- Succeed if the predicate Name/Arity is called in Module but is not
visible there.
- defined_in_file(-Module, -Name, -Arity, -N, ?File, ?Line) is nondet
- defined_in_file(+Module,+Name,+Arity,+N,?File,?Line) is det
Get the source locations (File and Line) of all clauses
that define Module:Name/Arity.
- declared_in_file(?Module, Head, ?File, ?Line) is nondet
- File is the file containing the declaration for the predicate Head,
which is visible in Module.
Line = 1 (approximating the line number information missing for declarations).
Undocumented predicates
The following predicates are exported, but not or incorrectly documented.
- declared_in_module(Arg1, Arg2)
- declared_but_undefined(Arg1, Arg2, Arg3)
- defined_in_files(Arg1, Arg2, Arg3, Arg4)
- defined_in_file(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7)