Welcome to the Dictionary of Programming Languages, a compendium
of computer coding methods assembled to provide information and
aid your appreciation for computer science history.
Browse the dictionary by clicking on a section:
Get a full dump of the dictionary:
List of Names
- Language type:
L - Rule-based or logical
PROLOG is a language for PROgramming in
LOGic. Prolog was a progenitor of the
study of 'logic programming,' a computer
science area concerned with languages
and systems for logical inference,
proof techniques, and very high-level
A Prolog program consists of a set
of facts, and a set of rules that
specify how to satisfy goals related
to those facts. Prolog supports a
small but rich variety of data
types: numbers, strings, symbols, lists,
and composite objects (analogous to records).
You never really execute a Prolog program
directly, in the sense that you might run
a C program; instead, you ask the
Prolog system questions. By attempting
to answer the questions, the Prolog system
examines facts, invokes rules, and
may manipulate data or perform computations.
The programmer does not directly control
the execution sequence of the Prolog system
as it seeks to satisfy a goal, although he
can exert some influence.
In this sense, Prolog must be considered
a declarative language and not
a procedural one.
Prolog was among the first computer programming
systems to employ
the logical formalism of unification.
It also utilizes recursive goal seeking with
backtracking, a common AI technique.
Unfortunately, unification and backtracking
can be computationally expensive, and early Prolog implementations
were very slow. Newer implementation
techniques, as well as language features
that let the programmer guide the search
to some extent, have given modern Prolog much
Prolog is usually interpreted.
Free and commercial implementations of
Prolog are available, for all major
platforms and many specialized ones.
Prolog is also undergoing ISO/EIC
standardization, the draft standard
is available for downloading
D.H. Warren 1977, R. Kowalski 1979,
Clocksin and Mellish 1980-84
- See Also:
A Prolog program can accomplish
amazing things with a very short amount
of code. The logic paradigm is a very
powerful one for certain problem domains,
but unsuitable for some others.
Prolog gained recognition and popularity
publishing of Programming in Prolog
by Clocksin and Mellish.
Prolog and logic programming in general
have been proposed as the basis for 5th
generation computing: a vision of
massively parallel computers providing
true AI. A great deal of research into
parallel resolution and logic databases
was performed in the US, Europe, and
especially in Japan under their huge
5th Generation project. Logic programming
research continues, but grandiose visions
of logic as a panacae were given up in
A wide variety of research
and pragmatic extensions to Prolog
have been created: GUI kits,
database access mechanisms, image
processing kits, calling interfaces
to C and Lisp, object-oriented programming
methods, and expert-system shells.
- Sample code:
% Quicksort in Prolog, by Keesey adapted from Bratko
gtq(X,Y) :- X @> Y.
quicksort( , ).
quicksort( [X | Tail], Sorted) :-
split( X, Tail, Small, Big),
quicksort( Small, SortedSmall),
quicksort( Big, SortedBig),
conc( SortedSmall, [X | SortedBig], Sorted).
split( _, , , ).
split( X,[Y | Tail], [Y | Small], Big) :-
gtq( X, Y),!,
split( X, Tail, Small, Big).
split( X, [Y | Tail], Small, [Y | Big] ) :-
split( X, Tail, Small, Big).
conc( [X | L1], L2, [X | L3]) :-
conc( L1, L2, L3).
Descriptions in this dictionary are ©1997-99 Neal Ziring. Some
examples copyright of their respective authors. Some
technologies and languages are trademarked. Permission to
copy descriptions is granted as long as authorship credit is preserved.
Comments on this dictionary, corrections and suggestions, are all welcome.
Please use email, the address is firstname.lastname@example.org
[Ziring MicroWeb Home]
Dictionary and script maintained by Neal Ziring, last major modifications 3/18/98. Most recent
additions to dictionary and master list, 1/00.