Buch, Englisch, 370 Seiten, Format (B × H): 155 mm x 235 mm
Buch, Englisch, 370 Seiten, Format (B × H): 155 mm x 235 mm
Reihe: Undergraduate Topics in Computer Science
ISBN: 978-3-032-38578-9
Verlag: Springer
This book uses a functional programming language (F#) as a metalanguage to present all concepts and examples, and thus has an operational flavor, 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. It also includes 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.
The book 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.
This third edition includes several synthesis chapters. One chapter describes compilation and type checking of a full functional language, tying together the previous chapters. Two other chapters describe type checking and code generation for a substantial subset of Java, including classes, objects, inheritance, instance methods, virtual method calls and method overloading. A final synthesis chapter describes how to compile a C subset to real (Arm64) 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. All example source code is available online and each chapter includes exercises.
Zielgruppe
Upper undergraduate
Autoren/Hrsg.
Fachgebiete
Weitere Infos & Material
Introduction.- Interpreters and compilers.- From concrete syntax to abstract syntax.- A first-order functional language.- Higher-order functions.- Polymorphic types.- Imperative languages.- Compiling micro-C.- Real-world abstract machines.- Garbage collection.- Continuations.- A locally optimizing compiler.- Compiling micro-SML.- Typing micro-Java- Compiling micro-Java.- Real machine code: Arm64.- Crash course in F#.




