Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Compiling Scheme to C with flat closure conversion (might.net)
41 points by fogus on Dec 8, 2009 | hide | past | favorite | 4 comments


The last time I noticed Matt Might's name, it was as a grad student advisee to Olin Shivers-- last surviving keeper of the CPS flame!-- writing a hairy dissertation on control-flow analysis in higher-order programs. So at some level, it amuses to see that this particular didactic-purposes toy compiler does /not/ transform its source into CPS or any variant, and does /not/ perform any control-flow analysis.

  ;; The purpose of this compiler is to demonstrate
  ;; the most direct possible mapping of Scheme into C.
  ;; Toward that end, the compiler uses only two
  ;; intermediate transformations: mutable-variable
  ;; elimination and closure-conversion.


Having taken a class from Might in the Spring (not this one, but Programming Language Analysis), I can assure you that he is still very much interested in those topics. I can't really speak to this particular class, however.


Hold the amusement--the third project for the class is (of course) a Scheme -> CPS -> C compiler:

http://matt.might.net/teaching/fall-2009-advanced-compilatio...

Naturally, students are required to implement call/cc.

And, in my static analysis class last spring, project 2 was CPS conversion + 0CFA:

http://matt.might.net/teaching/spring-2009-programming-langu...

-Matt


On behalf of every autodidact here, thank you for publishing those publicly.

Cheers!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: