Bril: An Intermediate Language for Teaching Compilers (www.cs.cornell.edu)
from mac@programming.dev to programming@programming.dev on 27 Jul 2024 13:34
https://programming.dev/post/17396389

#programming

threaded - newest

AbelianGrape@beehaw.org on 27 Jul 2024 15:24 next collapse

Bril is the only compiler IL I know of that is specifically designed for education.

R. Kent Dybvig’s compilers course has had approximately 15 “intermediate” representations designed for his course since at least 2004 – a consequence of teaching the course using the nanopass compiler framework for scheme. You could broadly divide these into “representations that are restrictions of scheme,” and “representations that are increasingly-annotated versions of UIL” where UIL is the underlying intermediate representation. As far as I know, UIL was also designed for this course.

vhstape@lemmy.sdf.org on 28 Jul 2024 05:03 collapse

I highly recommend “Essentials of Compilation” by Jeremy Siek, which explores the same nano-pass approach using both Python and Racket. His course is easily one of my favorites.