Computing

Compilers and Computer Architecture

Module code: G5035
Level 5
15 credits in autumn semester
Teaching method: Class, Lecture
Assessment modes: Computer based exam, Coursework

This module will discuss the key ideas in implementation of compilers for modern programming languages like Java, including

  • lexical analysis
  • parsing
  • semantic analysis based on types and type checking
  • syntax-directed translation using abstract syntax trees
  • intermediate languages
  • code generation.

We will also discuss run-time issues such as garbage collection.

We will look at key ideas in processor architecture such as:

  • stack machines and register machines
  • RISC vs CISC processors
  • processor caching.

Module learning outcomes

  • Explain the structure of a conventional compiler, showing the interfaces between the phases.
  • Use formal syntactic specifications for common high-level language constructs in the construction of the analysis phase of a compiler.
  • Implement modules of a complete compiler for a simple source language and a simple target architecture.
  • Explain the key characteristics of the instruction set of a simple modern processor and illustrate how it can be used in compiler-generated code.