The Prolog Language
by Piyabut Thavilthicakul
When the language first designed?
Prolog first designed in very early 1970s.
The first Prolog interpreter was developed
What were goals and purpose of Prolog?
Prolog designed to be a logic
programming language that use
What kind of problem domain was
Prolog intended for?
Prolog intended for use in Artificial
For example :
Natural Language Processing
Who were the envisioned users?
Others that using logic
What are some main features or
distinctive features of the Prolog?
Method for specifying predicate calculus
propositions and an implementation of a
restricted from of resolution.
Who designed the Prolog language?
Prolog designed by Alian Colmerauer and
Phillippe Roussel with some assistance
from Robert Kowalski.
How successful was the Prolog?
Fifth Generation Computer Systems
project (FGCS) chose Prolog for develop
the project but later it ran into difficulty
because at that time Prolog did not
How widely of the Prolog used today?
Prolog is not widely used because it designed to use in a few
small areas of application.
There are several Prolog IDE and compiler.
Visual-Prolog is commercial Prolog IDE but it also has
Personal Edition for free.
SWI-Prolog is free Prolog IDE widely use in research and
GNU Prolog is free Prolog compiler supports many operating
How to perform some numerical
computation in Prolog?
To * : To + :
F is 3*10. F is 3+10.
// return // return
F = 30 F = 13
How to input and output different kinds of data,
such as integers, floating pt and String?
To input an integer: To input a string:
|:’Hello, A Where are u?’.
X=10 // result
X=‘Hello, A Where are u?’
To input a floating pt:
X=4.0 // result
How to write and invoke a function
// factorial function // using a factorial function to find
factorial(0,1). what is factorial of 3.
N1 is N-1,
F is N * F1.
Book: Concepts of Programming
Languages by Robert W. Sebesta.