Examiners: Time: 3 hours Prof P.D. Terry Marks: 180 Prof S. Berman (UCT) Venue: Hamilton Compass Laboratories
You will receive material relating to Section B at 08h00 on Sunday 11 November, the day before the examination. No details will be given until then, but it is safe to assume that Section B will contain a set of tasks that you could answer in a laboratory situation, similar in complexity and content to exercises you have done this year.
This year the format of the examination is somewhat different from a few years ago, so as to counter what had happened recently where, essentially, one solution was prepared by quite a large group and then passed around to many others, who had probably not contributed to it in any real way. This year you will receive a challenging problem at 08h00 and be encouraged to develop a solution. Later in the day you will receive further hints as to how this problem should be solved (by then you might have worked this out for yourselves, of course). You will be encouraged to study the problem and the solution in detail, because during the examination on Monday you will be set further questions relating to the system - for example, asked to extend the solution in certain ways. It is my hope that if you have really understood the material on Sunday, these questions will have solutions that come readily to mind, but of course you will have to answer these on your own!
You might like to have a look at the old examinations on the Web Pages to see the sort of standard expected - but remember that old exam papers are "context sensitive", as they apply to a particular course at a particular time that covered material in slightly different ways to the course done this year. One obvious example of this is related to the implementation language; the very earliest exam papers date back to the time when we used Modula- 2; some more recent ones relate to the years when the practical work and the textbook were based on C++.
The "24 hour" problems have all been designed so that everyone should have been able to produce at least the basic solution, with scope given for top students to demonstrate their understanding of the subtler points of parsing, scanning and compiling. Each year I have been astounded at the quality of some of the solutions received, and I trust that this year will be no exception.
Please note that there will be no obligation to produce a machine-readable solution in the examination (in fact doing so is quite a risky thing, if things go wrong for you, or if you cannot type quickly). The tools will be provided before the examination so that you can experiment in detail. If you feel confident, then you are free to produce a complete working solution to Section B during the examination. If you feel more confident writing out a neat detailed solution or extensive summary of the important parts of the solution, then that is quite acceptable. Many of the best solutions over the last few years have taken that form.
Please take note of the following summary of those sections of the textbook that are examinable. The complete (published) book has some sections that are not examinable.
Chapter 1 - All Chapter 2 - All except 2.8 Chapter 3 - All Chapter 4 - All except 4.11 and 4.12 Chapter 5 - 5.1 ... 5.9 Chapter 6 - All Chapter 7 - All Chapter 8 - 8.1 ... 8.8. Sections 8.7 and 8.8 need not be known in detail, only the material that was covered in practicals. Chapter 9 - All Chapter 10 - All, but only in the sense that there might be "practical" type questions that would require you to develop or annotate a Cocol grammar, which by now you should be able to do, I hope. Chapter 11 - 11.5 describes the implementation of the Label class used in chapters 13 and 14. Chapter 12 - All Chapter 13 - 13.1 ... 13.5. Chapter 14 - 14.1 ... 14.4 Chapter 15, 16 None
It has become a long-standing tradition (now going back far longer than most of you have been alive) for the Terrys to host a party for those who manage to survive Professor Pat's Perilous Programming courses. We propose to hold this on the evening of Friday 16 November, by which stage you will have written both papers.
There are many terms that you should make sure you understand and can define accurately, such as:
Abstract syntax tree (AST) One and a half address code Alphabet Optimization Ambiguity Orthogonality Analytic phase Overflow Attribute Phrase structure Back end Portability Backpatching Postfix notation Backtracking Pragma BNF Precedence Character handler Produces directly Chomsky hierarchy Productions Closure Program counter Cocol Pseudo-code Code generation Range checks Compile-time Regular expression Constraint analysis Regular grammar Context condition Reverse Polish Cycle-free grammar Run-time Dangling else Scanner Decompiler Scope Decorated tree Self-embedding Defining occurrence Semantic action Dereferencing Semantic attributes Deterministic finite automaton (DFA) Semantic driven parser Dynamic semantics Semantic error detection EBNF Semantic overtones Emulator Semantics Environment Sentence Fetch-execute cycle Sentential form Finite state automata (FSA) Source handling FIRST function and sets Source language FOLLOW function and sets Stack frame Frame file Stack pointer Front end Start symbol Goal symbol State diagram Grammar State variable High-level translator Static semantics Host language Symbol Instruction set Symbol table Intermediate code Syntactic class Interpreter Syntax Keywords Syntax directed translation Kleene closure Systems program Language T-diagram Lexeme Table-driven algorithm Lexical analyser Target language Lexicon Terminal start sets LL(1) conflict resolution Terminal successors LL(1) restrictions Three-address code LL(k) parsing Token Macro assembly Top-down parsing Native code Two-address code Non-terminal Type checking Null production Vocabulary Nullable Weak separator Object language Weak terminal One-address code Zero address instruction