Skip to main content
  • Textbook
  • © 2017

Programming Language Concepts

Authors:

  • This is the first programming language concepts and compiler book based on the functional language F#
  • Topics covered include language design, implementation and performance consequences for the mainstream object-orientated languages Java and C#
  • Relates the C language and its compilation, both to an abstract stack machine and to real x86 hardware
  • Exercises inside with full source code for examples and concepts permit experimentation
  • Includes supplementary material: sn.pub/extras

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

Buy it now

Buying options

eBook USD 54.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book USD 69.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Other ways to access

This is a preview of subscription content, log in via an institution to check for access.

Table of contents (14 chapters)

  1. Front Matter

    Pages i-xv
  2. Introduction

    • Peter Sestoft
    Pages 1-12
  3. Interpreters and Compilers

    • Peter Sestoft
    Pages 13-29
  4. From Concrete Syntax to Abstract Syntax

    • Peter Sestoft
    Pages 31-57
  5. A First-Order Functional Language

    • Peter Sestoft
    Pages 59-79
  6. Higher-Order Functions

    • Peter Sestoft
    Pages 81-96
  7. Polymorphic Types

    • Peter Sestoft
    Pages 97-118
  8. Imperative Languages

    • Peter Sestoft
    Pages 119-140
  9. Compiling Micro-C

    • Peter Sestoft
    Pages 141-159
  10. Real-World Abstract Machines

    • Peter Sestoft
    Pages 161-181
  11. Garbage Collection

    • Peter Sestoft
    Pages 183-207
  12. Continuations

    • Peter Sestoft
    Pages 209-232
  13. A Locally Optimizing Compiler

    • Peter Sestoft
    Pages 233-251
  14. Compiling Micro-SML

    • Peter Sestoft
    Pages 253-281
  15. Real Machine Code

    • 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.

Authors and Affiliations

  • Computer Science Department, IT University of Copenhagen , Copenhagen S, Denmark

    Peter Sestoft

About the author

Peter Sestoft is professor and head of department at the IT University of Copenhagen. He has 25 years teaching experience and his research interests include functional and object-oriented programming languages, the implementation of such languages, and parallel programming on multicore machines. He is the author or co-author of six books published by MIT Press, Morgan Kaufmann, Prentice-Hall and Springer.

Bibliographic Information

Buy it now

Buying options

eBook USD 54.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book USD 69.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Other ways to access