正在加载图片...
) Abstraction Elements of a Language(or Engineering Design) Primitives, means of combination means of abstraction What weve seen Procedural Abstraction. ambda-captures common patterns and Deep question #2: Functional programming substitution model Are there things we can't compute Conventional interfaces Deep question #3 list-oriented programming Where does our comp nal power higher order procedures (of recursion) come from (2)Data, State and Objects (3)Language Design and Implementation Data Abstraction Evaluation-meta-circular evaluator Primitive, Compound, Symbolic Data eval& apply Contracts, Abstract Data Types lazy evaluatio Mutation: need ironment model dynamic scoping list structured data and memory management Deep question Some Simple Procedures define(1。op- forever)(1。op- forever)) every expression stand for a va ( return-s 9 rever returns Expression does not stand for a value not well defi1 1 6.001 SICP Computability • What we've seen... • Deep question #1: • Does every expression stand for a value? • Deep question #2: • Are there things we can't compute? • Deep question #3: • Where does our computational power (of recursion) come from? 2 (1) Abstraction • Elements of a Language (or Engineering Design) • Primitives, means of combination, means of abstraction • Procedural Abstraction: • Lambda – captures common patterns and "how to" knowledge • Functional programming & substitution model • Conventional interfaces: • list-oriented programming • higher order procedures 3 (2) Data, State and Objects • Data Abstraction • Primitive, Compound, & Symbolic Data • Contracts, Abstract Data Types • Selectors, constructors, operators, ... • Mutation: need for environment model • Managing complexity • modularity • data directed programming • object oriented programming 4 (3) Language Design and Implementation • Evaluation – meta-circular evaluator • eval & apply • Language extensions & design • lazy evaluation • dynamic scoping • Register machines • ec-eval and universal machines • compilation • list structured data and memory management 5 Deep Question #1 Does every expression stand for a value? 6 Some Simple Procedures • Consider the following procedures (define (return-seven) (+ 3 4)) (define (loop-forever) (loop-forever)) • So (return-seven)  7 (loop-forever)  [never returns!] • Expression (loop-forever) does not stand for a value; not well defined
向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有