Skip to content

Prolog

Built in predicates

Argument Indicators
++At call time, the argument must be ground, i.e., the argument may not contain any variables that are still unbound.
+At call time, the argument must be instantiated to a term satisfying some (informal) type specification. The argument need not necessarily be ground. For example, the term [_] is a list, although its only member is the anonymous variable, which is always unbound (and thus nonground).
–Argument is an output argument. It may or may not be bound at call-time.
—At call time, the argument must be unbound. This is typically used by predicates that create‘something’ and return a handle to the created object, such as open/3, which creates a stream.
?At call time, the argument must be bound to a partial term (a term which may or may not be ground) satisfying some (informal) type specification.
:Argument is a meta-argument, for example a term that can be called as goal. The predicate is thus a meta-predicate. This flag implies +.
@Argument will not be further instantiated than it is at call-time. Typically used for type tests.
!Argument contains a mutable structure that may be modified using setarg/3 or nb_setarg/3.
Comparison & Unification
Control Predicates
Delimited Conditions
Editing
Exception Handling

Meta Call Predicates
Printing

Source Files
% Loading source files
load_files(:Files)
load_files(:Files, +Options)
consult(:File)
ensure_loaded(:File)
include(+File)
require(+Predicates)
encoding(+Encoding)
make
library_directory(?Atom)
file_search_path(+Alias, -Path)
expand_file_search_path(+Spec, -Path)
prolog_file_type(?Extension, ?Type)
source_file(?File)
source_file(:Pred, ?File)
source_file_property(?File, ?Property)
exists_source(+Source)
exists_source(+Source, -File)
unload_file(+File)
prolog_load_context(?Key, ?Value)
source_location(-File, -Line)
at_halt(:Goal)
cancel_halt(+Reason)
initialization(:Goal)
initialization(:Goal, +When)
initialize
compiling
Verify Term
Signals

DCG Grammar Rules
Database

Predicate Properties