paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Bidirectional Object-Oriented Programming: Towards Programmatic and Direct Manipulation of Objects

双向面向对象编程:迈向对象的程序化与直接操纵
OOPSLA 7(OOPSLA1)2023匹配度 2/10 · 论文属于双向面向对象语言设计与形式语义,关注对象程序化与直接操纵,与用户核心方向(静态分析、LLM/Agent 与 PL 交叉、浮点程序分析、贝叶斯程序分析)无直接关联;虽涉及形式语义和工具实现,但任务域不同。引用 9 inbox
Xing Zhang, Guanchen Guo, Xiao He, Zhenjiang Hu
crossref: 2026-09-10

AI 速览

一句话:提出首个支持对象程序化与直接操纵的双向面向对象语言,并实现 BiOOP 工具。

许多双向编程语言主要基于函数式或关系式范式,面向对象语言的双向化研究仍很缺乏。本文提出首个双向面向对象语言,在具有标准前向求值语义的核心面向对象语言上,为类继承层次和引用扩展了后向更新语义,并形式证明了当输出被一致修改时双向求值满足往返性质。作者实现了 BiOOP 工具,用双向 GUI 设计生成 HTML 文档,并通过复现 Java Swing 教程中的十个经典面向对象应用和 GitHub 上的一个大型项目来评估表达力与有效性。结果显示,针对生成 HTML 网页的面向对象程序,直接操纵编程的响应时间对开发者可接受。

问题
现有双向编程语言多基于函数式或关系式范式,缺少对实践中更流行的面向对象语言的双向化支持,尤其难以处理类继承与引用。
方法
作者扩展核心面向对象语言的前向求值语义,为类继承层次和引用定义后向更新语义,并形式证明一致修改下满足往返性质;实现 BiOOP 工具支持双向 GUI 设计与 HTML 生成。
评估
通过复现 Java Swing 教程的十个经典应用与一个 GitHub 大型项目,评估 BiOOP 的表达力和有效性,并测量直接操纵编程的响应时间。
原文摘要(Abstract)

Many bidirectional programming languages, which are mainly functional and relational, have been designed to support writing programs that run in both forward and backward directions. Nevertheless, there is little study on the bidirectionalization of object-oriented languages that are more popular in practice. This paper presents the first bidirectional object-oriented language that supports programmatic and direct manipulation of objects. Specifically, we carefully extend a core object-oriented language, which has a standard forward evaluation semantics, with backward updating semantics for class inheritance hierarchies and references. We formally prove that the bidirectional evaluation semantics satisfies the round-tripping properties if the output is altered consistently. To validate the utility of our approach, we have developed a tool called BiOOP for generating HTML documents through bidirectional GUI design. We evaluate the expressiveness and effectiveness of BiOOP for HTML webpage development by reproducing ten classic object-oriented applications from a Java Swing tutorial and one large project from GitHub. The experimental results show the response time of direct manipulation programming on object-oriented programs that produce HTML webpages is acceptable for developers.

链接与引用

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

BibTeX
@article{paperbot2030,
  title = {Bidirectional Object-Oriented Programming: Towards Programmatic and Direct Manipulation of Objects},
  author = {Xing Zhang and Guanchen Guo and Xiao He and Zhenjiang Hu},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {7},
  number = {OOPSLA1},
  year = {2023},
  doi = {10.1145/3586035}
}