正在加载图片...
6.001 Structure and Interpretation of Computer Programs. Copyright o 2004 by Massachusetts Institute of Technology Slide 12.1.3 To do this, we are going to introduce a better model of What the EM is: evaluation known as the environment model. This model will explain things covered by the substitution model, as well as new effects such as mutation. And it is going to lead us towards much better understanding of the evaluation process 6001S What the EM is: Slide 12. 1. 4 A precise, completely mechanical description of: So what is the environment model? For now think of it as a of a var very precise, very mechanical description of a set of rules for hanging the value of determining the values associated with expressions in Scheme lambda-rule creating a procedure Thus, similar to what we saw several lectures ago, we will have applying a procedure rules for dealing for getting the value of a variable, a rule for creating a value of a variable. and a rule for changing the value of a variable. We ll also have a rule for creating procedures, and a rule for applying procedures 6001 SICP Slide 12. 1.5 What the EM is. So our goal will first be to determine the specific rules for the environment model for these kinds of expressions. Once we name-rule looking up the value of a variable have set out those details, we will be able to explain the define-rule new evolution of the evaluation of arbitrarily complex expressions, changing the value of a variable such as the example we just saw. More importantly, by using the model to analyze code, we arn how to associa particular coding choices with their effects of the evaluation .Enables analyzing arbitrary scheme code process. This will allow us to reverse the process. By deciding the behavior we want in our evaluation process, we will be able to work backwards to determine the code components needed to 1 001 SICP achieve that behavior6.001 Structure and Interpretation of Computer Programs. Copyright © 2004 by Massachusetts Institute of Technology. Slide 12.1.3 To do this, we are going to introduce a better model of evaluation, known as the environment model. This model will explain things covered by the substitution model, as well as new effects such as mutation. And it is going to lead us towards a much better understanding of the evaluation process. Slide 12.1.4 So what is the environment model? For now, think of it as a very precise, very mechanical description of a set of rules for determining the values associated with expressions in Scheme. Thus, similar to what we saw several lectures ago, we will have rules for dealing for getting the value of a variable, a rule for creating a value of a variable, and a rule for changing the value of a variable. We'll also have a rule for creating procedures, and a rule for applying procedures. Slide 12.1.5 So our goal will first be to determine the specific rules for the environment model for these kinds of expressions. Once we have set out those details, we will be able to explain the evolution of the evaluation of arbitrarily complex expressions, such as the example we just saw. More importantly, by using the model to analyze code, we will learn how to associate particular coding choices with their effects of the evaluation process. This will allow us to reverse the process. By deciding the behavior we want in our evaluation process, we will be able to work backwards to determine the code components needed to achieve that behavior
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有