Compiler Construction 2001/02 ----------------------------- Errata in printed notes. [Thanks to Daniel Kefford for spotting various of these.] p7 bottom of the page: 'javap -c foo.java' should be 'javap -c foo'. p10 figure at bottom of page: the arc labelled 'P' coming from the bottom of box 1 should be labelled 'd'. p16, bottom of the page: "RdT() might correspond to RdE(0), RdT() to RdE(1)" should be "RdT() might correspond to RdE(0), RdF() to RdE(1)". ^ p19, bottom of the page. In the list of the possible pairs, the 3rd pair "E' +" should be "E +" . p20, finding functions f() and g(): replacement text: For this grammar it is possible to find two functions \verb|f| and \verb|g| with the property that, if the symbol pair $(A,B)$ does not have a `{\tt -}' in the table then: \begin{eqnarray*} A \EQprec B &\Longleftrightarrow& f(A) = g(B) \\ A \LTprec~ B &\Longleftrightarrow& f(A) < g(B) \\ A ~\GTprec B &\Longleftrightarrow& f(A) > g(B) \end{eqnarray*} Define such functions for this grammar and show that it is not possible in general. (This trick is useful in that it reduces the storage required for each entry from two bits to one bit.) p22, state 8: the production listed as "P -> P ** T ." should be "T --> P ** T ." p30, line 3: "tempSP = FP - $(n_p+n_v)$; FP = FP[-2]; PC = FP[-1];" is wrong. It should be: "tempSP = FP - $(n_p+n_v)$; PC = FP[1]; FP = FP[0];" p33, the example on the second line: " | typeof (Float (f) ) = F_float" should be " | typeof (Float (f) ) = T_float" ^ p37, figure 6. In all these figures the symbol "Rp" should be read as "R_{FP}\$, i.e. the register containing FP, the frame pointer. p37, figure 6 (left) the "Ri" at the bottom should say "Ki". Notes part 2: p5, "Environments section" just above the indented section on bound variables it says "Given an expression we can formally define its bound variables BV(e) and its free variables BV(e)" The last BV should be FV. p6, tree at the top: The tree doesn't correspond to the expression (fn a. a+3/a)(2+3/7) as stated, but instead corresponds to the tree for (fn a. 3/a)(2+3/7). Please let me know of any further errors you find. Alan Mycroft, Feb 2002, updated April 2002.