Programming Language Concepts

  • Peter Sestoft

Part of the Undergraduate Topics in Computer Science book series (UTICS)

Table of contents

  1. Front Matter
    Pages i-xv
  2. Peter Sestoft
    Pages 1-12
  3. Peter Sestoft
    Pages 13-29
  4. Peter Sestoft
    Pages 31-57
  5. Peter Sestoft
    Pages 59-79
  6. Peter Sestoft
    Pages 81-96
  7. Peter Sestoft
    Pages 97-118
  8. Peter Sestoft
    Pages 119-140
  9. Peter Sestoft
    Pages 141-159
  10. Peter Sestoft
    Pages 161-181
  11. Peter Sestoft
    Pages 183-207
  12. Peter Sestoft
    Pages 209-232
  13. Peter Sestoft
    Pages 233-251
  14. Peter Sestoft
    Pages 253-281
  15. Peter Sestoft
    Pages 283-305
  16. Back Matter
    Pages 307-341

About this book


This book uses a functional programming language (F#) as a metalanguage to present all concepts and examples, and thus has an operational flavour, enabling practical experiments and exercises. It includes basic concepts such as abstract syntax, interpretation, stack machines, compilation, type checking, garbage collection, and real machine code. Also included are more advanced topics on polymorphic types, type inference using unification, co- and contravariant types, continuations, and backwards code generation with on-the-fly peephole optimization. 

This second edition includes two new chapters. One describes compilation and type checking of a full functional language, tying together the previous chapters. The other describes how to compile a C subset to real (x86) hardware, as a smooth extension of the previously presented compilers.The examples present several interpreters and compilers for toy languages, including compilers for a small but usable subset of C, abstract machines, a garbage collector, and ML-style polymorphic type inference.  Each chapter has exercises.  

Programming Language Concepts covers practical construction of lexers and parsers, but not regular expressions, automata and grammars, which are well covered already.  It discusses the design and technology of Java and C# to strengthen students’ understanding of these widely used languages.


Compilers Continuations Interpreters Language Design Type checking and type inference

Authors and affiliations

  • Peter Sestoft
    • 1
  1. 1.Computer Science DepartmentIT University of Copenhagen Copenhagen SDenmark

Bibliographic information

Industry Sectors
Finance, Business & Banking
IT & Software
Consumer Packaged Goods
Oil, Gas & Geosciences