CS 15-212: Fundamental Structures of Computer Science II |
We complete our treatment of interpreters by discussing operational semantics -- a specification of what it means for an expression to be reduced to a value. The basic inference rules are straightforward. To extend our set of values to include functions, we introduce the notion of a closure, which encapsulates the function definition as an expression together with the necessary variable bindings in the value environment.