paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Herbarium Racketensis: a stroll through the woods (functional pearl)

Herbarium Racketensis:林间漫步(函数式珍珠)
ICFP 1(ICFP)2017匹配度 1/10 · 该论文是函数式编程领域的 functional pearl,讨论用 Racket 快速实现 Lindenmayer 系统 DSL,与用户关注的静态分析、ML/Agentic 程序、浮点程序分析、贝叶斯程序分析及 LLM 交叉方向均无直接关联。引用 1 inbox
Vincent St-Amour, Daniel Feltey, Spencer P. Florence, Shu-Hung You, Robert Bruce Findler
dblp: 2026-09-10crossref: 2026-09-10

AI 速览

一句话:通过用 Racket 实现 Lindenmayer 系统 DSL,展示 Racket 作为快速构建领域特定语言的抽象平台的能力。

本文是一篇函数式珍珠(functional pearl),围绕如何构建“终极抽象”的抽象平台展开。作者以理论植物学中的计算模型 Lindenmayer 系统(L-system)为案例,在 Racket 中逐步实现一个用于描述与生成 L-system 的领域特定语言(DSL)。文章并不侧重形式化定义或性能评测,而是通过可读的实现走查,展示 Racket 的语言构造能力如何让 DSL 的定义、扩展与嵌入变得直接而灵活。其核心论点是:正如 DSL 是终极抽象,Racket 可作为“抽象之抽象”的平台,帮助语言设计者快速构建新的 DSL。该珍珠以教程式叙述说明此设计理念,并为类似 DSL 实现提供示例。

问题
如何选择抽象来快速实现领域特定语言(DSL),以及 Racket 在构建这类“终极抽象”时能提供怎样的支持。
方法
以 Lindenmayer 系统为案例,在 Racket 中逐步实现一个 L-system DSL,并进行实现走查与讲解。
评估
通过示例性实现展示 Racket 构建 DSL 的可行性与表达力;摘要未报告定量评估或性能基准。
原文摘要(Abstract)

Domain-specific languages are the ultimate abstraction, dixit Paul Hudak. But what abstraction should we use to build such ultimate abstractions? What is sauce for the goose is sauce for the gander: a language, of course! Racket is the ultimate abstraction-abstraction, a platform for quickly and easily building new ultimate abstractions. This pearl demonstrates Racket's power by taking a leisurely walk through the implementation of a DSL for Lindenmayer systems, the computational model par excellence of theoretical botany.

链接与引用

DOI 原文 · PDF(开放获取) · DBLP

BibTeX
@article{St-AmourFFYF17,
  title = {Herbarium Racketensis: a stroll through the woods (functional pearl)},
  author = {Vincent St-Amour and Daniel Feltey and Spencer P. Florence and Shu-Hung You and Robert Bruce Findler},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {1},
  number = {ICFP},
  year = {2017},
  doi = {10.1145/3110245}
}