Description:
In the world of software compilers are the primary tool used by developers to transform their high level code into low level machine code. This course intends to reveal the inner workings and make source code less magic allowing students to understand why programming languages work they do and the challenges involved in designing new languages. This course challenges students to look beyond the source code by designing a language of their own creation and implementation a compiler from scratch to convert from words in a text file to runnable machine code that can accomplish everyday tasks.
Learning Outcomes:
By the end of the course, a successful student should be able to:
- Understand the inner workings of compilers and programming languages.
- Appreciate the complexity and inner workings of compilers.
- Design and implement programming languages to solve everyday problems (Domain Specific Languages).
- Understand effective git management for a long term open source project.
Texts:
- There are no text’s for this course
Readings:
Assessments
Course Assignment
The primary assignment in this course is a single long-term project spanning the entire semester. You will design and implement a compiler from scratch for a programming language of your own creation. This project is designed to give hands-on experience with the complexities of compiler construction, software design and long term software development. By breaking the compiler into multiple phases for key areas such as parsing, type checking, optimization and code generation you will follow programs from syntax all the way to machine code providing a deeper understanding of how code itself works, while also learning critical programming language theory. Throughout the course, you will have an opportunity to refine important long term software engineering skills, such as advanced problem solving, project management and technical writing. As the project progresses students will be responsible for each phase from the initial compiler architecture to the final implementation, testing and documentation. Completing a large, multi-phase project is not an easy task and will require effective time management while balancing competing properties and deadlines, while ensuring steady progress towards the final goal.
Research Notes
During the primary assignment students will be faced with various challenges at each stage of development, students are expected to take detailed research notes to accompany the final project.
Grading:
- Course Assignment: Weighting Unknown
- Awarded during project milestones at the end of each phase
- Some weight to documentation and open source project expectations.
- Research Notes: Weighting Unknown
Grading Total By Withdrawal Date:
- Unknown
Schedule:
Part 1: Planning
- Week 0: Language Planning
- Week 1: Project Setup and Architecture Part 2: Parsing
- Week 2: Design & Research
- Week 3: Implementation Part 3: Type Checking
- Week 4: Research & Logical Proof
- Week 5: Implementation
- Week 6: Implementation
- Week 7: Implementation Part 4: Middle End
- Week 8: ANF and CPS Research
- Week 9: Implementation Part 5: Code generation
- Week 10: Code generation Research
- Week 11: Implementation Part 6: Runtime
- Week 12: Initial runtime Implementation
Course Guidelines:
This course is divided into 6 parts:
- Part 1: Review of compiler plan and initial project setup
- Part 2: Parsing and language design
- Part 3: Type checking and program correctness
- Part 4: Middle end optimization and code lowering
- Part 5: Webassembly code generation and linking
- Part 6: Initial runtime