Course Program 2020/2021 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/20_21%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, 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 links 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).

Lab sessions

The lab sessions will be online. More information TBA.

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.

Use a private git repository. It is recommended to use a git repository for your code, but use a private one, since you are not allowed to share your solutions with other course participants than your partner. Examples of hosting services that offer free private repositories are github student developer pack, bitbucket, and gitlab.

Working with your partner. In working together with your partner, it is important that you both contribute to all parts of the solution, and that you both get hands-on experience with all the different aspects of the solutions. You should both be able to individually explain all parts of the solution.

In-person/online meetings with your partner. If you have in-person meetings with your partner, you can pair program (two persons at one keyboard), switching frequently who is at the keyboard, to make sure both get experience from all aspects of the solution. If you are collaborating with online meetings, you can screen share to discuss while you are programming, and commit frequently in order to often switch who is coding on a particular part. In any case, it is extremely important to avoid that only one person codes and the other just talks/listens. Both must code, and on all parts! Otherwise you will not understand and learn sufficiently, and will likely fail the exam.

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 advance. Information in Swedish.

Regular exam: Wednesday, October 28, 2020, 09:00-12:00, MA:8 and MA:9. For more information, see the Week by week page.

Retake: In the spring retake period, on Wednesday April 7, 2021, 8:00-13:00, digital exam. See Retake April 2021 for details.

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 11-12, 2020.