Preface Language Design Issues 1.1 Why Study Programming Languages? 1.2 A Short History of Programming Languages 1.2.1 Development of Early Languages 1.2.2 Evolution of Software Architectures 1.2.3 Application Domains 1.3 Role of Programming Languages 1.3.1 What Makes a Good Language? 1.3.2 Language Paradigms 1.3.3 Language Standardization 1.3.4 Internationalization 1.4 Programming Environments 1.4.1 Effects on Language Design 1.4.2 Environment Frameworks 1.4.3 Job Control and Process Languages 1.5 C Overview 1.6 Suggestions for Further Reading 1.7 Problems 2 Impact of Machine Architectures 2.1 The Operation of a Computer 2.1.1 Computer Hardware 2.1.2 Firmware Computers 2.1.3 Translators and Virtual Architectures 2.2 Virtual Computers and Binding Times 2.2.1 Virtual Computers and Language Implementations 2.2.2 Hierarchies of Virtual Machines 2.2.3 Binding and Binding Time 2.2.4 Java Overview 2.3 Suggestions for Further Reading 2.4 Problems 3 Language Translation Issues 3.1 Programming Language Syntax 3.1.1 General Syntactic Criteria 3.1.2 Syntactic Elements of a Language 3.1.3 Overall Program-Subprogram Structure 3.2 Stages in Translation 3.2.1 Analysis of the Source Program 3.2.2 Synthesis of the Object Program 3.3 Formal Translation Models 3.3.1 BNF Grammars 3.3.2 Finite-State Automata 3.3.3 Perl Overview 3.3.4 Pushdown Automata 3.3.5 General Parsing Algorithms 3.4 Recursive Descent Parsing 3.5 Pascal Overview 3.6 Suggestions for Further Reading 3.7 Problems 4 Modeling Language Properties 4.1 Formal Properties of Languages 4.1.1 Chomsky Hierarchy 4.1.2 Undecidability 4.1.3 Algorithm Complexity 4.2 Language Semantics 4.2.1 Attribute Grammars 4.2.2 Denotational Semantics 4.2.3 ML Overview 4.2.4 Program Verification 4.2.5 Algebraic Data Types 4.3 Suggestions for Further Reading 4.4 Problems Elementary Data Types 5.1 Properties of Types and Objects 5.1.1 Data Objects, Variables, and Constants 5.1.2 Data Types 5.1.3 Declarations 5.1.4 Type Checking and Type Conversion 5.1.5 Assignment and Initialization 5.2 Scalar Data Types 5.2.1 Numeric Data Types 5.2.2 Enumerations 5.2.3 Booleans 5.2.4 Characters 5.3 Composite Data Types 5.3.1 Character Strings 5.3.2 Pointers and Programmer-Constructed Data Objects 5.3.3 Files and Input-Output 5.4 FORTRAN Overview 5.5 Suggestions for Further Reading 5.6 Problems Encapsulation 6.1 Structured Data Types 6.1.1 Structured Data Objects and Data Types 6.1.2 Specification of Data Structure Types 6.1.3 Implementation of Data Structure Types 6.1.4 Declarations and Type Checking for Data Structures 6.1.5 Vectors and Arrays 6.1.6 Records 6.1.7 Lists 6.1.8 Sets 6.1.9 Executable Data Objects 6.2 Abstract Data Types 6.2.1 Evolution of the Data Type Concept 6.2.2 Information Hiding 6.3 Encapsulation by Subprograms 6.3.1 Subprograms as Abstract Operations 6.3.2 Subprogram Definition and Invocation 6.3.3 Subprogram Definitions as Data Objects 6.4 Type Definitions 6.4.1 Type Equivalence 6.4.2 Type Definitions with Parameters 6.5 C++ Overview 6.6 Suggestions for Further Reading 6.7 Problems Inheritance 7.1 Abstract Data Types Revisited 7.2 Inheritance 7.2.1 Derived Classes 7.2.2 Methods 7.2.3 Abstract Classes 7.2.4 Smalltalk Overview 7.2.5 Objects and Messages 7.2.6 Abstraction Concepts 7.3 Polymorphism 7.4 Suggestions for Further Reading 7.5 Problems Sequence Control 8.1 Implicit and Explicit Sequence Control 8.2 Sequencing with Arithmetic Expressions 8.2.1 Tree-Structure Representation 8.2.2 Execution-Time Representation 8.3 Sequence Control Between Statements 8.3.1 Basic Statements 8.3.2 Structured Sequence Control 8.3.3 Prime Programs 8.4 Sequencing with Nonarithmetic Expressions 8.4.1 Prolog Overview 8.4.2 Pattern Matching 8.4.3 Unification 8.4.4 Backtracking 8.4.5 Resolution 8.5 Suggestions for Further Reading 8.6 Problems 9 Subprogram Control 9.1 Subprogram Sequence Control 9.1.1 Simple Call-Return Subprograms 9.1.2 Recursive Subprograms 9.1.3 The Pascal Forward Declaration 9.2 Attributes of Data Control 9.2.1 Names and Referencing Environments 9.2.2 Static and Dynamic Scope 9.2.3 Block Structure 9.2.4 Local Data and Local Referencing Environments 9.3 Parameter Transmission 9.3.1 Actual and Formal Parameters 9.3.2 Methods for Transmitting Parameters 9.3.3 Transmission Semantics 9.3.4 Implementation of Parameter Transmission 9.4 Explicit Common Environments 9.4.1 Dynamic Scope 9.4.2 Static Scope and Block Structure 9.5 Suggestions for Further Reading 9.6 Problems 10 Storage Management 10.1 Elements Requiring Storage 10.2 Programmer- and System-Controlled Storage 10.3 Static Storage Management 10.4 Heap Storage Management 10.4.1 LISP Overview 10.4.2 Fixed-Size Elements 10.4.3 Variable-Size Elements 10.5 Suggestions for Further Reading 10.6 Problems 11 Distributed Processing 11.1 Variations on Subprogram Control 11.1.1 Exceptions and Exception Handlers 11.1.2 Coroutines 11.1.3 Scheduled Subprograms 11.2 Parallel Programming 11.2.1 Concurrent Execution 11.2.2 Guarded Commands 11.2.3 Ada Overview 11.2.4 Tasks 11.2.5 Synchronization of Tasks 11.3 Hardware Developments 11.3.1 Processor Design 11.3.2 System Design 11.4 Software Architecture 11.4.1 Persistent Data and Transaction Systems 11.4.2 Networks and Client-Server Computing 11.5 Suggestions for Further Reading 11.6 Problems 12 Network Programming 12.1 Desktop Publishing 12.1.1 LATEX Document Preparation 12.1.2 WYSIWYG Editors 12.1.3 Postscript 12.1.4 Postscript Virtual Machine 12.2 The World Wide Web 12.2.1 The Internet 12.2.2 CGI Scripts 12.2.3 Java Applets 12.2.4 XML 12.3 Suggestions for Further Reading 12.4 Problems A Language Summaries A.1 Ada A.I.1 Data Objects A.l.2 Sequence Control A.2 C A.2.1 Data Objects A.2.2 Sequence Control A.3 C++ A.3.1 Data Objects A.3.2 Sequence Control A.4 FORTRAN A.4.1 Data Objects A.4.2 Sequence Control A.5 Java A.5.1 Data Objects A.5.2 Sequence Control A.6 LISP A.6.1 Data Objects A.6.2 Sequence Control A.7 ML A.7.1 Data Objects A.7.2 Sequence Control A.8 Pascal A.8.1 Data Objects A.8.2 Sequence Control A.9 Peri A.9.1 Data Objects A.9.2 Sequence Control A.10 Postscript A.10.1 Data Objects A.10.2 Painting Commands A.11 Prolog A.11.1 Data Objects A.11.2 Sequence Control A.12 Smalltalk A.12.1 Data Objects A.12.2 Sequence Control A.13 Suggestions for Further Reading References Index