Course Program 2021/2022 OLD INSTANCE

The course aims to give knowledge about the principal structure of a compiler and about the basic theories and methods used to implement compilers. You will construct a small compiler from text to machine code as part of the assignments.

Course responsible: Prof. Görel Hedin

Formal course plan: https://kurser.lth.se/kursplaner/21_22%20eng/EDAN65.html

Prerequisites

The course assumes:

Formally, the requirement is EDAA01 (Programming, Second course).

Registration

You should formally register in the LADOK system, preferrably before the course starts. (Instructions in Swedish and English.) If you fail to register, the department might register you anyway, if you sign up for the labs. (PhD students don't have to register, Instead, contact Görel Hedin if you want to take the course.)

Literature

We will use the following book by Appel as the main course literature. Note, however, that the course does not cover the whole book, and the book does not cover the whole course. Articles are provided for parts that the book does not cover. Lecture slides, quizzes, exercises, and assignments are also part of the course literature.

Lectures

There are 14 lectures, 2 hours each. The lectures are online using the Zoom system. You find the link to the lectures in the Moodle system. Recording of the lectures is planned, and the recordings will also be available from Moodle.

Moodle

We will use the system Moodle for links to online lectures, quizzes, and student forum

To sign up for Moodle you need to:

In Moodle you find

Exercises

There are exercises for several of the lectures, and some of them include solutions. For those with solutions, try hard at solving them without looking at the solutions first. That way you will learn much more. You do not hand in the exercises, and they do not affect your grade, but they are important to do in order to understand the course content and pass the exam.

Assignments and lab sessions

There are six mandatory assignments. There are weekly 2-hour lab sessions (starting in week 2) where you can get help, and where you get your assignments approved. There are no written reports, instead you should be able to show working code, explain how it works, and show answers to questions in the assignment descriptions.

Note that the assignments are fairly heavy, and you need to do the major part of the work before going to the lab session. The expected effort varies quite a lot between different assignments, and we give some estimates for each of them. There will be a catch-up lab session in week 8.

If you get behind on a lab, you can normally complete it the following week. However, if you did not turn up at the previous lab session, supervisors may give you lower priority and may deny you time for help or approval. If you are ill and cannot attend your lab session, ask course responsible for exemption to this rule.

Signing up for lab sessions

If you signed up for the wrong session and would like to switch, email Görel, and I will do the switch (if there is space).

Collaboration

See info on Moodle for how to collaborate with your partner.

Lab sessions

The lab sessions will be online. You can get assignments approved and you can ask TAs for help. There is information about this in Moodle.

Working with the assignments/labs

Getting help. If you get stuck and need help between lab sessions, please use the forum. You are also encouraged to help others by answering their questions on the forum. However, you are not allowed to post solutions to the assignments on the forum or anywhere else.

Self grading. For some of the labs, a kind of self grading is supported: You can upload your compiler jar file on this website, and it will be run on a number of test cases. This way you can catch many errors. Note that just running the self-grader is not sufficient for passing the lab. You need to show your compiler and its implementation to the lab supervisors.

If you are interested in how the self-grader is implemented, you can look at the source code. It is built using Docker, Go, Python, etc., and is only around 900 lines of code.

Cooperation vs plagiarism. Naturally, you may not copy the solution from another pair, or give your solutions to others. However, you are free to discuss the assignments with other pairs in general terms, and to give/take general advice to/from other pairs. For more details on cooperation versus plagiarism, see the department rules.

Assignment supervisors:

Exam

Prerequisites: To be allowed to write the exam you need to have completed all the programming lab assignments.

Sign up: You need to sign up for the exam in LADOK. (Information in Swedish and English.)

Regular exam: Friday, October 29, 2021, 08:00-13:00. Planned to be held on campus, in Kårhusets Gasquesal, but there might be changes due to the pandemic. For more information, see the Week by week page.

Retake: Will be held in April 2022.

To obtain a final grade you must have passed the written examination and completed the programming lab assignments. The grade is based on the written exam only.

Continued studies and work

If you liked this course, here are some suggestions for other courses you might be interested in:

Master thesis compiler projects are available both at the CS department and in industry. Some recent examples: Compiler construction is general knowledge that is useful in any advanced software development as well as in computer science research. Many companies develop their own domain-specific languages. Here are some examples of companies offering related master thesis projects, internships, and jobs: You can get in contact with local companies at the TLTH Arkad fair, Nov 17-18, 2021.