The raison d'etre of this book is to encourage programmers to use Prolog in
their day-to-day work. Personally, I find the language exciting to use, and wish
to share the excitement with others. More pragmatically, I have seen how certain
moderately-sized pieces of software are far easier to write in Prolog than in any
other language with which I am familiar. Further, the code, if written clearly, can
be easily maintained by persons other than the original author.
Why is the encouragement necessary? Why is Prolog not being widely taught and
used in software engineering projects? In fact, reception to Prolog has been mixed,
ranging from excitement in Europe, adoption by consensus in Japan and prejudiced
ambivalence by the mainstream computer science community in the United
States. A major reason for the mixed reception of Prolog has been, in my opinion,
the relative inaccessibility of good educational material showing how the language
should be used. Indeed, five years ago there was only one widely available book
on Prolog, the well-known primer "Programming in Prolog" [?] . Many popular
misconceptions abounded about the significance of Prolog's constructs and programming
techniques, for example the role of cut, which suggested that Prolog was
not a good general language. Popular misconceptions take a long time to subside,
and need new material to challenge the old.
The lack of introductory textbooks for Prolog has been addressed. There has
been an explosion of texts in recent years, including "The Art of Prolog" [?] in this
Logic Programming Series. By and large, however, the current. crop of text.books
address programming in the small. It is st.ill necessary to show how to extend the
small examples in the texts to programming projects.
This book, in contrast, is intended to help Prolog programming in the moderate
to large. It is a collection of programming projects and applications. Each chapter
explains a particular application, and presents a Prolog program written to solve
the application. It stands apart in the level of detail and the sophistication and
quality of the code.