Programming Language Implementation - CO658

Location Term Level Credits (ECTS) Current Convenor 2019-20
Canterbury Spring
View Timetable
6 15 (7.5) DR S Owens


COMP5450 Functional and concurrent programming
COMP5270 Operating systems and architecture
COMP5180 Algorithms, correctness, and efficiency





A study of techniques for interpreting and compiling programming languages, implementing them in a typed functional programming language (e.g., OCaml, Haskell). The module will outline a whole compiler from source to machine code, but will focus in depth on key algorithms and techniques. Possible in-depth topics include:

• writing interpreters,
• Hindley-Milner type inference,
• register allocation,
• garbage collection,
• abstract interpretation,
• static single assignment form.

The implemented language will be based on a simple imperative (e.g., Pascal-like) language with some extensions to address advanced topics in data layout (e.g., closures, objects, pattern matching). The course will be organized around a simple, but complete, example compiler that the student will have to understand and modify.


This module appears in:

Contact hours

Total contact hours: 35 hours
Private study hours: 115 hours
Total study hours: 150 hours

Method of assessment

1 introductory assessment taking approx.. 5 hours (5%)
1 programming assessment taking approx. 25 hours (25%
1 programming assessment taking approx. 25 hours (30%)
2 hour unseen written exam (40%)

Indicative reading

Indicative list, current at time of publication. Reading lists will be published annually

Aho, A., Lam, M., Sethi, R., and Ullman, J. (2007). Compilers: Principles, Techniques, and Tools 2nd ed., Prentice Hall.
Appel, A.W. (2004) Modern compiler implementation in ML, Cambridge University Press
Cooper, K., and Torczan, L. (2011). Engineering a compiler, Morgan Kaufmann.
Minsky, Y., Madhavapeddy, A., and Hickey, J (2013). Real world OCaml, O'Reilly Media.

See the library reading list for this module (Canterbury)

Learning outcomes

On successfully completing the module students will be able to:

Understand how a computer program in a high-level, imperative language is translated into machine code;
Understand how a program is executed, including run-time system support;
Understand a variety of techniques that a compiler uses to improve the efficiency of its generated code;
Understand how to represent programs as data in a typed functional language
Implement basic compiler optimisation techniques;
Evaluate a program's performance; and
Work with and modify an existing code base.

University of Kent makes every effort to ensure that module information is accurate for the relevant academic session and to provide educational services as described. However, courses, services and other matters may be subject to change. Please read our full disclaimer.