An undergraduate compilers course poses significant challenges to students, in both the conceptual richness of the major components and in the programming effort necessary to implement them. In this paper, I argue that a related architecture, the interpreter, serves as an effective conceptual framework in which to teach some of the later stages of the compiler pipeline. This framework can serve both to unify some of the major concepts that are taught in a typical undergraduate course and to structure the implementation of a semester-long compiler project.
On the other hand, the construction of interpreters plays a prominent role in many courses on programming language design. The simplicity of an interpreter's core structure and the close correspondence to a language's semantics makes this a natural teaching tool, both for conceptual organization and for prototypical implementation of various language features @cite_7 @cite_12 . Abelson and Sussman's classic CS1 text @cite_11 even uses this structure to introduce the structure of a simple compiler, though the correspondence between the two is quickly buried in the details of code generation, and their compiler lacks many real-world features such as a semantic analysis phase.
@cite_12 @cite_7 @cite_11
1583092647 2089674328
From the Publisher: Designed for the upper division Programming Languages course offered in computer science departments,this text focuses on the principles of the design and implementation of programming languages. The language SCHEME,a dialect of LISP,is used to demonstrate abstraction and representation. From the Publisher: With an analytical and rigorous approach to problem solving and programming techniques,this book is oriented toward engineering. Structure and Interpretation of Computer Programs emphasizes the central role played by different approaches to dealing with time in computational models. Its unique approach makes it appropriate for an introduction to computer science courses,as well as programming languages and program design.