Compiler Construction

6 EC

Semester 2, period 4

5062COMP6Y

Owner Bachelor Informatica
Coordinator dr. C.U. Grelck
Part of Pre-master Software Engineering, year 1Bachelor Informatica, year 3

Course manual 2018/2019

Course content

As implementations of programming languages compilers are integral parts of any computing system software stack. The more general task of compilers to transform structured text from one format to another is ubiquitous in all areas of computer science. Step-by-step the course covers all aspects of modern compiler design and implementation: lexical and syntactical analysis, context/type checking and inference, high-level code transformations/optimisations and target code generation

A model programming language named CiviC that exposes common imperative programming features, as found in languages such as C, Pascal or Java, serves as a case study throughout the course. Organised as a medium-scale software engineering project with milestones, etc, course participants develop a fully-fledged compiler for this language targeting a stack-based virtual machine very similar to the Java Virtual Machine.

Two guest lectures by renowned Amsterdam-based compiler experts touch upon the industrial and commercial aspects of compilers.

Study materials

Literature

  • See Canvas.

Practical training material

  • A CiviC reference compiler, a CiviC assembler and a CiviC virtual machine are provided in binary form for Linux and Mac-OS at the beginning of the course.

Software

  • Compiler construction framework, provided and explained at the beginning of the course.

Other

  • Lecture slides are provided as the course proceeds. Technical documentation on the CiviC language as well as the CiviC-VM virtual machine and CivAS, the CiviC assembler are provided in due course.

Objectives

To develop a profound understanding about the inner workings of compilers and the ability to design and implement compilers for any purpose.

Teaching methods

  • Hoorcollege
  • Werkcollege
  • Laptopcollege
  • Zelfstudie
  • Lecture
  • Computer lab session/practical training
  • Self-study
  • Working independently on e.g. a project or thesis

Twee colleges en twee begeleide practica per week. Tijdens de practica geldt een aanwezigheidsplicht van 80%.

Learning activities

Activiteit

Aantal uur

Hoorcollege

28

Laptopcollege

32

Zelfstudie

108

Attendance

Programme's requirements concerning attendance (OER-B):

  • For practical trainings and tutorials/seminars with assignments attendance is obligatory. When students do not meet the requirements for attendance, this may lead to not finishing a course with a pass mark.

Additional requirements for this course:

Attendance during the lectures and labs is highly recommended, but strictly speaking not enforced by legal or organisational means. This is your responsibility!

Assessment

Item and weight Details

Final grade

5%

Weekly Assignment 1

5%

Weekly Assignment 2

5%

Weekly Assignment 3

5%

Weekly Assignment 4

5%

Weekly Assignment 5

5%

Weekly Assignment 6

60%

CiviC Compiler

10%

CiviC Compiler Report

In order to pass the course a minimum grade of 5.0 is required in each of the three subcomponents:

  • Weekly Assignments on average
  • CiviC Compiler Project
  • CiviC Compiler Project Report

Inspection of assessed work

Contact your supervisor to make an appointment for inspection.

Feedback for the weekly assignments is given during the labs including example solutions. For individual feedback contact the TAs during the labs.

Feedback for the CiviC Compiler Project is given by Simon Polstra on request by individual appointment.

Feedback for the CiviC Compiler Project Report is given by Clemens Grelck on request by individual appointment.

Assignments

Weekly Assignment 1

  • Elementary CiviC Programming and Familiarisation with Compiler Framework

Weekly Assignment 2

  • Lexicographic Analysis

Weekly Assignment 3

  • Syntactic Analysis

Weekly Assignment 4

  • Semantic Analysis

Weekly Assignment 5

  • Code Transformation and Optimisation

Weekly Assignment 6

  • Code Generation

CiviC Compiler Project

CiviC Compiler Project Report

The Weekly Assignment 1 must be submitted individually. All other Weekly Assignments and the CiviC Compiler Project must be worked on in fixed teams of 2 students.

Each Weekly Assignment counts 5% to the overall grade. The CiviC Compiler Implementation counts 60%. And the CiviC Compiler Report counts for the final 10%.

Fraud and plagiarism

The 'Regulations governing fraud and plagiarism for UvA students' applies to this course. This will be monitored carefully. Upon suspicion of fraud or plagiarism the Examinations Board of the programme will be informed. For the 'Regulations governing fraud and plagiarism for UvA students' see: www.student.uva.nl

Course structure

Weeknummer Onderwerpen Studiestof
1

Introduction and Motivation, Compilers at a Glance, Compiler Framework

 
2 Lexicographic Analysis  
3 Syntactic Analysis  
4 Semantic Analysis  
5 Code Transformation and Optimisation  
6 Code Generation  
7 Slack for two guest lectures  
8 Labs and work on CiviC Compiler Project  

Timetable

The schedule for this course is published on DataNose.

Additional information

  • Prerequisites for success: general programming skills, familiarity with imperative programming in the language C, user-level knowledge of UNIX-like operating systems, general knowledge in computer science as provided by the first two years of the Bachelor Informatica.
  • All study material as well as the lectures are provided in English.

Contact information

Coordinator

  • dr. C.U. Grelck

Staff

  • S. Polstra