MIT 6 001 - Variations on a Scheme (7 pages)

Previewing pages 1, 2 of 7 page document View the full content.
View Full Document

Variations on a Scheme



Previewing pages 1, 2 of actual document.

View the full content.
View Full Document
View Full Document

Variations on a Scheme

112 views


Pages:
7
School:
Massachusetts Institute of Technology
Course:
6 001 - Structure and Interpretation of Computer Programs
Structure and Interpretation of Computer Programs Documents

Unformatted text preview:

Building up a language 6 001 SICP Variations on a Scheme 1 eval apply core Scheme Evaluator A Grand Tour Making the environment model concrete Defining eval defines the language Provides mechanism for unwinding abstractions 3 Techniques for language design 4 Interpretation eval apply Semantics vs syntax Syntactic transformations 5 Beyond Scheme designing language variants Lexical scoping vs Dynamic scoping 2 syntax procedures environment manipulation primitives and initial env read eval print loop 1 40 Stages of an interpreter input to each stage The Core Evaluator 1 average 4 5 5 Lexical analyzer Parser 2 40 average 5 4 5 Eval exp env proc args Apply Evaluator symbol average Environment Printer eval apply core define square x x x square 4 x 4 x x 4 symbol 5 5 Core evaluator eval dispatch on expression type apply eval args then apply operator 7 7 The Core Evaluator 3 40 1 Eval exp env proc args eval apply core define square x x x square x Apply Core evaluator eval dispatch on expression type apply eval args then apply operator 5 40 4 40 Meval define meval exp env primitives 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 lambda exp special forms make procedure lambda parameters exp lambda body exp env begin exp eval sequence begin actions exp env cond exp meval cond if exp env application exp application mapply meval operator exp env list of values operands exp env else error Unknown expression type EVAL exp 6 40 1 Basic Semantics m eval m apply Pieces of Eval Apply define meval 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 lambda exp make procedure lambda parameters exp lambda body exp env begin exp eval sequence begin actions exp env cond exp



View Full Document

Access the best Study Guides, Lecture Notes and Practice Exams

Loading Unlocking...
Login

Join to view Variations on a Scheme and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Variations on a Scheme and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?