Programming Languages and Compilers

 

SPO EXAM, spring 2003

 

The exam is oral and without preparation. Each student will have a 20-minute session. The student will draw a question and give a short presentation about the subject in the first part of the session, max 10 minutes. In the second part of the session there will be a discussion between the student, lecturer and examiner.

Many subjects are rather broad, so it is your responsibility to select parts of the subject that you consider to be most relevant.

For each question there will be a set of slides available that you can choose to use for your presentation and subsequent discussion – note you do not need to use all the available slides.

Follow the links below for the set of slides associated with each question.

 

Note: You may choose to have your examination in Danish or English – just let us know which language at the beginning of the session.

Syllabus

 

Watt & Brown, chapter 1, 2, 3, 4, 5, 6, 7, 8, 9

 

Pratt and Zelkowitz, chapter 1, 2, 3, 4.1, 5, 6, 7, 8, 9, 10, 11, 12

(Note that sections 4.2 and 4.3, as well as Appendix A, are not part of the syllabus)

 

Articles and web references used during the course are not considered part of the syllabus, but may serve you as background material for further elaboration.

 

Questions

 

  1. Language design issues

1.      Language paradigms

2.      Machine architecture

3.      Data representation

4.      Verbose vs. concise syntax

5.      Syntax vs. types

6.      Semantics

·        Slides

 

  1. Sequence control and Subprogram Control

·        Evaluation of expressions

·        Explicit sequence control vs. structured sequence control

·        Subprogram implementation

·        Parameter mechanisms

 

 

  1. Structure of the compiler

·        Describe the phases of the compiler and give an overall description of what the purpose of each phase is and how the phases interface

 

·        Slides

 

 

  1. Lexical analysis

·        Describe the role of the lexical analysis phase

·        Describe regular expressions and finite automata

 

·        Slides

 

 

  1. Parsing

 

 

 

  1. Semantic Analysis

 

 

 

  1. Run-time organization

 

 

 

  1. Heap allocation and Garbage Collection

 

 

 

  1. Code Generation

 

 

 

  1. Interpretation