Course Program 2022/2023 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/22_23%20eng/EDAN65.html

Prerequisites

The course assumes:

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

Registration

To keep your seat, you need to fill in a confirmation list at attend lecture 1. If you did not pre-register, you can do a late pre-registration in "KA", and you will be put on the waiting list. Also come to lecture 1 to keep your place in the waiting list.

Also, you need to register formally in the LADOK system (instructions in Swedish and English). Do so during the first week at the latest.

(PhD students don't have to register. Instead, email Görel Hedin if you want to take the course.)

If you are ill on lecture 1, and still want to follow the course, email Görel Hedin before the course starts.

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 around 14 lectures, 2 hours each. The lectures are held physically, in E:B, and will not be recorded.

Recordings from 2021 will be made available, but might differ slightly in content.

Moodle

We will use the system Moodle for quizzes, student forum, and extra help with the labs.

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 mandatory lab sessions (starting in week 2) where you get your assignments approved, and where you can get help. 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 with an assignment, it is ok to complete it the following week, provided that you were at the corresponding lab session to get help. Make sure that the lab assistant noted that you were present at the lab session. If you are ill and cannot attend your lab session, email Görel Hedin 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).

If you need extra help, you can also go to one of the online help sessions, see Moodle

Working with the assignments/labs

Getting approved. To get approved on an assignment, make sure that

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.

Git repo. You and your partner will get your own git repository for working with the assignments (or separate repositories if you prefer that). See Moodle for how to get your repo.

Collaboration with your partner. For collaboration, you can work in the same repository with your partner, or separately in your own repository.

It is ok to switch modes after one or more assignments. For example, perhaps you start out with the same repository, but discover that you have difficulties in matching up your schedules, and would like to switch to a looser collaboration. Or you start with separate repositories, but collaborate so tightly that it makes more sense to work in the same repository.

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: Tuesday, October 25, 2022, 14:00-19:00. Eden (Ed:025 and Ed:026).

Retake: Will be held in April 2023.

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:

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 15-16, 2022.