Intro to Compilers: Compiler Basics

This course is an introductory course on compilers. We will cover the full path that a compiler takes in translating high-level source code (e.g., in a language like C) to assembly code that can be run on a machine. We will cover the processes of translating source code into a compiler's intermediate representation, then generating code from that intermediate representation. Students will also build a basic compiler that translates C code into RISC-V assembly.

ECE59500

Credit Hours:

1

Learning Objective:

After completing this course you will be able to:
  • Explain regular expressions and lexing procedures
  • Explain context-free grammars and LL(1) parsing
  • Explain semantic actions and AST construction
  • Explain how to translate ATSs into executable code
  • Build a basic compiler that can translate a program into executable code

Description:

This course is an introductory course on compilers. We will cover the full path that a compiler takes in translating high-level source code (e.g., in a language like C) to assembly code that can be run on a machine. We will cover the processes of translating source code into a compiler's intermediate representation, then generating code from that intermediate representation. Students will also build a basic compiler that translates C code into RISC-V assembly.
Fall 2021 Syllabus

Topics Covered:

Compilers
Finite Automata and Regular Languages
Context Free Lnguages and Parsing
Code Generation

Prerequisites:

Comfort with programming, especially data structures and recursion. Experience with object oriented programming will also be beneficial.

Applied / Theory:

50 / 50

Homework:

2 problem sets

Projects:

Students will build a basic end-to-end compiler that translates programs written in a C-like language into RiscV assembly programs

Exams:

1 exam

Textbooks:

There is no required text for this class. However, students may find the book Engineering a Compiler, by Cooper and Torczon (2nd edition, Morgan Kauffman, ISBN: 978-0120884780) helpful.

Computer Requirements:

A computer that can install and run the latest versions of Java and a Git client

Other Requirements:

Students will be asked to install versions of ANTLR (https://www.antlr.org) and will be required to access GitHub through a suitable Git client

ProEd Minimum Requirements:

view