Programming Languages surveys current topics in programming languages such as logic programming, functional programming, and object-oriented programming. This new edition now includes chapters on data types, functional programming, using ML, and language summaries.
Table of Contents
I. INTRODUCTION. 1. The Role of Programming Languages.
Toward Higher-Level Languages.
Problems of Scale.
Language Implementation: Bridging the Gap.
Bibliographic Notes.2. Language Description: Syntactic Structure.
Abstract Syntax Trees.
Grammars for Expressions.
Variants of Grammars.
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.
Bibliographic Notes.4. Types: Data Representation.
The Role of Types.
Arrays: Sequences of Elements.
Records: Named Fields.
Unions and Variant Records.
Pointers: Efficiency and Dynamic Allocation.
Two String Tables.
Types and Error Checking.
Bibliographic Notes.5. Procedure Activations.
Introduction to Procedures.
Scope Rules for Names.
Nested Scopes in the Source Text.
Lexical Scope: Procedures as in C.
Lexical Scope: Nested Procedures and Pascal.
III. OBJECT-ORIENTED PROGRAMMING. 6. Groupings of Data and Operations.
Constructs for Program Structuring.
Program Design with Modules.
Modules and Defined Types.
Class Declarations in C++.
Dynamic Allocation in C++.
Templates: Parameterized Types.
Implementation of Objects in C++.
Bibliographic Notes.7. Object-Oriented Programming.
What is an Object?
Object-Oriented Programming in C++.
An Extended C++ Example.
Derived Classes and Information Hiding.
Objects in Smalltalk.
Smalltalk Objects have a Self.
IV. FUNCTIONAL PROGRAMMING. 8. Elements of Functional Programming.
A Little Language of Expressions.
Types: Values and Operations.
Approaches to Expression Evaluation.
Bibliographic Notes.9. Functional Programming in a Typed Language.
Exploring a List.
Function Declaration by Cases.
Functions as First-Class Values.
ML: Implicit Types.
Exception Handling in ML.
Little Quilt in Standard ML.
Bibliographic Notes.10. Functional Programming with Lists.
Scheme, a Dialect of Lisp.
The Structure of Lists.
A Motivating Example: Differentiation.
Simplification of Expressions.
Storage Allocation for Lists.
V. OTHER PARADIGMS. 11. Logic Programming.
Computing with Relations.
Introduction to Prolog.
Data Structures in Prolog.
Control in Prolog.
Bibliographic Notes.12. An Introduction to Concurrent Programming.
Parallelism in Hardware.
Streams: Implicit Synchronization.
Concurrency as Interleaving.
Safe Access to Shared Data.
Concurrency in Ada.
Synchronized Access to Shared Variables.
VI. LANGUAGE DESCRIPTION. 13. Semantic Methods.
A Calculator in Scheme.
Lexically Scoped Lambda Expressions.
An Extension: Recursive Functions.
Bibliographic Notes.14. Static Types and the Lambda Calculus.
Equality of Pure Lambda Terms.
Computation with Pure Lambda Terms.
Programming Constructs as Lambda-Terms.
The Typed Lambda Calculus.
Bibliographic Notes.15. A Look at Some Languages.
Pascal: A Teaching Language.
C: Systems Programming.
C++: A Range of Programming Styles.
Smalltalk, the Language.
Scheme, a Dialect of Lisp.
Prolog.Bibliography. Credits. Index. 0201590654T04062001
Programming Languages: Concepts and Constructs, Second Edition retains the "character" of the original, emphasizing concepts and how they work together. This classic book has been thoroughly revised to provide readable coverage of the major programming paradigms. Dr. Sethi's treatment of the core concepts of imperative programming in languages like Pascal and C flows smoothly into object-oriented programming in C++ and Smalltalk. The charm of functional languages is illustrated by programs in standard ML and the Scheme dialect of Lisp. Logic programming is introduced using Prolog.
Novices, who have been introduced to programming in some language, will learn from this book how related concepts work together while designers and implementers willp be exposed to the major programming paradigms.
Example programs from the book are available as source code. These are available by anonymous ftp at ftp://ftp.aw.com/cseng/authors/sethi/pl2e.
About Ravi Sethi
Ravi Sethi, director of Computing Science Research, has been at AT&T Bell Laboratories in Murray Hill, New Jersey since 1976. He has held teaching positions at Pennsylvania State university and the University of Arizona, and has taught at Princeton University and Rutgers. Dr. Sethi is co-author of the "dragon book", Compilers: Principles, Techniques and Tools and has written numerous articles. His books have been translated in Japanese, German, French, Italian, Spanish, and Korean.