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

可扩展系统元编程语言的设计与实现

The Design and Implementation of an Extensible System Meta-Programming Language

Ronie Salgado

AI总结:

针对系统编程语言编译流水线封闭、难以元编程和扩展的问题,本文提出将程序定义作为脚本并通过元对象协议暴露完整编译流水线,且以 Sysmel 的自举自编译实现验证可行性。

摘要:

系统编程语言通常以线性流水线过程进行编译,这对最终用户而言是完全不透明且孤立的。这限制了在同一语言和环境中执行元编程的可能性,也限制了最终用户对编译器本身的可扩展性。我们提出一种新颖的编译过程重定义,将程序定义解释为脚本。该求值在一个完整编译流水线得以实现的环境中执行,并通过元对象协议向用户公开;该协议构成了编程语言自身元循环定义与实现的基础。我们通过引导实现 Sysmel 的自编译实现来证明该方法的可行性,Sysmel 是一种受 Smalltalk 和 C++ 启发的静态与动态类型编程语言。

英文摘要:

System programming languages are typically compiled in a linear pipeline process, which is a completely opaque and isolated to end-users. This limits the possibilities of performing meta-programming in the same language and environment, and the extensibility of the compiler itself by end-users. We propose a novel redefinition of the compilation process in terms of interpreting the program definition as a script. This evaluation is performed in an environment where the full compilation pipeline is implemented and exposed to the user via a meta-object protocol, which forms the basis for a meta-circular definition and implementation of the programming language itself. We demonstrate the feasibility of this approach by bootstrapping a self-compiling implementation of Sysmel, a static and dynamic typed Smalltalk and C++ inspired programming language.

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

↑