~/talk

Tutorial on Program Transformations

Talkat Scheme 2024 · on Saturday, 2024-09-07· [compilers-and-language-design]
slides:none on file

Step-by-step recipe that turns a small Scheme interpreter into C: the session shows exact transforms — CPS conversion, lifting and replacing higher-order closures/environments with tagged data, defunctionalization of continuations, registerizing names into globals and trampolined goto-style control, then a tiny transpiler to emit C. The demonstration actually compiles and runs: factorial and Fibonacci examples produce the expected results (factorial 5 → 120; fib 5 → 5) with warnings but a working C binary.

AI-written summary · about

  1. 0:00Program transformations tutorial
  2. 2:05Course context and goals
  3. 7:54Minimal interpreter with lambdas
  4. 16:09Environments and closures as data
  5. 23:30Higher-order to first-order
  6. 31:09Rewriting in continuation-passing style
  7. 42:26Continuations for control flow
  8. 53:59Throw and continuation handling
  9. 1:05:13Defunctionalizing continuations
  10. 1:17:04Tail calls to gotos
  11. 1:23:46Final C transformation and demo
  12. 1:27:49Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.