I. Introduction
1. The Role of Programming Languages
- Toward Higher-Level Languages
- Problems of Scale
- Programming Paradigms
- Language Implementation: Bridging the Gap
Exercises
Bibliographic Notes
2. Language Description: Syntactic Structure
- Expression Notations
- Abstract Syntax Trees
- Lexical Syntax
- Context-Free Grammars
- Grammars for Expressions
- Variants of Grammars
Exercises
Bibliographic Notes
II. Imperative Programming
3. Statements: Structured Programming
- The Need for Structured Programming
- Syntax-Directed Control Flow
- Design Considerations: Syntax
- Handling Special Cases in Loops
- Programming with Invariants
- Proof Rules for Partial Correctness
- Control flow in C
Exercises
Bibliographic Notes
4. Types: Data Representation
- The Role of Types
- Basic Types
- Arrays: Sequences of Elements
- Records: Named Fields
- Unions and Variant Records
- Sets
- Pointers: Efficiency and Dynamic Allocation
- Two String Tables
- Types and Error Checking
Exercises
Bibliographic Notes
5. Procedure Activations
- Introduction to Procedures
- Parameter-Passing Methods
- Scope Rules for Names
- Nested Scopes in the Source Text
- Activation Records
- Lexical Scope: Procedures as in C
- Lexical Scope: Nested Procedures and Pascal
Exercises
Bibliographic Notes
III. Object-Oriented Programming
6. Groupings of Data and Operations
- Constructs for Program Structuring
- Information Hiding
- Program Design with Modules
- Modules and Defined Types
- Class Declarations in C++
- Dynamic Allocation in C++
- Templates: Parameterized Types
- Implementation of Objects in C++
Exercises
Bibliographic Notes
7. Object-Oriented Programming
- What is an Object?
- Object-Oriented Thinking
- Inheritance
- Object-Oriented Programming in C++
- An Extended C++ Example
- Derived Classes and Information Hiding
- Objects in Smalltalk
- Smalltalk Objects have a Self
Exercises
Bibliographic Notes
IV. Functional Programming
8. Elements of Functional Programming
- A Little Language of Expressions
- Types: Values and Operations
- Function Declarations
- Approaches to Expression Evaluation
- Lexical Scope
- Type Checking
Exercises
Bibliographic Notes
9. Functional Programming in a Typed Language
- Exploring a List
- Function Declaration by Cases
- Functions as First-Class Values
- ML: Implicit Types
- Data Types
- Exception Handling in ML
- Little Quilt in Standard ML
Exercises
Bibliographic Notes
10. Functional Programming with Lists
- Scheme, a Dialect of Lisp
- The Structure of Lists
- List Manipulation
- A Motivating Example: Differentiation
- Simplification of Expressions
- Storage Allocation for Lists
Exercises
Bibliographic Notes
V. Other Paradigms
11. Logic Programming
- Computing with Relations
- Introduction to Prolog
- Data Structures in Prolog
- Programming Techniques
- Control in Prolog
- Cuts
Exercises
Bibliographic Notes
12. An Introduction to Concurrent Programming
- Parallelism in Hardware
- Streams: Implicit Synchronization
- Concurrency as Interleaving
- Liveness Properties
- Safe Access to Shared Data
- Concurrency in Ada
- Synchronized Access to Shared Variables
Exercises
Bibliographic Notes
VI. Language Description
13. Semantic Methods
- Synthesized Attributes
- Attribute Grammars
- Natural Semantics
- Denotational Semantics
- A Calculator in Scheme
- Lexically Scoped Lambda Expressions
- An Interpreter
- An Extension: Recursive Functions
Exercises
Bibliographic Notes
14. Static Types and the Lambda Calculus
- Equality of Pure Lambda Terms
- Substitution Revisited
- Computation with Pure Lambda Terms
- Programming Constructs as Lambda-Terms
- The Typed Lambda Calculus
- Polymorphic Types
Exercises
Bibliographic Notes
15. A Look at Some Languages
- Pascal: A Teaching Language
- C: Systems Programming
- C++: A Range of Programming Styles
- Smalltalk, the Language
- Standard ML
- Scheme, a Dialect of Lisp
- Prolog
Bibliography
Credits
Index