Jeremy Siek faced a dilemma -- how to bring the teaching of compiler techniques down to earth. The Luddy School of Informatics, Computing, and Engineering computer professor teaches a senior-grad-level compiler class in innovative ways. He wanted to share that approach with other teachers and students with a state-of-the-art textbook.
The result is Siek’s Essentials of Compilation, An Incremental Approach in Python. It’s published by MIT Press.
The newest version of the 200-page book came out Aug. 1. An earlier version was published in late February. Both provide a hands-on approach to understanding and building compilers to fit a semester-long course.
“We had something special at IU as far as how it’s been taught,” Siek says. “It’s the way we chunk it up into small, bite-sized pieces to make it easier for students to understand.
“It’s a complex subject matter. For a lot of students, it’s over their heads. Incrementally growing it helps them understand.”
Compilers are some of the most difficult programs to teach and understand. Most compiler textbooks -- highlighted by the 1980s classic Compilers Principles, Techniques and Tools -- dedicate one chapter to each progressive stage, a structure that hides how language features motivate design choices.
Siek calls Compilers Principles the “dragon book.”
“It’s like the Bible for this field.”
However, it’s a 20th Century approach to 21st Century teaching reality.
Siek says his textbook is, “Less of me telling them, ‘Build this,’ and more like, ‘Here’s the problem we’re trying to solve; here are some hints; let’s have a reasonable goal to achieve.’
“They can see the reason why they’re doing things a certain way or reinvent solutions themselves. Better understand what is going on.”
Siek’s textbook provides an incremental approach that allows students to write every line of code themselves. Projects are broken up into small pieces called “milestones.”
“Students can see the fruits of their labor early on,” Siek says. “They can test their code and have a working compiler for a smaller language, then keep incrementing throughout the semester for bigger language.”
Essentials of Compilation guides readers in constructing their own compiler for a small but powerful programming language, adding complex language features as the book progresses.
Siek’s project-oriented textbook explains the essential concepts, algorithms, and data structures that underlie modern compilers and lays the groundwork for future study of advanced topics. The book helps readers learn by doing.
It’s based on Siek’s 15 years of teaching notes from his time at the University of Colorado as well as Indiana University. He spent the last several years polishing it into a manuscript form.
Siek adds the textbook is laid out to help instructors as well as students, even if the instructor is not a compiler expert.
Siek says the book is tied to current software technologies, but because these technologies aren’t changing fast, the book could be used for 10 years, and perhaps longer. Then he could write a second edition.
“We have something special at IU,” he said. “You don’t have to keep teaching from the Dragon Book. I want to get that message out there.”