RHODES UNIVERSITY


June Examinations - 2002


Computer Science 301 - Programming Language Translation

Examiners:                              Time: 3 hours
   Prof P.D. Terry                      Marks: 180
   Prof E.H. Blake                      Venue: Hamilton Compass Laboratories

A copy of this document is available on the course web page. That copy will contain any last minute alterations, so make sure you study it closer to the time.


Rules and information


Section B - Seen question [90 / 180]

The question will be revealed in its entirety at 08h00 on the day (provisionally Sunday 9 June) before the examination. No details will be given until then, but it is safe to assume that it will be a question that you could answer in a laboratory situation, similar in complexity and content to exercises you have done this year.

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. These problems were all designed so that everyone should have been able to do at least the basic solutions, 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 try out your ideas, and if you feel bold, then reproduce a complete working solution with all misteaks eliminated during the examination.


Examinable material

Please take note of the following summary of those sections of the textbook that are examinable:

   Chapter 1   -  All
   Chapter 2   -  All
   Chapter 3   -  All
   Chapter 4   -  All except 4.3
   Chapter 5   -  All except 5.10 and 5.11
   Chapter 6   -  Not examinable
   Chapter 7   -  Not examinable
   Chapter 8   -  All
   Chapter 9   -  All
   Chapter 10  -  All except 10.6
   Chapter 11  -  All except 11.5
   Chapter 12  -  All, but this chapter will be available as "free information"
   Chapter 13  -  Not examinable (we have done other case studies instead)
   Chapter 14  -  All except 14.8
                  Since we concentrated on Coco/R generated systems, sub-
                  sections 14.2.1, 14.4.1, 14.5.1. 14.6.1 which refer to
                  hand-crafted compilers, are effectively irrelevant.
   Chapter 15  -  All except 15.3
   Chapter 16  -  Examinable to the extent that was needed for the last prac, and
                   but you should understand the broad outlines of using stack frames
                   and allocating memory for multi-function programmes using the other
                   models discussed in lectures.
   Chapter 17  -  Not examinable in detail
   Chapter 18  -  Not examinable


Cessation of Hostilities Party

It has become a long-standing tradition (now going back far longer than any of you have been alive) for the Terrys to host a party for those who manage to survive Professor Pat's Perilous Programming courses. Tentatively we propose to hold this on the evening of Wednesday 12 June, by which stage you will have written both examinations.


Definitions and Terminology

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


Home  © P.D. Terry