Structure and Interpretation of Computer Programs

Second Edition




4 METALINGUISTIC ABSTRACTION

4.1 The Metacircular Evaluator

4.1.1 The Core of the Evaluator

Primitive expressions
Special forms
Combinations

4.1.2 Representing Expressions

4.1.3 Evaluator Data Structures

4.1.4 Running the Evaluator as a Program

4.1.5 Data as Programs

4.1.6 Internal Definitions

4.1.7 Separating Syntactic Analysis from Execution


4.2 Variations on a Scheme ­ Lazy Evaluation

4.2.1 Normal Order and Applicative Order

4.2.2 An Interpreter with Lazy Evaluation

4.2.3 Streams as Lazy Lists


4.3 Variations on a Scheme ­ Nondeterministic Computing

4.3.1 Amb and Search

4.3.2 Examples of Nondeterministic Programs

4.3.3 Implementing the Amb Evaluator


4.4 Logic Programming

4.4.1 Deductive Information Retrieval

4.4.2 How the Query System Works

4.4.3 Is Logic Programming Mathematical Logic?

4.4.4 Implementing the Query System4

4.4.4.1 The Driver Loop and Instantiation

4.4.4.2 The Evaluator

4.4.4.3 Finding Assertions by Pattern Matching

4.4.4.4 Rules and Unification

4.4.4.5 Maintaining the Data Base

4.4.4.6 Stream Operations

4.4.4.7 Query Syntax Procedures

4.4.4.8 Frames and Bindings


5 COMPUTING WITH REGISTER MACHINES