Skip to navigation | Skip to main content | Skip to footer
Menu
Menu

COMP30142: Compilers (2007-2008)

This is an archived syllabus from 2007-2008

Compilers
Level: 3
Credit rating: 10
Pre-requisites: COMP10020 or equivalent (e.g. CS1021 COMP10021 or MATH10111 or MATH10131 or MATH10212 or MATH10232 or MATH10662 or MATH10672)
Co-requisites: No Co-requisites
Duration: 11 weeks
Lectures: 22
Lecturers: Rizos Sakellariou
Course lecturer: Rizos Sakellariou

Additional staff: view all staff
Timetable
SemesterEventLocationDayTimeGroup
Sem 2 w19-25,29-32 Lecture LF15 Thu 10:00 - 11:00 -
Sem 2 w19-25,29-32 Lecture LF15 Wed 11:00 - 12:00 -
Assessment Breakdown
Exam: 100%
Coursework: 0%
Lab: 0%
Degrees for which this unit is optional
  • Artificial Intelligence BSc (Hons)

Aims

Any program written in a programming language must be translated before it can be executed. This translation is typically accomplished by a software system called compiler. This module aims to introduce students to the principles and techniques used to perform this translation and the issues that arise in the construction of a compiler.

Learning Outcomes

A student successfully completing this module should be able to:

Understand the principles governing all phases of the compilation process. (A,B)
Understand the role of each of the basic components of a standard compiler. (A)
Have awareness of the problems of and methods and techniques applied to each phase of the compilation process. (A)
Apply standard techniques to solve basic problems that arise in compiler construction. (A,B)
Understand how the compiler can take advantage of particular processor characteristics to generate good code. (A,B)

Assessment of Learning outcomes

All learning outcomes are assessed by a 2-hour written examination.

Contribution to Programme Learning Outcomes

A2, A3, B1, B3 mainly. A5, C5, D6 to some extent.

Syllabus

Introduction


What is a compiler? A high-level view of compilation. General structure of a compiler. An overview of compilation technology.

Lexical Analysis (Scanning)


Regular languages/expressions, finite state machines, building regular expressions from a finite automaton.

Syntax Analysis (Parsing)


Expressing Syntax, Context Free Grammars, Top-Down Parsing, Bottom-Up parsing.

Semantic Analysis


Context-sensitive analysis, Attribute Grammars, Symbol Tables, Type Checking.

Intermediate Representations


Properties, taxonomy, Graphical IRs, Linear IRs.

Storage Management


The Procedure Abstraction, Linkage convention, Run-time storage organisation.

Code Generation


Code Shape, Instruction Selection, Register Allocation, Instruction Scheduling.

Topics in Compiler Construction


Code Optimisation.

Exercises

Reading List

Core Text
Title: Engineering A Compiler
Author: Torczon, Linda, Cooper, Keith
ISBN: 012088478X
Publisher: Elsevier Science & Technology
Edition: 2nd Revised
Year: 2007


Core Text
Title: Compilers: principles, techniques and tools (2nd edition)
Author: Aho, Alfred V. et al
ISBN: 0321491696
Publisher: Addison-Wesley
Edition: 2nd
Year: 2007


Core Text
Title: Compilers: principles, techniques and tools (2nd edition)
Author: Aho, Alfred V. et al
ISBN: 0321491696
Publisher: Addison-Wesley
Edition: 2nd
Year: 2007


Supplementary Text
Title: Modern Compiler Design
Author: Dick Grune, Henri E. Bal, C.J.H. Jacobs, Koen G. Langendoen
ISBN: 0471976970
Publisher: John Wiley and Sons Ltd
Edition:
Year: 2000
The following are two more recent books on CCS and CSP respectively.