| |
| |
| |
Introduction | |
| |
| |
| |
The Role of Programming Languages | |
| |
| |
Toward Higher-Level Languages | |
| |
| |
Problems of Scale | |
| |
| |
Programming Paradigms | |
| |
| |
Language Implementation: Bridging the Gap | |
| |
| |
Exercises | |
| |
| |
Bibliographic Notes | |
| |
| |
| |
Language Description: Syntactic Structure | |
| |
| |
Expression Notations | |
| |
| |
Abstract Syntax Trees | |
| |
| |
Lexical Syntax | |
| |
| |
Context-Free Grammars | |
| |
| |
Grammars for Expressions | |
| |
| |
Variants of Grammars | |
| |
| |
Exercises | |
| |
| |
Bibliographic Notes | |
| |
| |
| |
Imperative Programming | |
| |
| |
| |
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 | |
| |
| |
| |
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 | |
| |
| |
| |
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 | |
| |
| |
| |
Object-Oriented Programming | |
| |
| |
| |
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 | |
| |
| |
| |
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 | |
| |
| |
| |
Functional Programming | |
| |
| |
| |
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 | |
| |
| |
| |
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 | |
| |
| |
| |
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 | |
| |
| |
| |
Other Paradigms | |
| |
| |
| |
Logic Programming | |
| |
| |
Computing with Relations | |
| |
| |
Introduction to Prolog | |
| |
| |
Data Structures in Prolog | |
| |
| |
Programming Techniques | |
| |
| |
Control in Prolog | |
| |
| |
Cuts | |
| |
| |
Exercises | |
| |
| |
Bibliographic Notes | |
| |
| |
| |
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 | |
| |
| |
| |
Language Description | |
| |
| |
| |
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 | |
| |
| |
| |
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 | |
| |
| |
| |
A Look at Some Languages | |
| |
| |
Pascal: A Teaching Language | |
| |
| |
| |
Systems Programming | |
| |
| |
C++: A Range of Programming Styles | |
| |
| |
Smalltalk, the Language | |
| |
| |
Standard ML | |
| |
| |
Scheme, a Dialect of Lisp | |
| |
| |
Prolog | |
| |
| |
Bibliography | |
| |
| |
Credits | |
| |
| |
Index | |