Literature and Resources

We recommend the following course book:

Cigrid

Cigrid is a simple subset of C/C++ designed for learning compilers. The Cigrid language is used throughout the whole course as the source language that is compiled into x86 assembler code. You can find the latest Cigrid reference manual here Download Cigrid reference manual here.

X86-64 Reference Sheet

To make it simpler to find information about the x86-64 assembly instruction set architecture, we have created a Download x86-64 reference sheet

suitable for this course. Note that this sheet only shows a subset of all instructions. The complete instruction set can be found here Links to an external site..

Development Languages and Environments

You will do a lot of coding in this course and we strongly suggest that you do your work in a language that promotes a functional style of programming. In the beginning of this course, we will give crash courses in functional programming in OCaml Links to an external site. and in Scala Links to an external site.

The languages that will be supported in the automatic grading system are: OCaml Links to an external site., Haskell Links to an external site., Scala Links to an external site., and Rust Links to an external site.. We will also support the use of Java and C/C++, but we do not recommend that you use these languages in this course, even if it is formally allowed.

C/C++ Resources

The Cigrid language is a subset of C/C++. Hence, it is good to have a basic understanding of these languages. However, you do not need to understand the object-oriented aspects of C++. Here are some relevant links: 

Unix Commands

This course assumes that you have basic understanding in using a Unix command shell. If you are unfamiliar with Unix, please take a look at this ubuntu command line tutorial Links to an external site., or the website linuxcommand.org Links to an external site.. In general, we recommend that you develop using Linux or MacOS. However, other platforms are possible to use, by executing programs using Vagrant (see below).

Container-Based Environment

We recommend using the container-based environments we provide when compiling and running the assignments. These environments make it possible to compile and run programs using a Linux environment while still editing your source code files in your host operating system (e.g., MacOS, Linux, or Windows).

The README.md at the root of your Git repo has instructions on how to set up this environment. In particular, it is important to use this setup when working with assembly code (Module 2 and 3) on ARM-based Macs, as this course targets another architecture (x86). Any additional information related to the container based environment will be posted on Container-Based Environment during the course.

Parsing

Assembler Resources

The focus of this course is on compiling to x86 assembler. Here are a few useful resources: