arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2407.08089cs.PLcs.SE

使用可扩展静态类型编程语言Stella教授类型系统实现

Teaching Type Systems Implementation with Stella, an Extensible Statically Typed Programming Language

Abdelrahman Abounegm, Nikolai Kudasov, Alexey Stepanov

AI总结:

本研究介绍了一门围绕可扩展静态类型语言Stella开设的半学期类型系统实现课程,依托BNF Converter提供多语言模板,覆盖多项类型系统特性,还汇报了相关教学成果。

摘要:

我们介绍了一门以编程语言类型系统实现为核心的半学期课程。该课程要求学生具备经典编译器构造的基础知识,尤其是抽象语法表示、Visitor模式和语法分析相关内容。课程围绕核心极简、带有一系列小型扩展的Stella语言展开,涵盖代数数据类型、引用、异常、穷举模式匹配、子类型、递归类型、全称多态和类型重构内容。学生还可选做解释器和编译器的实现任务。为加快开发速度并支持多种实现语言,我们采用BNF Converter工具,并为学生提供多语言模板。最后,我们基于学生的学习成果汇报了部分教学效果。

英文摘要:

We report on a half-semester course focused around implementation of type systems in programming languages. The course assumes basics of classical compiler construction, in particular, the abstract syntax representation, the Visitor pattern, and parsing. The course is built around a language Stella with a minimalistic core and a set of small extensions, covering algebraic data types, references, exceptions, exhaustive pattern matching, subtyping, recursive types, universal polymorphism, and type reconstruction. Optionally, an implementation of an interpreter and a compiler is offered to the students. To facilitate fast development and variety of implementation languages we rely on the BNF Converter tool and provide templates for the students in multiple languages. Finally, we report some results of teaching based on students' achievements.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