paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Applicative bidirectional programming

应用式双向编程
JFP vol.282018匹配度 2/10 · 论文属于函数式编程与双向变换/DSL,核心是 lens 与语义双向化的桥接,与用户关注的静态分析、LLM/Agent、浮点程序分析或贝叶斯程序分析无直接关联。仅可视为 PL 领域的一般性工作,不涉及 AI 与 PL 的交叉。引用 12 inbox
KAZUTAKA MATSUDA, MENG WANG
crossref: 2026-09-10

AI 速览

一句话:提出应用式高阶双向编程框架,让双向变换能以标准函数式语言中的单向程序编写,并桥接 lens 与语义双向化两种方法。

双向变换由源与视图之间的一对映射组成,视图被修改后需按一定法则更新源。为降低开发与维护成本,双向编程语言让程序从构造上就是双向的。本文提出一个支持应用式与高阶双向编程的框架,允许在标准函数式语言中像写单向程序一样编写双向变换,从而复用传统单向语言已有的语言特性。该框架本质上桥接了双向编程中两种差异很大的方法——lens 框架与 Voigtländer 的语义双向化,形成一种能兼取两者优点的新编程风格。

问题
如何降低双向变换的开发与维护成本,并使双向编程能够复用标准函数式语言的丰富特性?
方法
提出应用式、高阶的双向编程框架,将双向变换写成标准函数式语言中的单向程序,并桥接 lens 框架与 Voigtländer 的语义双向化。
评估
摘要未报告具体的实验评估,主要通过框架设计及对 lens 框架与语义双向化两种方法的融合来论证其可行性与优势。
原文摘要(Abstract)

Abstract A bidirectional transformation is a pair of mappings between source and view data objects, one in each direction. When the view is modified, the source is updated accordingly with respect to some laws. One way to reduce the development and maintenance effort of bidirectional transformations is to have specialized languages in which the resulting programs are bidirectional by construction—giving rise to the paradigm of bidirectional programming. In this paper, we develop a framework for applicative-style and higher-order bidirectional programming, in which we can write bidirectional transformations as unidirectional programs in standard functional languages, opening up access to the bundle of language features previously only available to conventional unidirectional languages. Our framework essentially bridges two very different approaches of bidirectional programming, namely the lens framework and Voigtländer's semantic bidirectionalization, creating a new programming style that is able to obtain benefits from both.

链接与引用

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

BibTeX
@article{paperbot335,
  title = {Applicative bidirectional programming},
  author = {KAZUTAKA MATSUDA and MENG WANG},
  journal = {Journal of Functional Programming},
  volume = {28},
  year = {2018},
  doi = {10.1017/s0956796818000096}
}