The 6.001 Lazy Meta-Circular Evaluator The Core Evaluator (define (l-eval exp env) (cond ((self-evaluating? exp) exp) ((variable? exp)(lookup-variable-value exp env)) ((quoted? exp)(text-of-quotation exp)) ((assignment? exp)(eval-assignment exp env)) ((definition? exp)(eval-definition exp env)) ((if? exp)(eval-if exp env))
文件格式: PDF大小: 43.5KB页数: 6
Slide 17.5.1 Streams-a different way of structuring Now, let's look at one example in which changing the computation evaluation model allows us to explore a very different kind of computational problem. Our goal is to show how a smal
文件格式: PDF大小: 1.16MB页数: 15
Slide 17.1.1 Normal Order(Lazy) Evaluation Over the past few lectures, we have been looking at evaluation especially how to implement eval and apply in a anguage such as Scheme, in order to define a language. What we have seen is that by creating, or specifying, eval and its associated procedures, we actually define the semantics of the
文件格式: PDF大小: 1.99MB页数: 20
signment exp en ((definition? exp)(eval-definition exp env)) ((if? exp)(eval-if exp env)) ((lambda? exp) (make-procedure (lambda-parameters exp)(lambda-body exp) env)) ((begin? exp)(eval-sequence (begin-actions exp)env)
文件格式: PDF大小: 38.21KB页数: 4
Slide 16.1.1 Building up a language Last time, we completed building our evaluator. And as you saw, we slightly misled you. We started off saying we were going to user Scheme's lexical analyzer and parser, but then build our own evaluator, which we did initially for arithmetic
文件格式: PDF大小: 2.6MB页数: 25
1. Arithmetic calculator 6 (define (eval exp) 8 ((number? exp) exp) ((sum? exp (eval-sum exp))
文件格式: PDF大小: 35.84KB页数: 7
Slide 15.6.1 The next stage in the evolution of our evaluator is to pull the 5. Environment as explicit parameter environment out as an explicit parameter. Up until now we could rely on just having a single environment in which to store (eva1'(pus*64)) bindings for variables. It made sense to have a global
文件格式: PDF大小: 1.35MB页数: 14
Slide 15.1.1 Why do we need an interpreter? Our goal over the next few lectures is to build an interpreter which in a very basic sense is the ultimate in programming, since doing so will allow us to define our language
文件格式: PDF大小: 2.52MB页数: 28
Slide 14.4.1 Cleaning up some details of our implementation So we have seen a first pass at building an object-oriented tem, using Scheme as the base. There are a few details that The need for self-reference
文件格式: PDF大小: 2MB页数: 18
Slide 14.1.1 Elements of ooP Last time we introduced the idea of object oriented systems Today, we want to build on those basics, looking at how we can expand object-oriented systems to deal with hierarchies of objects, to leverage the commonality of methods between
文件格式: PDF大小: 1.66MB页数: 17
©2026 mall.hezhiquan.com 和泉文库
帮助反馈侵权