4.9.2 Associating Predicates with their Properties

The following properties are associated with predicates either implicitly or by declaration:

built_in
The predicate is built-in.
compiled
The predicate is in virtual code representation.
interpreted
The predicate is in interpreted representation.
fd_constraint
The predicate is a so-called FD predicate; see Defining Primitive Constraints.
dynamic
The predicate was declared dynamic.
volatile
The predicate was declared volatile.
multifile
The predicate was declared multifile.
block(SkeletalGoal)
The predicate has block declarations.
meta_predicate(SkeletalGoal)
The predicate is a meta-predicate.

The SkeletalGoal will contain : (colon) for meta-arguments and ? for non-meta-arguments, regardless of the specifications used in the original meta-declaration. In particular, if an integer was used, a colon will appear in its place in SkeletalGoal.

exported
The predicate was exported from a module.
imported_from(Module)
The predicate was imported from the module Module.

Every predicate has exactly one of the properties [built_in, compiled, interpreted, fd_constraint], at most one of the properties [exported, imported_from(SkeletalGoal)], zero or more block(SkeletalGoal) properties, and at most one of the remaining properties.

To query these associations, use predicate_property/2. The reference page contains several examples.


Send feedback on this subject.