Messages

Published Apr. 22, 2026 11:46 AM

Dear IN5380-student,

This week we are covering code generation. We will continue with this next week as well, after which we will have covered all of the material.

A group has found an error in the mandatory assignment text – or rather – an important omission. The interpreter and byte code is somewhat limited, so you do not need to generate code for block structure or reference types.

I have updated the text on the Compila page.

See you next for the final week of ordinary lectures,
- Lars

Published Apr. 17, 2026 4:27 PM

Dear IN5380-student,

This week we completed the process of generating intermediate code. From here, we have just one more topic to cover, which is the final stage of the compiler: Code generation. Here we generate code which is intended to run on an actual target. We will spend two weeks on this final topic of compiler construction.

As stated in the beginning of the semester, I made a slightly ambitious schedule for covering all the topics. It looks like we will be done a month before the exam, giving you lots of time to prepare. After the final week of new material, we will probably have two weeks of self-study (i.e. no lectures), followed by one week of one or two lectures focusing on the exam.

I have opened Part 2 of the mandatory assignment in Devilry, with the same groups as for Part 1. Let me know if there are any changes.

Enjoy your weekend,
- Lars

Published Apr. 8, 2026 4:06 PM

Dear IN5380-student,

I hope you have had a nice Easter, and that you are excited for the tail end the compiler!

Before Easter I had meetings with all of you, discussing your mandatory assignment. I want to thank all of you for making it easy for me. You all responded quickly when scheduling the meetings; you had all done a serious effort and could present your work; I felt you were all honest about how you had worked on the assignment and how you were progressing in the course; and, perhaps most importantly, you all seem to have learned quite a bit about compilers. That was my impression at least – I hope this way of organizing the feedback worked well for you as well.

Exam dates published

Exam dates are published ...

Published Mar. 16, 2026 5:38 PM

Dear IN5380-student,

Last week we covered some more semantic analysis, where we studied the symbol table and gave an introduction to type checking.

I am canceling the lectures scheduled for this week, as I am still getting over a cold from last week. I apologize for the short notice! We will resume week 9 of compiler construction next week.

Mandatory assignment

The mandatory assignment is due today, as I hope everyone reading this already knows. Best of luck if you are still hacking away at it!

We need to schedule a time for feedback on the mandatory assignment, which will be conducted in person (or via video call if meeting in person is absolutely not possible). Each group that has delivered something by the end of the day will get an email from me tomorrow....

Published Mar. 5, 2026 9:23 AM

Dear IN5380-student,

Thanks for this weeks lectures. We are now in the semantic analysis phase of the compiler. We were introduced to attribute grammars, which is a structured – yet very general and expressive – way of specifying semantic properties of a language.

I just merged a pull request in the compila-precode repo. The specification and tests were in disagreement about when to include the keyword in. If you have run into this and worked around it some other way then that is fine. Our mistakes should not lead to more work for you. If you haven't, then it is probably a good idea to use the updated tests. Thanks to Tobias for raising the issue and providing a fix.

Note that I'll start removing inactive students from Devilry soon, meaning that if you are not in a group, and have not left a comment on Devilry, then we consider you inactive and you wi...

Published Mar. 2, 2026 11:25 AM

Dear IN5380-student,

This message comes a bit late.

Last week we finished covering parsing. However, the treatment of bottom-up parsing was a bit rushed, so we will repeat the most important parts of it in the lecture tomorrow.

The other topic for this week is semantic analysis, focusing on a particular formalism called attribute grammars.

See you tomorrow,
- Lars

Published Feb. 19, 2026 12:49 PM

Dear IN5380-student,

This week we started covering parsing, which will be our focus in the coming weeks. We started looking at top-down parsing, and will finish off top-down parsing (with LL(1) parsing) next week. Hopefully, we will get started on bottom-up parsing as well.

Group registration for the mandatory assignment

Groups for the mandatory assignment must be created in Devilry by February 20th (tomorrow, that is). If we have agreed you can work alone, leave a comment in Devilry referring to the email-correspondence by date.

We expect you to find someone to work with yourself. If you are not able to find someone to collaborate with, then send an email. You will not be forced to collabo...

Published Feb. 13, 2026 3:54 PM

The first part of this years mandatory assignment was just published. See the page Compila for information!

The assignment this year is pretty much identical to previous semesters. I have split the code base for the mandatory assignment into three repositories:

Feel free to raise issues in the repositories if anything is unclear.

Note that the repos have been extracted ...

Published Feb. 4, 2026 12:55 PM

Dear IN5380-student,

This week we have covered grammars, which is how we specify the syntax of a language. We have seen some examples of grammars, using BNF notation, and seen how we can derive words from the grammar. The process of deriving a word of the grammar is captured by a tree, and this tree is called a parse tree (or synonymously, a concrete syntax tree). A parse tree often contains redundant information, and might not be the most convenient representation of a program. The decisions we make about what information to keep, what to discard, and what to "reshape", yields an abstract syntax tree.

In the next few weeks, we will look at parsing, which is the process of taking a token stream, and converting it to an abstract syntax tree.

No lecture next week

...
Published Jan. 27, 2026 3:16 PM

Dear IN5380-student,

Thanks for today's lecture. The topic of this week is what is going on inside the scanner. Today we covered regular expressions, and how to use Thompson's construction to produce a NFA-ε. Tomorrow, we will cover how to take a NFA-ε and convert it to a DFA. Lastly, we will cover how to produce a minimal DFA.

Exam

There will be a final oral examination (opposed to a written one). We will fix the dates soon.

Mandatory assignments

There will be a two-part mandatory assignment, where you implement a compiler:

  • You will work in groups of two or three. (You need to contact if we need to m...
Published Jan. 20, 2026 3:38 PM

Dear IN5380-student,

We just finished the first lecture of compiler construction. I want to thank everyone who showed up, and hope you got something out of it.

The primary material for this course is outlined in the Web course. It contains videos for each week of lectures, along with references to relevant parts of Martin Steffen's Script.

The lectures will follow the Web course (and script) thematically, but might differ quite a lot in style and emphasis.

I hope to see you all for the lecture tomorrow. If you plan not to attend the lectures, please let me know.

Feel free to drop me an email at larstvei@ifi.uio.no if there is anything.

Lars