|Playlist||schedule page slides as PDF|
Store 1 — intro (7:25)
PLAI§8.1. Introduction to state: what and why.
Store 2 — boxes (3:44)
Boxes are a simple stateful objects supported by built-in functions in Plait.
Store 3 — boxes as boxes (3:00)
Implemement a language with boxes by using Plait’s boxes. See box.rkt. This is too easy and not especially revealing about how state works.
Store 4 — store (6:38)
We’ll represent the state of programs in our interpreter explicitly as a store.
Store 5 — interp examples (4:43)
Example calls to interp showing the store as an argument and in the result.
Store 6 — interp (6:07)
Implementing interp. See store.rkt.
Unlike the presentation in PLAI§8.1, we do not change the representation of environments to implement boxes (because boxes have nothing to do with the environment).
Store 7 — sweeter syntax (2:38)
Using syntactic sugar at the Plait level to make our interpreter’s implementation more readable. See store-with.rkt.
Store 8 — testing (3:08)
Expample taking advantage of the functional design of interp to test the implementation of state in Curly.