Errata in The Art of Prolog, Sterling & Shapiro, 2nd edition

Comments in the corrections are in between square brackets.

Hans van Ditmarsch

location original correction
page 3, line -13/12 dependence on to one dependence on one
page 16, Definition C is a common instance of A and B if it is an instance of A and an instance of B, in other words, if there are substitutions \theta_1 and \theta_2 such that C = A \theta_1 is syntactically identical to B \theta_2. C is a common instance of A and B if it is an instance of A and an instance of B by the same substitution, in other words, if there is a substitution \theta such that C is syntactically identical to A \theta and B \theta.
page 16, line 19/20 When the substitution {Y=3} is applied to plus(0,3,Y) and the substitution {X=3} is applied to plus(0,X,X) When the substitution {X=3, Y=3} is applied to plus(0,3,Y) and to plus(0,X,X)
page 25, figure 1.3 father(lot,haran) father(haran,lot)
page 25, line 3 consists of nodes and edges that represent consists of nodes and edges. The edges represent
page 28, line 1/2 A is true "A is true"
page 28, line 2 goal A is satisfied "goal A is satisfied"
page 40, line -3 transitive transitive and reflexive
page 34, 2.1.1.(i), line 1 on page 21 on page 31
page 37, line 1 lecturer(david, harel) lecturer_name(david, harel) [in order to avoid overloading of lecturer/2]
page 48, text line 2 all ground facts all ground goals
page 57, line -1 instances member(X,Xs) instances of member(X,Xs)
page 69, line -1 smaller than the smaller than or equal to the
page 70, text line 2 the smaller elements the smaller-or-equal elements
page 70, line -4 smaller than the smaller than or equal to the
page 71, 3.3.1.(ii), line 4 select(X,Ys,Zs). [shift in position four characters to the right]
page 73, line -16 the node the root
page 80, program 3.30 [add to program:] derivative(Y,X,0) :- constant(Y).
page 81, line 6 derivative(U,X,DU). [shift in position four characters to the right]
page 81, line -14/15 D=(3*1+0*x)+0 D=(3*1+x*0)+0
page 88, line 1/2 if there exist substitutions \theta_1 and \theta_2 such that t equals t_1 \theta_1 and t_2 \theta_2. if there exists a substitution \theta such that t equals t_1 \theta and t_2 \theta.
page 89 line -10 [b] = X [b] = Xs
page 98, line 13-15 hanoi(s(s(0)), ... a to b|Ms2],Ms). [write on single line]
page 107, line -16 of the form s^n(X) of the form s^n(0)
page 107, line -15 of the form s^n(0) of the form s^n(X)
page 186, line -3 people. The discussion first people. The first
page 187, line 6 editon of this edition of this
page 207, line 7/8 has the erroneous unique answer X=mc_tavish. has the unique answer X=mc_tavish, which is erroneous, since the answer should be X=mc_tavish, X=mc_donald.
page 237, line 6 more powerful then more powerful than
page 297, line 14 queue(S) calls queue(S,Q) queue(S) calls queue(S,Q\Q)
page 302, line -10 which whether all
page 302, line -8/9 It produces two answers: X=terach and X=abraham. It produces the answer: no.
page 303, line -2 the answer F = [... the answer Fs = [...
page 443, line 18 isolax(1,Term1^Term2 = Rhs,Term1 = Rhs^(-Term2)). isolax(1,Term1^Term2 = Rhs,Term1 = Rhs^(1/Term2)).