paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Complexity-guided container replacement synthesis

复杂度引导的容器替换合成
OOPSLA 6(OOPSLA1)2022匹配度 2/10 · 该论文属于传统程序分析与程序合成,用于容器替换和运行时性能优化,未涉及 LLM/Agentic 程序、浮点程序分析、贝叶斯程序分析或 AI 与 PL 的交叉。虽然使用静态分析,但与用户当前核心研究问题关联很弱。引用 11 inbox
Chengpeng Wang, Peisen Yao, Wensheng Tang, Qingkai Shi, Charles Zhang
crossref: 2026-09-10

AI 速览

一句话:提出 Cres,结合静态分析与复杂度引导的合成,为程序中每个容器方法调用自动选择时间复杂度更低的容器实现,在保持行为的同时提升运行性能。

容器(如列表、映射)是现代编程语言中的基础数据结构,但容器类型选择不当会带来严重的性能问题。本文提出 Cres,一种自动合成容器替换以提升运行时性能的方法。其合成算法与静态分析技术协同工作:静态分析识别容器在程序中的使用方式,合成算法则针对每个容器方法调用,尝试选择一个时间复杂度更低的方法实现。该方法能在保持程序行为不变的前提下,有效抓住降低执行时间的机会,且对一般输入同样适用。作者实现了 Cres 并在 12 个真实 Java 项目上进行评估,结果表明 Cres 能在 14 分钟内为总计 384.2 KLoC 的项目合成容器替换,发现六类容器替换,平均获得 8.1% 的性能提升。

问题
程序中容器类型选择不当会导致显著的性能开销,而人工发现并替换为更合适的容器实现既困难又容易出错。
方法
Cres 将静态分析与合成算法结合,先分析容器在程序中的使用方式,再为每个容器方法调用选择一个时间复杂度更低的实现,同时保证程序行为不变。
评估
在 12 个真实 Java 项目(共 384.2 KLoC)上评估,14 分钟内完成替换合成,发现六类容器替换,平均性能提升 8.1%。
原文摘要(Abstract)

Containers, such as lists and maps, are fundamental data structures in modern programming languages. However, improper choice of container types may lead to significant performance issues. This paper presents Cres, an approach that automatically synthesizes container replacements to improve runtime performance. The synthesis algorithm works with static analysis techniques to identify how containers are utilized in the program, and attempts to select a method with lower time complexity for each container method call. Our approach can preserve program behavior and seize the opportunity of reducing execution time effectively for general inputs. We implement Cres and evaluate it on 12 real-world Java projects. It is shown that Cres synthesizes container replacements for the projects with 384.2 KLoC in 14 minutes and discovers six categories of container replacements, which can achieve an average performance improvement of 8.1%.

链接与引用

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

BibTeX
@article{paperbot1521,
  title = {Complexity-guided container replacement synthesis},
  author = {Chengpeng Wang and Peisen Yao and Wensheng Tang and Qingkai Shi and Charles Zhang},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {6},
  number = {OOPSLA1},
  year = {2022},
  doi = {10.1145/3527312}
}