Known misprints in Basics of Compiler Design
There have been many editions of the book, and all have had
misprints, though these have become fewer and fewer over time. Below
are the known misprints from the latest editions. Minor spelling and
grammatical mistakes are not shown, but that shouldn't keep you from
reporting such if you find them.
Misprints in the 2010 edition
- Page 22, Figure 2.8: State 2 should be marked as accepting (by a
double circle).
- Page 22, line 12: Replace "if a DFA" by "of a DFA".
- Page 78, line 1: Replace "there are is empty production" by "there
are no empty productions".
- Page 84, line 2 from bottom: Replace "grammars can generate" by
"grammars that generate".
- Page 199: It is stated that graph colouring is NP-complete, but
this is true only of the decision problem ("Can I do it with N
colours?"), whereas the problem of assigning colours ("Do it with N
colours!") is only proven NP-hard (so it is potentially more
complex).
- Page 235: Change the kill set of the CALL instruction
to assg(x) ∪ loads.
- Page 274, line 15: Change "1 - - g will be empty" to "1
to g will all be empty"
Misprints in the 2009 edition
- Page 98, line 12 from bottom: Replace "figure refexpressiontree2"
by "figure 3.12".
- Page 195: It is stated that graph colouring is NP-complete, but
this is true only of the decision problem ("Can I do it with N
colours?"), whereas the problem of assigning colours ("Do it with N
colours!") is only proven NP-hard (so it is potentially more
complex).
- Page 202, lines 8 to 6 from bottom: Replace this Danish sentence
by its English translation "We will now attempt to combine the
prologue and epilogue with a function body of the above form in order
to reduce the number of callee-saves registers saved.".
- Page 231, figure 11.1: Add "where x ≠ y" to the case for
x := M[y], add a case for x := M[x] with
empty gen and change the kill set for the CALL instruction
to assg(x) ∪ loads.
- Page 233: kill[i] for i=12 in figure 11.3 should be
1,5,9,12.
- Page 234: Swap the columns in[i] and out[i] in all
iterations.
- Page 240, figure 11.7: Replace t = i*4 by t = a+i*4.
- Page 244 and 245: Replace
for (j=0; j<1000; i++)
by for (j=0; j<1000; j++)
.
- Page 249: Replace "Exercise 10.4" with "Exercise 11.4".
Misprints in the 2008 edition
- Page 86, mid-page: Replace "in section 3.12.1"
by "below".
- Page 87, line 3 from bottom: Replace
"seeleft-recursion-elimination" by "see".
- Page 101, line 15 from bottom: Replace "figure refexpressiontree2"
by "figure 3.12".
- Page 122, figure 5.2, entry about =: Replace
"t1" by "v1" and
"t2" by "v2".
- Page 186 (approx.): It is stated that graph colouring is NP-complete, but
this is true only of the decision problem ("Can I do it with N
colours?"), whereas the problem of assigning colours ("Do it with N
colours!") is only proven NP-hard (so it is potentially more
complex).
- Page 194, exercise 8.4: Peplace "(such as multiplication and
division) ... in address registers" by "(such as multiplication and
division) ... in data registers".
- Page 220, lines 8 to 6 from bottom: Replace this Danish sentence
by its English translation "We will now attempt to combine the
prologue and epilogue with a function body of the above form in order
to reduce the number of callee-saves registers saved.".
- Page 225, figure 10.1: Add "where x ≠ y" to the case for
x := M[y] and add a case for x := M[x] with
empty gen.
- Page 227: kill[i] for i=1 and i=12 in figure 10.3 should be
1,5,9,12.
- Page 229: Swap the columns in[i] and out[i] in all
iterations.
- Page 233: Swap the descriptions of upper(Q,x)
and lower(Q,x).
- Page 234, figure 10.7: Replace t = i*4 by t = a+i*4.
- Page 234, lines 2, 3 and 6 from bottom: Replace "i>9" by "9<i", "i≥0" by "0≤i" and "i>10" by "10<i", so all inequalities use < or ≤.
If you should find any more misprints or other errors, please report these to me.