| This book teaches the techniques of Logic Programming through the Prolog language. The name stands for Programming in Logic. Prolog has been used for a wide variety of applications, including as the basis for a standard ‘knowledge representation language’ for the Semantic Web – the next generation of internet technology; it is one of the principal languages used by researchers in Artificial Intelligence. Logic Programming with Prolog does not assume that the reader is an experienced programmer with a strong background in Mathematics, Logic or Artificial Intelligence. It starts from scratch and aims to take the reader to a point where they can soon write powerful programs in the language. Suitable both as an introductory textbook and for independent study, the programs in this book are written using the standard ‘ Edinburgh syntax’ and should run unchanged in virtually any version of Prolog. A full glossary of the technical terms used is included and each chapter has self-assessment exercises.
Logic Programming is the name given to a distinctive style of programming, very different from that of conventional programming languages such as C++ and Java. Fans of Logic Programming would say that 'different' means clearer, simpler and generally better!
Although there are other Logic Programming languages, by far the most widely used is Prolog. The name stands for Programming in Logic. This book teaches the techniques of Logic Programming through the Prolog language. Prolog is based on research by computer scientists in Europe in the 1960s and 1970s, notably at the Universities of Marseilles, London and Edinburgh. The first implementation was at the University of Marseilles in the early 1970s. Further development at the University of Edinburgh led to a de facto standard version, now known as Edinburgh Prolog. Prolog has been widely used for developing complex applications, especially in the field of Artificial Intelligence. Although it is a general-purpose language, its main strengths are for symbolic rather than for numerical computation.
The developers of the language were researchers working on automating mathematical theorem proving. This field is often known as computational logic. But if you are not a Computer Scientist, a logician or a mathematician do not let this deter you! This book is aimed at the 99.9% of the population who are none of these. Those who are, already have a number of excellent textbooks from which to choose.
The idea that the methods developed by computational logicians could be used as the basis for a powerful general purpose programming language was revolutionary 30 years ago. Unfortunately most other programming languages have not yet caught up.
The most striking feature of Prolog for the newcomer is how much simpler the programs look than in other languages. Many language designers started out with good intentions but could not resist, or perhaps could not avoid, making their creations over elaborate. In some languages even writing the customary test program to print out the words Hello World! to the user's screen is hard work. All the user has to do in Prolog is to enter write('Hello World!'). |