skip to main content
Skip header Section
Practical Foundations for Programming LanguagesApril 2016
Publisher:
  • Cambridge University Press
  • 40 W. 20 St. New York, NY
  • United States
ISBN:978-1-107-15030-0
Published:04 April 2016
Pages:
512
Skip Bibliometrics Section
Bibliometrics
Skip Abstract Section
Abstract

This text develops a comprehensive theory of programming languages based on type systems and structural operational semantics. Language concepts are precisely defined by their static and dynamic semantics, presenting the essential tools both intuitively and rigorously while relying on only elementary mathematics. These tools are used to analyze and prove properties of languages and provide the framework for combining and comparing language features. The broad range of concepts includes fundamental data types such as sums and products, polymorphic and abstract types, dynamic typing, dynamic dispatch, subtyping and refinement types, symbols and dynamic classification, parallelism and cost semantics, and concurrency and distribution. The methods are directly applicable to language implementation, to the development of logics for reasoning about programs, and to the formal verification language properties such as type safety. This thoroughly revised second edition includes exercises at the end of nearly every chapter and a new chapter on type refinements.

Cited By

  1. ACM
    Bohrer R Centering Humans in the Programming Languages Classroom: Building a Text for the Next Generation Proceedings of the 2023 ACM SIGPLAN International Symposium on SPLASH-E, (26-37)
  2. ACM
    Bierhoff K (2022). Wildcards need witness protection, Proceedings of the ACM on Programming Languages, 6:OOPSLA2, (373-394), Online publication date: 31-Oct-2022.
  3. ACM
    Chen Z A Hoare logic style refinement types formalisation Proceedings of the 7th ACM SIGPLAN International Workshop on Type-Driven Development, (1-14)
  4. ACM
    Jacobs J, Balzer S and Krebbers R (2022). Connectivity graphs: a method for proving deadlock freedom based on separation logic, Proceedings of the ACM on Programming Languages, 6:POPL, (1-33), Online publication date: 16-Jan-2022.
  5. ACM
    Sterling J and Harper R (2021). Logical Relations as Types: Proof-Relevant Parametricity for Program Modules, Journal of the ACM, 68:6, (1-47), Online publication date: 31-Dec-2022.
  6. ACM
    Bottu G and Eisenberg R Seeking stability by being lazy and shallow: lazy and shallow instantiation is user friendly Proceedings of the 14th ACM SIGPLAN International Symposium on Haskell, (85-97)
  7. ACM
    Jia X, Lindenhovius B, Mislove M and Zamdzhiev V Commutative monads for probabilistic programming languages Proceedings of the 36th Annual ACM/IEEE Symposium on Logic in Computer Science, (1-14)
  8. ACM
    Wang D, Hoffmann J and Reps T Sound probabilistic inference via guide types Proceedings of the 42nd ACM SIGPLAN International Conference on Programming Language Design and Implementation, (788-803)
  9. ACM
    Omar C, Moon D, Blinn A, Voysey I, Collins N and Chugh R Filling typed holes with live GUIs Proceedings of the 42nd ACM SIGPLAN International Conference on Programming Language Design and Implementation, (511-525)
  10. ACM
    Jung R, Jourdan J, Krebbers R and Dreyer D (2021). Safe systems programming in Rust, Communications of the ACM, 64:4, (144-152), Online publication date: 1-Apr-2021.
  11. ACM
    Cimini M, Miller D and Siek J Extrinsically typed operational semantics for functional languages Proceedings of the 13th ACM SIGPLAN International Conference on Software Language Engineering, (108-125)
  12. ACM
    Wang D, Kahn D and Hoffmann J (2020). Raising expectations: automating expected cost analysis with types, Proceedings of the ACM on Programming Languages, 4:ICFP, (1-31), Online publication date: 2-Aug-2020.
  13. ACM
    Knoth T, Wang D, Reynolds A, Hoffmann J and Polikarpova N (2020). Liquid resource types, Proceedings of the ACM on Programming Languages, 4:ICFP, (1-29), Online publication date: 2-Aug-2020.
  14. ACM
    Kovács A (2020). Elaboration with first-class implicit function types, Proceedings of the ACM on Programming Languages, 4:ICFP, (1-29), Online publication date: 2-Aug-2020.
  15. ACM
    Mackay J, Potanin A, Aldrich J and Groves L (2019). Decidable subtyping for path dependent types, Proceedings of the ACM on Programming Languages, 4:POPL, (1-27), Online publication date: 1-Jan-2020.
  16. Bonci A, Longhi S and Pirani M RMAS Architecture for Autonomic Computing in Cyber-Physical Systems IECON 2019 - 45th Annual Conference of the IEEE Industrial Electronics Society, (2996-3003)
  17. ACM
    Hamza J, Voirol N and Kunčak V (2019). System FR: formalized foundations for the stainless verifier, Proceedings of the ACM on Programming Languages, 3:OOPSLA, (1-30), Online publication date: 10-Oct-2019.
  18. Green A, Guagliardo P, Libkin L, Lindaaker T, Marsault V, Plantikow S, Schuster M, Selmer P and Voigt H (2019). Updating graph databases with Cypher, Proceedings of the VLDB Endowment, 12:12, (2242-2254), Online publication date: 1-Aug-2019.
  19. ACM
    Bottu G, Xie N, Marntirosian K and Schrijvers T (2019). Coherence of type class resolution, Proceedings of the ACM on Programming Languages, 3:ICFP, (1-28), Online publication date: 26-Jul-2019.
  20. ACM
    Knoth T, Wang D, Polikarpova N and Hoffmann J Resource-guided program synthesis Proceedings of the 40th ACM SIGPLAN Conference on Programming Language Design and Implementation, (253-268)
  21. ACM
    Benzaken V and Contejean É A Coq mechanised formal semantics for realistic SQL queries: formally reconciling SQL and bag relational algebra Proceedings of the 8th ACM SIGPLAN International Conference on Certified Programs and Proofs, (249-261)
  22. ACM
    Omar C, Voysey I, Chugh R and Hammer M (2019). Live functional programming with typed holes, Proceedings of the ACM on Programming Languages, 3:POPL, (1-32), Online publication date: 2-Jan-2019.
  23. ACM
    Wang D and Hoffmann J (2019). Type-guided worst-case input generation, Proceedings of the ACM on Programming Languages, 3:POPL, (1-30), Online publication date: 2-Jan-2019.
  24. ACM
    Biernacki D, Piróg M, Polesiuk P and Sieczkowski F (2019). Abstracting algebraic effects, Proceedings of the ACM on Programming Languages, 3:POPL, (1-28), Online publication date: 2-Jan-2019.
  25. ACM
    Grech N, Fourtounis G, Francalanza A and Smaragdakis Y Shooting from the heap: ultra-scalable static analysis with heap snapshots Proceedings of the 27th ACM SIGSOFT International Symposium on Software Testing and Analysis, (198-208)
  26. Guagliardo P and Libkin L (2017). A formal semantics of SQL queries, its validation, and applications, Proceedings of the VLDB Endowment, 11:1, (27-39), Online publication date: 1-Sep-2017.
  27. ACM
    Omar C and Aldrich J (2016). Programmable semantic fragments: the design and implementation of typy, ACM SIGPLAN Notices, 52:3, (81-92), Online publication date: 12-May-2017.
  28. ACM
    Omar C, Voysey I, Hilton M, Aldrich J and Hammer M (2017). Hazelnut: a bidirectionally typed structure editor calculus, ACM SIGPLAN Notices, 52:1, (86-99), Online publication date: 11-May-2017.
  29. ACM
    Kumar A, Blelloch G and Harper R (2017). Parallel functional arrays, ACM SIGPLAN Notices, 52:1, (706-718), Online publication date: 11-May-2017.
  30. ACM
    Angiuli C, Harper R and Wilson T (2017). Computational higher-dimensional type theory, ACM SIGPLAN Notices, 52:1, (680-693), Online publication date: 11-May-2017.
  31. ACM
    Omar C, Voysey I, Hilton M, Aldrich J and Hammer M Hazelnut: a bidirectionally typed structure editor calculus Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming Languages, (86-99)
  32. ACM
    Kumar A, Blelloch G and Harper R Parallel functional arrays Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming Languages, (706-718)
  33. ACM
    Angiuli C, Harper R and Wilson T Computational higher-dimensional type theory Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming Languages, (680-693)
  34. ACM
    Omar C and Aldrich J Programmable semantic fragments: the design and implementation of typy Proceedings of the 2016 ACM SIGPLAN International Conference on Generative Programming: Concepts and Experiences, (81-92)
