Structure and Interpretation of Computer Programs - 2nd Edition (MIT Electrical Engineering and Computer Science)

Structure and Interpretation of Computer Programs - 2nd Edition (MIT Electrical Engineering and Computer Science)

Harold Abelson, Gerald Jay Sussman, Julie Sussman

Language: English

Pages: 683

ISBN: 0262510871

Format: PDF / Kindle (mobi) / ePub


Structure and Interpretation of Computer Programs has had a dramatic impact on computer science curricula over the past decade. This long-awaited revision contains changes throughout the text. There are new implementations of most of the major programming systems in the book, including the interpreters and compilers, and the authors have incorporated many small changes that reflect their experience teaching the course at MIT since the first edition was published. A new theme has been introduced that emphasizes the central role played by different approaches to dealing with time in computational models: objects with state, concurrent programming, functional programming and lazy evaluation, and nondeterministic programming. There are new example sections on higher-order procedures in graphics and on applications of stream processing in numerical programming, and many new exercises. In addition, all the programs have been reworked to run in any Scheme implementation that adheres to the IEEE standard.

 

 

 

 

 

 

 

 

 

 

informant true false)) ((eq? request 'value) value) ((eq? request 'set-value!) set-my-value) ((eq? request 'forget) forget-my-value) ((eq? request 'connect) connect) (else (error "Unknown operation -- CONNECTOR" request)))) me)) 242 The connector's local procedure set-my-value is called when there is a request to set the connector's value. If the connector does not currently have a value, it will set its value and remember as informant the constraint that requested the value to be

Processes will execute concurrently, but there will be certain collections of procedures that cannot be executed concurrently. More precisely, serialization creates distinguished sets of procedures such that only one execution of a procedure in each serialized set is permitted to happen at a time. If some procedure in the set is being executed, then a process that attempts to execute any procedure in the set will be forced to wait until the first execution has finished. We can use

be rewritten as a set of nested let expressions, and write a procedure let*->nested-lets that performs this transformation. If we have already implemented let (exercise 4.6) and we want to extend the evaluator to handle let*, is it sufficient to add a clause to eval whose action is (eval (let*->nested-lets exp) env) or must we explicitly expand let* in terms of non-derived expressions? Exercise 4.8. ``Named let'' is a variant of let that has the form (let < var> < bindings> < body>) The <

on a part of the machine we are designing. We will refer to this kind of operation as an action. We will represent an action in a data-path diagram just as we represent an operation that computes a value -- as a trapezoid that contains the name of the action. Arrows point to the action box from any inputs (registers or constants). We also associate a button with the action. Pushing the button makes 406 the action happen. To make a controller push an action button we use a new kind of

section 4.6.3, for a full discussion and analysis of this and other methods of exponentiation. 40 This algorithm, which is sometimes known as thè`Russian peasant method'' of multiplication, is ancient. Examples of its use are found in the Rhind Papyrus, one of the two oldest mathematical documents in existence, written about 1700 B.C. (and copied from an even older document) by an Egyptian scribe named A'h-mose. 41 This exercise was suggested to us by Joe Stoy, based on an example in

Download sample

Download