📖 Overview
Compiling with Continuations is a technical book focused on compiler construction techniques using continuation-passing style (CPS). The text presents a complete framework for building optimizing compilers based on CPS intermediate representation.
The book provides detailed explanations of transforming programs into CPS form and performing optimizations on the resulting code. Through worked examples and formal descriptions, it demonstrates how continuation-based compilation leads to efficient target code generation for functional programming languages.
The core content covers closure conversion, register allocation, garbage collection, and dataflow analysis within the CPS framework. Each chapter builds systematically on previous concepts while incorporating real compiler implementations.
This work represents a bridge between theoretical computer science principles and practical compiler engineering. The CPS-based approach offers insights into program transformation and optimization techniques that remain relevant for modern compiler design.
👀 Reviews
Readers describe this as a technical, in-depth exploration of continuation-passing style and its role in compiling functional languages. Most reviews come from academics and compiler developers who used it for research or implementation work.
Likes:
- Clear explanations of CPS transformations
- Practical code examples in Standard ML
- Detailed coverage of optimization techniques
- Strong theoretical foundations with real implementation details
Dislikes:
- Dense academic writing style
- Outdated ML dialect and compiler examples
- Limited coverage of modern compilation techniques
- Hard to find copies (out of print)
Reader Paul Snively notes it "explains CPS transformation better than any other source." A Goodreads reviewer mentions it's "not for compiler beginners."
Ratings:
Goodreads: 4.14/5 (7 ratings)
Amazon: No ratings available
Science Direct: Referenced in 1,374 papers
The book appears primarily in academic citations rather than consumer reviews, reflecting its specialized technical audience.
📚 Similar books
Advanced Compiler Design and Implementation by Steven S. Muchnick
This text covers optimization and code generation techniques with the same level of technical depth as Appel's work on continuation-passing style.
Types and Programming Languages by Benjamin Pierce The book presents formal treatments of type systems and their implementation in compilers, connecting theoretical foundations with practical compiler construction.
Modern Compiler Implementation in ML by Andrew W. Appel This companion volume focuses on practical implementation details using ML, building on the theoretical foundations established in Compiling with Continuations.
Engineering a Compiler by Keith Cooper, Linda Torczon The text provides comprehensive coverage of data flow analysis and optimization phases in compiler construction with mathematical rigor.
Optimizing Compilers for Modern Architectures by Randy Allen and Ken Kennedy The book examines advanced optimization techniques for compiler construction with focus on instruction-level parallelism and memory hierarchy considerations.
Types and Programming Languages by Benjamin Pierce The book presents formal treatments of type systems and their implementation in compilers, connecting theoretical foundations with practical compiler construction.
Modern Compiler Implementation in ML by Andrew W. Appel This companion volume focuses on practical implementation details using ML, building on the theoretical foundations established in Compiling with Continuations.
Engineering a Compiler by Keith Cooper, Linda Torczon The text provides comprehensive coverage of data flow analysis and optimization phases in compiler construction with mathematical rigor.
Optimizing Compilers for Modern Architectures by Randy Allen and Ken Kennedy The book examines advanced optimization techniques for compiler construction with focus on instruction-level parallelism and memory hierarchy considerations.
🤔 Interesting facts
🔹 The book, published in 1992, was one of the first comprehensive texts to explore continuation-passing style (CPS) as a practical compiler optimization technique.
🔹 Author Andrew Appel developed the Standard ML of New Jersey compiler, which heavily influenced the book's concepts and examples.
🔹 The techniques described in the book have been influential in the development of modern functional programming language compilers, including those for Scheme, OCaml, and Haskell.
🔹 During his career at Princeton University, Appel has made significant contributions to both programming language theory and computer security, earning him the ACM SIGPLAN Distinguished Service Award.
🔹 The concept of continuations, central to the book, originated in the 1960s with Christopher Strachey and Christopher P. Wadsworth, though the book pioneered their practical application in compiler optimization.