
Livro digital
Título:
Implementing Functional Languages: A Tutorial
Autor:
Simon L. Peyton Jones, David R. Lester
Categoria:
Tecnologia > Backend
Doador:
Raffaello D. N.
Sinopse:
How does a lazy functional language become an executing machine rather than an elegant notation? Starting with the deliberately small Core language, Simon L. Peyton Jones and David R. Lester build the essential front end piece by piece: syntax, data types, a standard prelude, a pretty-printer, and a parser. That compact foundation lets the reader concentrate on the machinery that makes non-strict evaluation work, following real state transitions instead of hiding them behind a finished compiler.
The journey then develops four substantial implementations. Template instantiation introduces graph reduction in its most direct form; the G-machine turns programs into instruction sequences; the Three Instruction Machine explores a sharply different evaluation model; and a parallel G-machine extends the design with tasks, sparks, scheduling, and blocking. Each machine evolves through successive working versions that add arithmetic, structured data, updating, garbage collection, and practical execution behavior. A final treatment of lambda lifting separates local definitions from full laziness and shows how dependency analysis completes the compilation pipeline.
This is a book to execute as much as to read. Its complete Miranda prototypes, Core-language examples, exercises, utilities, and incremental refinements invite readers to run a compiler, change it, observe the machine state, and understand why each improvement matters. For programmers who already know the basics of functional programming and want to cross the boundary into language implementation, it offers a rare combination of conceptual clarity and laboratory-scale engineering: not merely a description of abstract machines, but a guided apprenticeship in building them.