This new edition of The Art of Prolog contains a number of important changes. Most background sections at the end of each chapter have been updated to take account of important recent research results, the references have been greatly expanded, and more advanced exercises have been added which have been used successfully in teaching the course. Part II, The Prolog Language, has been modified to be compatible with the new Prolog standard, and the chapter on program development has been significantly altered: the predicates defined have been moved to more appropriate chapters, the section on efficiency has been moved to the considerably expanded chapter on cuts and negation, and a new section has been added on stepwise enhancement -- a systematic way of constructing Prolog programs developed by Leon Sterling. All but one of the chapters in Part III, Advanced Prolog Programming Techniques, have been substantially changed, with some major rearrangements. A new chapter on interpreters describes a rule language and interpreter for expert systems, which better illustrates how Prolog should be used to construct expert systems. The chapter on program transformation is completely new and the chapter on logic grammars adds new material for recognizing simple languages, showing how grammars apply to more computer science examples.