附註:Includes bibliographical references (pages 854-862) and index.
Intro -- Short Contents -- Table of Contents -- Preface -- Goals of the book -- Main features -- Teaching from the book -- History and acknowledgments -- Final comments -- Running the Example Programs -- Chapter 1. Introduction to Programming Concepts -- 1.1 A calculator -- 1.2 Variables -- 1.3 Functions -- 1.4 Lists -- 1.5 Functions over lists -- 1.6 Correctness -- 1.7 Complexity -- 1.8 Lazy evaluation -- 1.9 Higher-order programming -- 1.10 Concurrency -- 1.11 Dataflow -- 1.12 Explicit state -- 1.13 Objects -- 1.14 Classes -- 1.15 Nondeterminism and time -- 1.16 Atomicity
1.17 Where do we go from here? -- 1.18 Exercises -- Part I. General Computation Models -- Chapter 2. Declarative Computation Model -- 2.1 Defining practical programming languages -- 2.2 The single-assignment store -- 2.3 Kernel language -- 2.4 Kernel language semantics -- 2.5 Memory management -- 2.6 From kernel language to practical language -- 2.7 Exceptions -- 2.8 Advanced topics -- 2.9 Exercises -- Chapter 3. Declarative Programming Techniques -- 3.1 What is declarativeness? -- 3.2 Iterative computation -- 3.3 Recursive computation -- 3.4 Programming with recursion
3.5 Time and space efficiency -- 3.6 Higher-order programming -- 3.7 Abstract data types -- 3.8 Nondeclarative needs -- 3.9 Program design in the small -- 3.10 Exercises -- Chapter 4. Declarative Concurrency -- 4.1 The data-driven concurrent model -- 4.2 Basic thread programming techniques -- 4.3 Streams -- 4.4 Using the declarative concurrent model directly -- 4.5 Lazy execution -- 4.6 Soft real-time programming -- 4.7 The Haskell language -- 4.8 Limitations and extensions of declarative programming -- 4.9 Advanced topics -- 4.10 Historical notes -- 4.11 Exercises
Chapter 5. Message-Passing Concurrency -- 5.1 The message-passing concurrent model -- 5.2 Port objects -- 5.3 Simple message protocols -- 5.4 Program design for concurrency -- 5.5 Lift control system -- 5.6 Using the message-passing model directly -- 5.7 The Erlang language -- 5.8 Advanced topic -- 5.9 Exercises -- Chapter 6. Explicit State -- 6.1 What is state? -- 6.2 State and system building -- 6.3 The declarative model with explicit state -- 6.4 Data abstraction -- 6.5 Stateful collections -- 6.6 Reasoning with state -- 6.7 Program design in the large -- 6.8 Case studies
6.9 Advanced topics -- 6.10 Exercises -- Chapter 7. Object-Oriented Programming -- 7.1 Inheritance -- 7.2 Classes as complete data abstractions -- 7.3 Classes as incremental data abstractions -- 7.4 Programming with inheritance -- 7.5 Relation to other computation models -- 7.6 Implementing the object system -- 7.7 The Java language (sequential part) -- 7.8 Active objects -- 7.9 Exercises -- Chapter 8. Shared-State Concurrency -- 8.1 The shared-state concurrent model -- 8.2 Programming with concurrency -- 8.3 Locks -- 8.4 Monitors -- 8.5 Transactions -- 8.6 The Java language (concurrent part)
摘要:This innovative text presents computer programming as a unified discipline in a way that is both practical and scientifically sound. The book focuses on techniques of lasting value and explains them precisely in terms of a simple abstract machine. The book presents all major programming paradigms in a uniform framework that shows their deep relationships and how and where to use them together. After an introduction to programming concepts, the book presents both well-known and lesser-known computation models ("programming paradigms"). Each model has its own set of techniques and each is included on the basis of its usefulness in practice. The general models include declarative programming, declarative concurrency, message-passing concurrency, explicit state, object-oriented programming, shared-state concurrency, and relational programming. Specialized models include graphical user interface programming, distributed programming, and constraint programming. Each model is based on its kernel language -- a simple core language that consists of a small number of programmer- significant elements. The kernel languages are introduced progressively, adding concepts one by one, thus showing the deep relationships between different models. The kernel languages are defined precisely in terms of a simple abstract machine. Because a wide variety of languages and programming paradigms can be modeled by a small set of closely related kernel languages, this approach allows programmer and student to grasp the underlying unity of programming. The book has many program fragments and exercises, all of which can be run on the Mozart Programming System, an Open Source software package that features an interactive incremental development environment.