I INTRODUCTION
1 The Role of Programming Languages
1.1 Toward Higher-Level Languages
1.2 Problems of Scale
1.3 Programming Paradigms
1.4 Language Implementation: Bridging the Gap
EXERCISES
BIBLIOGRAPHIC NOTES
2 Language Description: Syntactic Structure
2.1 Expression Notations
2.2 Abstract Syntax Trees
2.5 Lexical Syntax
2.4 Context-Free Grammars
2.5 Grammars for Expressions
2.6 Variants of Grammars
EXERCISES
BIBLIOGRAPHIG NOTES
II IMPERATIVE PROGRAMMING
3 Statements: Structured Programming
3.1 The Need for Structured Programming
3.2 Syntax-Directed Control Flow
3.3 Design Considerations: Syntax
3.4 Handling Special Cases in Loops
S.5 Programming with Invariants
3.6 Proof Rules for Panial Correctness
3.7 Control flow in C
EXERCISES
BIBLIOGRAPHIC NOTES
4 Types: Data Representation
4.1 The Role of Types
4.2 Basic Types
4.3 Arrays: Sequences of Elements
4.4 Records: Named Fields
4.5 Unions and Variant Records
4.6 Sets
4.7 Pointers: ERiciency and Dynamic Allocation
4.e Two String Tables
4.9 Types and Error Checking
EXERCISES
BIBLIOGRAPHIC NOTES
5 Procedure Activations
5.1 Introduction to Procedures
5.2 Parameter-Passing Methods
5.3 Scope Rules for Names
5.4 Nested Scopes in the Source Text
5.5 Activation Records
5.8 Lexical Scope: Procedures as in C
5.7 Lexical Scope: Nested Procedures and Pascal
EXERCISES
BIBLIOGRAPHIC NOTES
III OBJECT-ORIENTED PROGRAMMING
6 Groupings of Data and Operations
6.1 Constructs for Program Structuring
6.2 Information Hiding
6.3 Program Design with Modules
6.4 Modules and Defined Types
6.5 Class Declarations in C++
6.6 Dynamic Allocation in C++
6.7 Templates: Parameterized Types
6.8 Implementation of Objects in C++
EXERCISES
BIBLIOGRAPHIC NOTES
7 Object-Oriented Programming
7.1 What is an Object?
7.2 Object-Oriented Thinking
7.3 inheritance
7.4 Object-Oriented Programming in C++
7.5 An Extended C++ Example
7.6 Derived Classes and Information Hiding
7.7 Objects in Smalltalk
7.8 Smalltalk Objects have a Seff
EXERCISES
BIBLIOGRAPHIC NOTES
IV FUNCTIONAL PROGRAMMING
8 Elements of Functional Programming
8.1 A Little Language of Expressions
8.2 Types: Values and Operations
B.3 Function Declarations
8.4 Approaches to Expression Evaluation
8.5 Lexical Scope
B.6 Type Checking
EXERGISES
BIBLIOGRAPHIC NOTES
9 Functional Programming in a Typed Language
9.1 Exploring a List
9.2 Function Declaration by Cases
9.3 Functions as First-Class Values
9.4 ML: ImplicitTypes
9.5 DataTypes
9.6 Exception Handling in ML
9.7 Little Quilt in Standard ML
EXERCISES
BIBLIOGRAPHIC NOTES
10 Functional Programming with Lists
10.1 Scheme, a Dialect of Lisp
10.2 The Structure of Lists
10.3 List Manipulation
10.4 A Motivating Example: DiHerentiation
10.5 Simplification of Expressions
10.6 Storage Allocation for Lists
EXERCISES
BIBLIOGRAPHIC NOTES
V OTHER PARADIGMS
11 Logic Programming
11.1 Computing with Relations
11.2 Introduction to Proiog
11.3 Data Structures in Prolog
11.4 Programming Techniques
11.5 Control in Prolog
11.e Cuts
EXERCISES
BIBLIOGRAPHIC NOTES
12 An Introduction to Concurrent Programming
12.1 Parallelism in Hardware
12.2 Streams: Implicit Synchronization
12.3 Concurrency as Interleaving
12.4 Liveness Propenies
12.5 Safe Access to Shared Data
12.6 Concurrency in Ada
12.7 Synchronized Access to Shared Variables
EXERCISES
BIBLIOGRAPHIC NOTES
VI LANGUAGE DESCRIPTION
13 Semantic Methods
13.1 Synthesized Attributes
13.2 Attribute Grammars
13.3 Natural Semantics
13.4 Denotational Semantics
13.5 A Calculator in Scheme
13.6 Lexically Scoped Lambda Expressions
13.7 An Interpreter
13.8 An Extension: Recursive Functions
EXERCISES
BIBLIOGRAPHIC NOTES
14 Static Types and the Lambda Calculus
14.1 Equality of Pure Lambda Terms
14.2 Substitution Revisited
14.3 Computation with Pure Lambda Terms
14.4 Programming Constructs as Lambda-Terms
14.5 The Typed Lambda Calculus
14.6 Polymorphic Types
EXERCISES
BIBLIOGRAPHIC NOTES
15 A Look at Some Languages
15.1 Pascal: A Teaching Language
15.2 C: Systems Programming
15.3 C++: A Range of Programming Styles
15.4 Smalltalk, the Language
15.5 Standard ML
15.6 Scheme, a Dialect of Lisp
15.7 Prolog
Bibliography
Credits
Index
查看全部>>