G52MAL UNMC 2010/11: Notes on Coursework, Exercises Set 7 ========================================================= Marking Scheme -------------- 100 marks total * 1: 35 - 1a: 15 (3 + 6 + 3 + 3) - 1b: 10 - 1c: 10 * 2: 25 - 2a: 15 - 2b: 10 * 3: 40 - 3a: 30 - 3b: 10 Notes ----- * 1b) Some people drew invalid trees with lots of repeated terminals. Make sure you understand exactly what derivation trees are and how to draw them, and that you understand the differences in the presentation of a derivation sequence (the directly derives relation, =>, and that of a derivation tree. c) Note that mirroring a a derivation tree, if the result is a valid derivation tree at all, usually is not a derivation tree for the same word, but for the reversed word. They are only the same if the word happens to be a palindrome! Thus mirroring trees is usually not a workable approach for demonstrating ambiguity. * 2a) No correct solutions submitted. Those solutions that almost worked were too permissive, e.g. allowing strings like T,,,T to be derived. That violates the specification which calls for separation by a *single* comma. b) Very few correct solutions submitted. Often the problem was that the submitted solutions were too permissive; e.g. they may not have enforced the proper balance of symbols (e.g. by allowing arbitrarily many c's). * 3a: There was no completely correct solution submitted. Thus you are all advised to study the model solution carefully. The most common problems were: - Didn't cover the syntax of integers - Were too permissive, e.g. allowed 1-2-3 to be derived as an integer. - Were still ambiguous (e.g. operator precedences might be implemented correctly, but operator associativity not).