6.001 Structure and Interpretation of Computer Programs. Copyright o 2004 by Massachusetts Institute of Technology Slide 12.1. 8 Frame: a table of bindings Now we can start building our environment model. first of all Binding: a pairing of a name and a value if variables should now be thought of as places, we need a way of organizing them. So the first piece of an environment is something we call a frame. This just consists of a table of gs binding refers to a pairing of a name and a slot nto which a value can be stored which will be associated with that name Slide 12.1.9 Frame: a table of bindings In terms of an abstract schematic for keeping track of things,. Binding: a pairing of a name and a value here is a table of bindings table a. which we also refer to as frame has two bindings in it it has a binding for the variable and a binding for the variable y Frame: a table of bin Slide 2.1.10 ng: a pairing of a name and a value And in particular, we say that x is bound to the value 15 Example: x is bound to 15 in frame A within Frame A, and y is bound to the value of the list(1 y is bound to(1 2)in frame A 2)within Frame A the value of the variable x in frame a is 15 Notice that the expression x has a value 15 associated with it in this frame, as determine by looking up the binding of x within this table. Shortly we will talk about how we actually establish bindings in this frames, but for now we have the first piece of our environment model. A frame is a table of bindings, and a binding is a pairing of a name and a value Slide 12.1.11 Environment: a sequence of frames An environment consists of a sequence of frames, for reasons that we will see shortly M w: HICp6.001 Structure and Interpretation of Computer Programs. Copyright © 2004 by Massachusetts Institute of Technology. Slide 12.1.8 Now we can start building our environment model. First of all, if variables should now be thought of as places, we need a way of organizing them. So the first piece of an environment is something we call a frame. This just consists of a table of bindings, and a binding refers to a pairing of a name and a slot into which a value can be stored, which will be associated with that name. Slide 12.1.9 In terms of an abstract schematic for keeping track of things, here is a table of bindings. Table A, which we also refer to as a frame, has two bindings in it: it has a binding for the variable x, and a binding for the variable y. Slide 12.1.10 And in particular, we say that x is bound to the value 15 within Frame A, and y is bound to the value of the list (1 2) within Frame A. Notice that the expression x has a value 15 associated with it in this frame, as determine by looking up the binding of x within this table. Shortly we will talk about how we actually establish bindings in this frames, but for now we have the first piece of our environment model. A frame is a table of bindings, and a binding is a pairing of a name and a value. Slide 12.1.11 An environment consists of a sequence of frames, for reasons that we will see shortly