Book description
Programming Languages: Concepts and Implementation teaches language concepts from two complementary perspectives: implementation and paradigms. It covers the implementation of concepts through the incremental construction of a progressive series of interpreters in Python, and Racket Scheme, for purposes of its combined simplicity and power, and assessing the differences in the resulting languages.
Table of contents
- Cover
- Title Page
- Copyright Page
- Contents
- Dedication
- Preface
- About the Author
- List of Figures
- List of Tables
-
1 Introduction
- 1.1 Text Objectives
- 1.2 Chapter Objectives
- 1.3 The World of Programming Languages
- 1.4 Styles of Programming
- 1.5 Factors Influencing Language Development
- 1.6 Recurring Themes in the Study of Languages
- 1.7 What You Will Learn
- 1.8 Learning Outcomes
- 1.9 Thematic Takeaways
- 1.10 Chapter Summary
- 1.11 Notes and Further Reading
-
2 Formal Languages and Grammars
- 2.1 Chapter Objectives
- 2.2 Introduction to Formal Languages
- 2.3 Regular Expressions and Regular Languages
- 2.4 Grammars and Backus–Naur Form
- 2.5 Context-Free Languages and Grammars
- 2.6 Language Generation: Sentence Derivations
- 2.7 Language Recognition: Parsing
- 2.8 Syntactic Ambiguity
- 2.9 Grammar Disambiguation
- 2.10 Extended Backus–Naur Form
- 2.11 Context-Sensitivity and Semantics
- 2.12 Thematic Takeaways
- 2.13 Chapter Summary
- 2.14 Notes and Further Reading
- 3 Scanning and Parsing
- 4 Programming Language Implementation
-
5 Functional Programming in Scheme
- 5.1 Chapter Objectives
- 5.2 Introduction to Functional Programming
- 5.3 Lisp
- 5.4 Scheme
- 5.5 cons Cells: Building Blocks of Dynamic Memory Structures
- 5.6 Functions on Lists
- 5.7 Constructing Additional Data Structures
- 5.8 Scheme Predicates as Recursive-Descent Parsers
- 5.9 Local Binding: let, let*, and letrec
- 5.10 Advanced Techniques
- 5.11 Languages and Software Engineering
- 5.12 Layers of Functional Programming
- 5.13 Concurrency
- 5.14 Programming Project for Chapter 5
- 5.15 Thematic Takeaways
- 5.16 Chapter Summary
- 5.17 Notes and Further Reading
-
6 Binding and Scope
- 6.1 Chapter Objectives
- 6.2 Preliminaries
- 6.3 Introduction
- 6.4 Static Scoping
- 6.5 Lexical Addressing
- 6.6 Free or Bound Variables
- 6.7 Dynamic Scoping
- 6.8 Comparison of Static and Dynamic Scoping
- 6.9 Mixing Lexically and Dynamically Scoped Variables
- 6.10 The FUNARG Problem
- 6.11 Deep, Shallow, and Ad Hoc Binding
- 6.12 Thematic Takeaways
- 6.13 Chapter Summary
- 6.14 Notes and Further Reading
-
7 Type Systems
- 7.1 Chapter Objectives
- 7.2 Introduction
- 7.3 Type Checking
- 7.4 Type Conversion, Coercion, and Casting
- 7.5 Parametric Polymorphism
- 7.6 Operator/Function Overloading
- 7.7 Function Overriding
- 7.8 Static/Dynamic Typing Vis-à-Vis Explicit/Implicit Typing
- 7.9 Type Inference
- 7.10 Variable-Length Argument Lists in Scheme
- 7.11 Thematic Takeaways
- 7.12 Chapter Summary
- 7.13 Notes and Further Reading
- 8 Currying and Higher-Order Functions
-
9 Data Abstraction
- 9.1 Chapter Objectives
- 9.2 Aggregate Data Types
- 9.3 Inductive Data Types
- 9.4 Variant Records
- 9.5 Abstract Syntax
- 9.6 Abstract-Syntax Tree for Camille
- 9.7 Data Abstraction
- 9.8 Case Study: Environments
- 9.9 ML and Haskell: Summaries, Comparison, Applications, and Analysis
- 9.10 Thematic Takeaways
- 9.11 Chapter Summary
- 9.12 Notes and Further Reading
-
10 Local Binding and Conditional Evaluation
- 10.1 Chapter Objectives
- 10.2 Checkpoint
- 10.3 Overview: Learning Language Concepts Through Interpreters
- 10.4 Preliminaries: Interpreter Essentials
- 10.5 The Camille Grammar and Language
- 10.6 A First Camille Interpreter
- 10.7 Local Binding
- 10.8 Conditional Evaluation
- 10.9 Putting It All Together
- 10.10 Thematic Takeaways
- 10.11 Chapter Summary
- 10.12 Notes and Further Reading
- 11 Functions and Closures
-
12 Parameter Passing
- 12.1 Chapter Objectives
- 12.2 Assignment Statement
- 12.3 Survey of Parameter-Passing Mechanisms
- 12.4 Implementing Pass-by-Reference in the Camille Interpreter
-
12.5 Lazy Evaluation
- 12.5.1 Introduction
- 12.5.2 β-Reduction
- 12.5.3 C Macros to Demonstrate Pass-by-Name: β-Reduction Examples
- 12.5.4 Two Implementations of Lazy Evaluation
- 12.5.5 Implementing Lazy Evaluation: Thunks
- 12.5.6 Lazy Evaluation Enables List Comprehensions
- 12.5.7 Applications of Lazy Evaluation
- 12.5.8 Analysis of Lazy Evaluation
- 12.5.9 Purity and Consistency
- 12.6 Implementing Pass-by-Name/Need in Camille: Lazy Camille
- 12.7 Sequential Execution in Camille
- 12.8 Camille Interpreters: A Retrospective
- 12.9 Metacircular Interpreters
- 12.10 Thematic Takeaways
- 12.11 Chapter Summary
- 12.12 Notes and Further Reading
-
13 Control and Exception Handling
- 13.1 Chapter Objectives
- 13.2 First-Class Continuations
- 13.3 Global Transfer of Control with Continuations
- 13.4 Other Mechanisms for Global Transfer of Control
- 13.5 Levels of Exception Handling in Programming Languages: A Summary
- 13.6 Control Abstraction
- 13.7 Tail Recursion
- 13.8 Continuation-Passing Style
- 13.9 Callbacks
- 13.10 CPS Transformation
- 13.11 Thematic Takeaways
- 13.12 Chapter Summary
- 13.13 Notes and Further Reading
-
14 Logic Programming
- 14.1 Chapter Objectives
- 14.2 Propositional Calculus
- 14.3 First-Order Predicate Calculus
- 14.4 Resolution
- 14.5 From Predicate Calculus to Logic Programming
- 14.6 The Prolog Programming Language
-
14.7 Going Further in Prolog
- 14.7.1 Program Control in Prolog: A Binary Tree Example
- 14.7.2 Lists and Pattern Matching in Prolog
- 14.7.3 List Predicates in Prolog
- 14.7.4 Primitive Nature of append
- 14.7.5 Tracing the Resolution Process
- 14.7.6 Arithmetic in Prolog
- 14.7.7 Negation as Failure in Prolog
- 14.7.8 Graphs
- 14.7.9 Analogs Between Prolog and an RDBMS
- 14.8 Imparting More Control in Prolog: Cut
- 14.9 Analysis of Prolog
- 14.10 The CLIPS Programming Language
- 14.11 Applications of Logic Programming
- 14.12 Thematic Takeaways
- 14.13 Chapter Summary
- 14.14 Notes and Further Reading
- 15 Conclusion
- Appendix A Python Primer
-
Appendix B Introduction to ML
- B.1 Appendix Objective
- B.2 Introduction
- B.3 Primitive Types
- B.4 Essential Operators and Expressions
- B.5 Running an ML Program
- B.6 Lists
- B.7 Tuples
- B.8 User-Defined Functions
- B.9 Declaring Types
- B.10 Structures
- B.11 Exceptions
- B.12 Input and Output
- B.13 Thematic Takeaways
- B.14 Appendix Summary
- B.15 Notes and Further Reading
-
Appendix C Introduction to Haskell
- C.1 Appendix Objective
- C.2 Introduction
- C.3 Primitive Types
- C.4 Type Variables, Type Classes, and Qualified Types
- C.5 Essential Operators and Expressions
- C.6 Running a Haskell Program
- C.7 Lists
- C.8 Tuples
- C.9 User-Defined Functions
- C.10 Declaring Types
- C.11 Thematic Takeaways
- C.12 Appendix Summary
- C.13 Notes and Further Reading
-
Appendix D Getting Started with the Camille Programming Language
- D.1 Appendix Objective
- D.2 Grammar
- D.3 Installation
- D.4 Git Repository Structure and Setup
-
D.5 How to Use Camille in a Programming Languages Course
- D.5.1 Module 0: Front End (Scanner and Parser)
- D.5.2 Chapter 10 Module: Introduction (Local Binding and Conditionals)
- D.5.3 Configuring the Language
- D.5.4 Chapter 11 Module: Intermediate (Functions and Closures)
- D.5.5 Chapter 12 Modules: Advanced (Parameter Passing, Including Lazy Evaluation) and Imperative (Statements and Sequential Evaluation)
- D.6 Example Usage: Non-interactively and Interactively (CLI)
- D.7 Solutions to Programming Exercises in Chapters 10–12
- D.8 Notes and Further Reading
- Appendix E Camille Grammar and Language
- Bibliography
- Index
- Colophon
Product information
- Title: Programming Languages: Concepts and Implementation
- Author(s):
- Release date: December 2021
- Publisher(s): Jones & Bartlett Learning
- ISBN: 9781284222739
You might also like
book
Introduction to Programming Languages
In programming courses, using the different syntax of multiple languages, such as C++, Java, PHP, and …
book
Essential Computer Science: A Programmer’s Guide to Foundational Concepts
Understand essential computer science concepts and skills. This book focuses on the foundational and fundamental concepts …
book
Programming C# 10
C# is undeniably one of the most versatile programming languages available to engineers today. With this …
book
Concepts and Semantics of Programming Languages 1
This book – the first of two volumes – explores the syntactical constructs of the most …