论文标题

重新实现轮子:用一个小的独立式编译器教授编译器

Reimplementing the Wheel: Teaching Compilers with a Small Self-Contained One

论文作者

Berezun, Daniil, Boulytchev, Dmitry

论文摘要

我们基于从头开始实施小型模型语言的小型独立编译器而不是使用其他编译器构造框架的小型自包编译器的想法,以报告一个学期编译器构造课程。该课程围绕着不断发展的语言家庭建立,其表现力和复杂性越来越高,最终由具有一流功能,S-Expressions,模式匹配和垃圾收集的语言加冕。代码生成技术基于符号解释器的概念,该技术允许实现强大的本机代码生成器,但可以实现强大的。我们为课程提供了动力,描述其结构,并根据学生的课后调查报告一些教学结果。

We report on a one-semester compiler construction course based on the idea of implementing a small self-contained compiler for a small model language from scratch, not using other compiler construction frameworks. The course is built around an evolving family of languages with increasing expressiveness and complexity, which finally is crowned by a language with first-class functions, S-expressions, pattern matching, and garbage collection. The code generation technique is based on the idea of symbolic interpreters, which allows to implement a robust albeit not a very efficient native code generator. We give the motivation for the course, describe its structure, and report some results of teaching based on students' post-course surveys.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源