6 EC
Semester 2, period 4
5062COMP6Y
As implementations of programming languages, compilers are integral parts of any computing system software stack. More generally, transforming structured text from one format to another is ubiquitous in all areas of computer science. This course covers all aspects of classical compiler design and implementation: lexical and syntactical analysis, context/type checking and inference, high-level code transformations/optimisations and target code generation. In additional guest lectures, industrial aspects of compiler construction are covered as well as some recent academic advances in the area.
A model programming language named CiviC serves as a case study throughout the course. The case study language exposes common imperative programming features, as found in languages such as C, Pascal or Java. The theory taught in the course is brought to practice in a compiler construction project. The goal of the project is to develop a fully-fledged compiler for the CiviC language targeting a stack-based virtual machine very similar to the Java Virtual Machine. The project is organised as a medium-scale software engineering project with milestones.
The course does not follow any specific text book. The following list summarises a number of interesting books on various aspects of the course. While books are always a helpful source of background information, I do not expect participants of the course to buy any or all of these, nor do I receive revenues from any of these books.
Activiteit | Aantal uur |
Hoorcollege | 28 |
Laptopcollege | 32 |
Zelfstudie | 108 |
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!
As academic software, the compiler construction framework we use throughout the practical part of the course is not very well documented. We provide a live introduction during week 1. Attendance during these lectures and labs is essential for successfully passing the course. The framework has been developed by previous attendees of the course and can be taken as a source of inspiration for your own graduation project!
| Item and weight | Details |
|
Final grade | |
|
30% Weekly Assignments | Must be ≥ 5, Mandatory |
|
1 (17%) Assignment 1 | |
|
1 (17%) Assignment 2 | |
|
1 (17%) Assignment 3 | |
|
1 (17%) Assignment 4 | |
|
1 (17%) Assignment 5 | |
|
1 (17%) Assignment 6 | |
|
Assignment AST | Must be ≥ pass |
|
60% CiviC Compiler Code | Must be ≥ 5, Mandatory |
|
10% CiviC Compiler Report | Must be ≥ 5, Mandatory |
The manner of inspection will be communicated via the digitial learning environment.
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 Report is given by Martin Bor or Thomas van Binsbergen on request by individual appointment.
Elementary CiviC Programming and Familiarization with Compiler Framework
Lexicographic Analysis
Syntactic Analysis
Semantic Analysis
Code Transformation and Optimization
Code Generation
Code base of your CiviC compiler
Report describing the design and special features of your CiviC compiler
CiviC AST Specification
The Weekly Assignment 1 must be submitted individually. All other Weekly Assignments, the CiviC Compiler Project and the CiviC Compiler Report 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%. A minimum of 5 is required for the weekly assignments (average) and for the compiler project and report together.
Over het algemeen geldt dat elke uitwerking die je inlevert ter verkrijging van een beoordeling voor een vak je eigen werk moet zijn, tenzij samenwerken expliciet door de docent is toegestaan. Het inzien of kopiëren van andermans werk (zelfs als je dat hebt gevonden bij de printer, in een openstaande directory of op een onbeheerde computer) of materiaal overnemen uit een boek, tijdschrift, website, code repository of een andere bron - ook al is het gedeeltelijk - en inleveren alsof het je eigen werk is, is plagiaat.
We juichen toe dat je het cursusmateriaal en de opdrachten met medestudenten bespreekt om het beter te begrijpen. Je mag bronnen op het web raadplegen om meer te weten te komen over het onderwerp en om technische problemen op te lossen, maar niet voor regelrechte antwoorden op opgaven. Als in een uitwerking gebruik is gemaakt van externe bronnen zonder dat een bronvermelding is vermeld (bijvoorbeeld in de rapportage of in commentaar in de code), dan kan dat worden beschouwd als plagiaat.
Deze regels zijn er om alle studenten een eerlijke en optimale leeromgeving aan te kunnen bieden. De verleiding kan groot zijn om te plagiëren als de deadline voor een opdracht nadert, maar doe het niet.
Elke vorm van plagiaat wordt bestraft. Als een student ernstige fraude heeft gepleegd, kan dat leiden tot het uitschrijven uit de Universiteit.
Zie voor meer informatie over het fraude- en plagiaatreglement van de Universiteit van Amsterdam: www.student.uva.nl
| 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 Optimization | |
| 6 | Code Generation | |
| 7 | Guest lectures | |
| 8 | Labs and work on CiviC Compiler Project |