Implementing Multi-stage Languages Using ASTs, Gensym, and Reflection
Implementing Multi-stage Languages Using ASTs, Gensym, and Reflection
复制标题
使用 AST、Gensym 和 Reflection 实现多阶段语言
DOI:
--
复制
发表时间:
2003
期刊:
影响因子:
--
通讯作者:
X. Leroy
中科院分区:
文献类型:
--
作者:
Cristiano Calcagno;Walid Taha;Liwen Huang;X. Leroy
The paper addresses theoretical and practical aspects of implementing multi-stage languages using abstract syntax trees (ASTs), gensym, and reflection. We present an operational account of the correctness of this approach, and report on our experience with a bytecode compiler called MetaOCaml that is based on this strategy. Current performance measurements reveal interesting characteristics of the underlying OCaml compiler, and illustrate why this strategy can be particularly useful for implementing domain-specific languages in a typed, functional setting.