Anyone using or planning to use Prolog should read this book. There are other good choices for a first book, including Clocksin and Mellish [1], the book that started it all, but if you want to go beyond a first contact, this book should be on your list. It is a pleasure to see a second edition of this book.
The book is divided into four main topics: logic programs, the Prolog language, advanced Prolog programming techniques, and applications. Each of these takes up about the same number of pages.
The first section is basic material and could serve at the undergraduate level. It introduces the underlying concepts of logic programming and the basics of Prolog. The second section introduces the nonlogical and extra-logical features of the Prolog language. Here too, the explanations are extensive and the text is fit for the undergraduate level. These first two sections cover the topics one finds in most introductory books on Prolog.
The third section covers nondeterministic programming, incomplete data structures, second-order programming, interpreters, program transformation, logic grammars, and search techniques. It includes all the classical examples and demos. Mastering the contents of this section turns a beginning logic programmer into a Prolog programmer.
The usefulness of a programming language is proven by applications written in it. The following applications are included in the last section: game-playing programs, a credit evaluation expert system, an equation solver, and a compiler.
The book contains 24 chapters and 509 pages, compared to the 427 of the previous edition [2]. As the layout has definitely been improved, this does not allow a direct comparison of the sizes but is only indicative. Section 11.6 and chapter 18 on program transformation are new, while chapter 13 has been significantly revised.
There are sufficient exercises in all the chapters. Each chapter is followed by a background section that puts the preceding discussion in a broader perspective. The explanation of code fragments is verbose.
The book may not be perfect. There may be places where I would pick a different order, or where the naming is unfortunate, even if the authors justify it. But even after many years of Prolog programming, I enjoyed reading it again.