About
NOTE: ICD is currently on hiatus. You can still browse previous lecture slides and recordings, though.
General Information
- Term: N/A
- Lecture Times: N/A
- Lecture Location: N/A
- Instructor: Sean Clarke
- Email: sean.clarke@utdallas.edu
- GitHub: @xarkenz
Description
Introduction to Compiler Design is a workshop that operates in some form like a course, though it is not an official course at UTD, and will not provide credit for any degree. I am simply a student trying to help other students who are interested in designing their own compilers. Lectures are given during in-person meetings, and the workshop is focused around the project of building a compiler, which, if completed, can earn you the University of Texas at Dallas Certification in Compiler Design. (I will announce what is considered “complete” later on once I have an idea of where everyone is at.)
That said, I understand that following along and designing a compiler takes a lot of dedicated time that not everyone has to spare, so there’s no obligation to build a compiler that comes with attending. You are welcome to come listen to the lectures and discuss compilers and programming languages either way.
Lecture Recordings
The course lectures will be recorded and posted on the main page of this website alongside the lecture slides and other resources, if applicable. I will do my best to send out an announcement once I post the recording and slides for a lecture after it occurs.
Objectives
- Design a compiler for either a subset of C or a similar language of your choice. (You may even design your own language!)
- Learn how common high-level structures such as loops, conditional statements, functions, and more can be parsed into abstract syntax trees and translated into LLVM-IR pseudo-assembly code.
- Learn how to apply simple optimizations to parsed high-level code and abstract syntax trees in order to improve the generated pseudo-assembly code.
- Compare the (relatively) naive approaches presented in this course to production-level approaches found in compilers like GCC and Clang.
Academic Integrity and Honesty
Please don’t copy code from the example compilers or other resources if you can help it. It’s tempting because we’re following the examples very closely, but it’s a lot more fun and rewarding to implement everything on your own based on what you learned from the lectures. I don’t want to see a replica of an existing compiler, but rather an original compiler where you apply what you have learned in a way that makes sense to you.
Recommended Experience
- CS 2336 or equivalent experience in an imperative programming language (C/C++, Java, Python, etc.).
- CS 2340 or equivalent knowledge of basic programming in any assembly language.
- CS 3345 or equivalent knowledge of linked lists, trees, basic hash tables, and their traversals.
- CS 3377 or equivalent knowledge of basic Unix, Bash usage.
- Basic Git knowledge, along with the ability to use GitHub, Gitlab, or equivalent.
- Compilation to a Linux target is recommended in the lectures, so usage of Linux in some capacity
will be needed if you choose to follow that advice. This can be a physical Linux machine,
the
cs1.utdallas.eduserver, Windows Subsystem for Linux, etc.
These soft prerequisites are covered in more detail on the Prerequisites page.
Resources
- LLVM-IR Language Reference Manual
- ICD Example Compiler (written in Java)
- ECCO Example Compiler (written in Python)