Contributors

Recommendations

Reviews

Michael J. Oudshoorn

Robert Harper, from Carnegie Mellon University, has produced the second edition of the book Practical foundations for programming languages . The book is comprehensive in its coverage of the topic, which is divided into 19 parts and 49 chapters. The first part provides the basis for the book and covers chapters on abstract syntax, inductive definitions, and hypothetical and general judgment. From here, the reader is led through a comprehensive tour of programming language features, ranging from type systems and evaluation to modularity and process equivalence. Harper covers a wide range of topics in surprising depth within a book that is relatively short. This means that the book is dense and relies heavily on a rigorous mathematical basis established in the opening chapters. It is, consequently, precise in its definition and description of topics. There is not a great deal of textual support to aid the reader with the mathematical descriptions and so this book is best suited for graduate students and professionals who have a suitable mathematical and logic background. Readers uncomfortable with the mathematical notation and basis will struggle with the book. However, readers with the appropriate background will benefit from the precision offered by the book, and its encyclopedic breadth of coverage of programming language features. This book is not necessarily one that should be read cover to cover. It serves as an excellent reference and, provided the reader is familiar with the formal notation used, readers can skip to the chapters of interest/relevance to them. As indicated above, the book opens with an introduction to the mathematical notation used throughout. The coverage of programming languages commences with a discussion on static and dynamic aspects of type systems. This focus on static and dynamic aspects of language features, repeated in many of the chapters that follow, helps to provide a framework, making navigation throughout the book much easier. After type systems, Harper moves on to functions followed by finite data types. He then turns his attention to constructive logic and classical logic as applied to types and proposition, before proceeding to generic programming and inductive and coinductive types. After covering polymorphism and abstract types, Harper examines recursive functions and types before looking at dynamic types, including ?-calculus, dynamic typing, and hybrid typing. The next three parts cover subtyping, dynamic dispatch, and control flow, including exceptions. Symbolic data and mutable state, including lazy evaluation, are discussed in the next two parts before parallelism, concurrency, and distribution are addressed. Modularity and equivalence complete the book. The chapters are short, to the point, and grouped together appropriately into parts. The structure makes it relatively easy to find specific topics of interest, but be prepared for brevity. Online Computing Reviews Service

Access critical reviews of Computing literature here

Become a reviewer for Computing Reviews.