paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Animated Pictures for Slide Presentations: From the Shallows to the Depths of a Domain-Specific Language (Functional Pearl)

面向幻灯片演示的动画图片:从浅层到深层的领域特定语言(函数式珍珠)
ICFP 10(ICFP)2026匹配度 2/10 · 论文主题是嵌入式动画幻灯片 DSL 的设计,讨论深浅嵌入谱系,属于函数式编程/DSL 工程实践。它与用户关注的核心方向(PL 与 AI/LLM 交叉、Agentic 程序静态分析、浮点/贝叶斯程序分析)几乎没有直接关系,也不涉及 AI 或程序分析。引用 0 inbox
Oliver Flatt, Robert Bruce Findler, Matthew Flatt
crossref: 2026-09-10

AI 速览

一句话:提出一种嵌入式动画幻灯片 DSL,统一深浅嵌入,支持自定义动画组合子并检视、调整和重组动画。

本文为幻灯片演示中的动画设计了一种嵌入式领域特定语言(DSL)。该 DSL 程序以两种方式与宿主语言交互:一方面允许用宿主语言函数构建图片和动画,类似浅嵌入;另一方面允许宿主语言反射其构造过程,类似深嵌入。因此,用户既能定义自己的动画组合子,又能检视、调整和重组已有的动画。为展示表达力,作者实现了类似 Keynote 的 Magic Move 操作。论文进一步总结了深浅 DSL 设计的经验:深嵌入与浅嵌入并非互斥,而是同一设计谱系上的不同点;位于两者之间的设计点往往能充分发挥 DSL 的潜力。

问题
如何设计面向幻灯片动画的嵌入式 DSL,使其既具备浅嵌入的易组合性,又具备深嵌入的可检视与可重组能力。
方法
构建一个与宿主语言双向交互的嵌入式动画 DSL:用宿主语言函数构建图片与动画,并允许宿主语言反射其构造过程,从而支持用户定义动画组合子并检视、调整和重组动画。
评估
通过实现类似 Keynote 的 Magic Move 操作来展示 DSL 的表达力,并据此提炼深浅嵌入连续谱上的 DSL 设计经验。
原文摘要(Abstract)

Another DSL for pictures? Seems fishy. But hold fast as we chart a course to an embedded DSL for the domain of slide presentations with animations. Our DSL programs interact with the host language in two ways: by allowing pictures and animations to be built using host-language functions (resembling a shallow embedding), and by allowing host-language reflection on their construction (resembling a deep embedding). As a result, users can define their own animation combinators but still also inspect, adjust, and reassemble animations. To demonstrate our DSL's expressive power, we show how it supports a Keynote-like Magic Move operation. Having made the DSL shipshape, we dive into a lesson learned about deep and shallow DSL design. While deep and shallow may seem like mutually exclusive options, we argue they are actually points on an entire spectrum of possible DSL designs. More importantly, our paper demonstrates that points on the spectrum between deep and shallow are where DSL designs achieve full sail.

链接与引用

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

BibTeX
@article{FlattFF26,
  title = {Animated Pictures for Slide Presentations: From the Shallows to the Depths of a Domain-Specific Language (Functional Pearl)},
  author = {Oliver Flatt and Robert Bruce Findler and Matthew Flatt},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {10},
  number = {ICFP},
  year = {2026},
  doi = {10.1145/3828692}
}