the prolog language by piyabut thavilthicakul 49540552

13
The Prolog Language by Piyabut Thavilthicakul 49540552

Upload: grant-hardy

Post on 18-Jan-2018

219 views

Category:

Documents


0 download

DESCRIPTION

What were goals and purpose of Prolog? Prolog designed to be a logic programming language that use declarative semantics.

TRANSCRIPT

Page 1: The Prolog Language by Piyabut Thavilthicakul 49540552

The Prolog Language

by Piyabut Thavilthicakul 49540552

Page 2: The Prolog Language by Piyabut Thavilthicakul 49540552

When the language first designed?

Prolog first designed in very early 1970s.The first Prolog interpreter was developed

in 1972.

Page 3: The Prolog Language by Piyabut Thavilthicakul 49540552

What were goals and purpose of Prolog?

Prolog designed to be a logic programming language that use declarative semantics.

Page 4: The Prolog Language by Piyabut Thavilthicakul 49540552

What kind of problem domain was Prolog intended for?

Prolog intended for use in Artificial Intelligence domains.For example :

Natural Language Processing Intelligent database

Page 5: The Prolog Language by Piyabut Thavilthicakul 49540552

Who were the envisioned users?

Software EngineersMathematiciansComputer ScientistsLinguisticsOthers that using logic

Page 6: The Prolog Language by Piyabut Thavilthicakul 49540552

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.

Page 7: The Prolog Language by Piyabut Thavilthicakul 49540552

Who designed the Prolog language?

Prolog designed by Alian Colmerauer and Phillippe Roussel with some assistance from Robert Kowalski.

Page 8: The Prolog Language by Piyabut Thavilthicakul 49540552

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 support concurrency.

Page 9: The Prolog Language by Piyabut Thavilthicakul 49540552

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

education. GNU Prolog is free Prolog compiler supports many operating

system.

Page 10: The Prolog Language by Piyabut Thavilthicakul 49540552

How to perform some numerical computation in Prolog?

To * :F is 3*10.

// returnF = 30

To + :F is 3+10.// returnF = 13

Page 11: The Prolog Language by Piyabut Thavilthicakul 49540552

How to input and output different kinds of data, such as integers, floating pt and String?

To input an integer:read(X).

|: 10. X=10 // result

To input a floating pt:read(X).

|: 4.000.X=4.0 // result

To input a string:read(X).|:’Hello, A Where are

u?’. // result

X=‘Hello, A Where are u?’

Page 12: The Prolog Language by Piyabut Thavilthicakul 49540552

How to write and invoke a function or procedure?

// factorial function

factorial(0,1).

factorial(N,F) :- N>0, N1 is N-1, factorial(N1,F1), F is N * F1.

// using a factorial function to find what is factorial of 3.

?- factorial(3,W). // return

W=6