重新实现轮子:用一个小的自包含的轮子教跑步者
Reimplementing the Wheel: Teaching Compilers with a Small Self-Contained One
摘要:
我们报告一个学期的编译器建设课程的基础上实现一个小的自包含的编译器的小模型语言从头开始的想法,而不是使用其他编译器建设框架。该课程是围绕一个不断发展的语言家族建立的,其表现力和复杂性不断增加,最终被一个具有一流函数,S表达式,模式匹配和垃圾回收的语言所加冕。代码生成技术是基于符号解释器的思想,它允许实现一个健壮的,虽然不是一个非常有效的本地代码生成器。我们给出了课程的动机,描述了它的结构,并根据学生的课后调查报告了一些教学结果。
英文摘要:
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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。