9 Handouts and Sources
\(\newcommand{\la}{\lambda} \newcommand{\Ga}{\Gamma} \newcommand{\ra}{\rightarrow} \newcommand{\Ra}{\Rightarrow} \newcommand{\La}{\Leftarrow} \newcommand{\tl}{\triangleleft} \newcommand{\ir}[3]{\displaystyle\frac{#2}{#3}~{\textstyle #1}}\)
9.1 Handouts
The environment-passing interpreter from the end of Part I, written using match and used as a starting point in Chapter 2 of Part II. interp.rkt
The SIMP simulator written in Racket. simp.rkt
The PRIMP simulator written in Racket. primp.rkt
The small-step interpreter from the end of Part I, written using match and used as a starting point in Chapter 7 of Part II. interp.rkt
9.2 Sources
When I first started teaching using Racket in first year, I was inspired to change my research focus to functional programming languages. Consequently, when I set out to design the two-course sequence whose materials I adapted for FICS, I had a wealth of recent reading to draw on. Among the sources I used, besides the first edition of HtDP, were the early editions of "Programming Languages: Application and Interpretation" by Shriram Krishnamurthi, the second edition of "Essentials of Programming Languages" by Friedman, Wand, and Haynes, "LISP In Small Pieces" by Christian Quienniec, "The Scheme Programming Language" by Kent Dybvig, "ML For The Working Programmer" by Larry Paulson, and the papers of Chris Okasaki. There are others I’m forgetting because I’m writing this away from my office bookshelves.
The development of the continuation-passing interpreter in Chapter 7 is a simplified version of the first half of the book "Semantics Engineering Using PLT Redex" by Felleisen, Findler, and Flatt. That book is more precise about machine models, to the point of being able to provide proofs of equivalence and other useful theorems. The second half of that book uses Redex, a tool that comes with the Racket distribution, which is designed to quickly model languages defined using rewrite rules. The physical book is unfortunately out of date with respect to the software, but if you have Racket installed, you also have current documentation for Redex. The examples of the uses of continuations in Chapter 8 come from Dorai Sitaram’s original paper on control operators, and from the appendix of the book "Concurrent Programming in ML" by John Reppy.
I would like to thank the students and tutors of CS 145 from 2008-2014, CS 146 from 2012-2015, and Math 642 from 2015 onward. Being able to teach this material as a first look at computer science in university was one of the highlights of my career.