Guide to Prolog Programming

© Roman Barták, 1998

Home

Previous | Contents | Next

Introduction

Logic programming and one of its representatives, PROLOG, make a declarative approach to writing computer programs. Logic programs can be understood and studied using two abstract concepts: truth and logical deduction. One can ask whether an axiom in a program is true, under some interpretation of the program symbols, or whether a logical statement is a consequence of the program. These questions can be answered independently of any concrete execution mechanism.

On the contrary, Prolog is a programming language with precise operational meaning that borrows its basic concepts from logic programming. The Prolog programs are instructions for execution on a computer. These instructions can almost always be read as logical statements and, most important, the result of a computation of a Prolog program is a logical consequence of the axioms in it.

Note, that effective Prolog programming requires an understanding of the theory of logic programming.

A bit of history ...

The beginning of logic programming can be attributed to Kowalski and Colmerauer. Kowalski formulated the procedural interpretation of Horn clause logic and showed that the axiom A if B can be read as a procedure of a recursive programming language, where A is the procedure head and B is its body. At the same time, early 1970's, Colmerauer and his group at the University of Marseille-Aix developed a specialized theorem prover, which they used to implement natural processing systems. The theorem prover, they called it PROLOG (for Programation et Logique or Programming in Logic), embodied Kowalski's procedural interpretation.

The first Prolog interpreters was not as fast as Lisp systems but this changed in mid 1970's when David H.D. Warren and his colleagues developed an efficient implementation of Prolog. The compiler, which was almost entirely written in Prolog, translated Prolog clauses into instructions of abstract machine that is now known as Warren Abstract Machine (WAM). However, the Western computer science and artificial intelligence community was still ignorant or, at best, indifferent to logic programming.

This was changed a bit with announcement of the Japanese Fifth Generation Project which clearly stated the important role of logic programming in the next generation of computer systems. Not only researchers but also general public started to spell the world PROLOG. From that time Prolog is developing to new heights. Currently, one of the most promising extensions is Constraint Logic Programming (CLP).

based on The Art of Prolog


Designed and maintained by Roman Barták

Previous | Contents | Next