6.001 Structure and Interpretation of Computer Programs. Copyright o 2004 by Massachusetts Institute of Technology 6.001 Notes: Section 3.1 Slide 3.1.1 This Lecture In this lecture, we are going to put together the basic pieces of Scheme that we introduced in the previous lecture, in order to Substitution mode An example using the substitution model start capturing computational processes inside procedures. To Designing recursive procedures do this we will introduce a model of computation, called the substitution model. We will show how that model helps us relate the choices we make in designing a procedure to the actual process of evaluation that will occur when we use that Thus we will first look at an example of the substitution model to make sure you understand its mechanics, and then we will 7803 60015e use to that examine two different approaches to creating procedures Substitution model Slide 3.1.2 a way to figure out what happens during evaluation Now that we have the ability to create procedures and use them not really what happens in the ve need some way of figuring out what happens during the olution of a For that we h something called the substitution model. You' ve actually seen this, but we just didn' t call it that, and now we are going to make it quite expl The role of the substitution model is to provide us with a means of determining how an expression evolves In examining the substitution model, we stress that this is not a perfect model of 4781208 rm we 1001 SICP what goes on inside the computer. In fact, later in the ter will see a much more detailed and accurate model of computation, but this model suffices for our purposes. Indeed, nding in designing pi can work backwards, using a desired pattern of evaluation to help us design the correct procedure to generate that evaluation pattern6.001 Structure and Interpretation of Computer Programs. Copyright © 2004 by Massachusetts Institute of Technology. 6.001 Notes: Section 3.1 Slide 3.1.1 In this lecture, we are going to put together the basic pieces of Scheme that we introduced in the previous lecture, in order to start capturing computational processes inside procedures. To do this, we will introduce a model of computation, called the substitution model. We will show how that model helps us relate the choices we make in designing a procedure to the actual process of evaluation that will occur when we use that procedure. Thus we will first look at an example of the substitution model, to make sure you understand its mechanics, and then we will use to that examine two different approaches to creating procedures. Slide 3.1.2 Now that we have the ability to create procedures and use them, we need some way of figuring out what happens during the evolution of a procedure application. For that we have something called the substitution model. You've actually seen this, but we just didn't call it that, and now we are going to make it quite explicit. The role of the substitution model is to provide us with a means of determining how an expression evolves. In examining the substitution model, we stress that this is not a perfect model of what goes on inside the computer. In fact, later in the term we will see a much more detailed and accurate model of computation, but this model suffices for our purposes. Indeed, we don't really care about using the substitution model to figure out the actual value of an expression. We can use the computer to do that. Rather, we want to use the substitution model to understand the process of evaluation, so that we can use that understanding to reason about choices in designing procedures. Given that understanding, we can work backwards, using a desired pattern of evaluation to help us design the correct procedure to generate that evaluation pattern