1 bookmark for 2024-07-26

27.

Bril: An Intermediate Language for Teaching Compilers

www.cs.cornell.edu/~asampson/blog/bril.html

When I started a new PhD-level compilers course a few years ago,
I thought it was important to use a “hands-on” structure.
There is a big difference between understanding an algorithm on a whiteboard and implementing it, inevitably running into bugs when your implementation encounters real programs.
At the same time, I wanted students to get started quickly, without learning the overwhelming APIs that come with industrial-strength compilers.

I created Bril, the Big Red Intermediate Language, to support the class’s implementation projects.
Bril isn’t very interesting from a compiler engineering perspective, but
I think it’s pretty good for the specific use case of teaching compilers classes.
Here’s a factorial program: