College Work / 6.1100

6.1100

6.1100 Compure Language Engineering taught compilers from top to bottom. The semester long group project was to build a compiler from scratch on a simple C-like language called Decaf. This included

  • scanning and parsing the grammar of a language
  • building the IR and AST + performing semantic checking
  • generating the CFG
  • doing various optimizations on the CFG (CSE, DCE, etc)
  • outputting x86-64 asm that correctly interacts the stack, allocates and uses registers, and follows the calling convention

The subject material was not only very interesting but also helpful beyond wanting to build a compiler. Getting familiar with the CFG and dominator trees set me up for my MEng Thesis which included a lot of static analysis on source code. Further, generating assembly and understanding how compiler optimizations work is important for performance engineering when making sure that the outputted machine code matches my mental model of how the code executes.

Overall provides a lot of necessary fundamentals to understanding how code is executed. Here is the old website from Spring 2024 when I took it.