paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Empirical Study of Programming to an Interface

面向接口编程的实证研究
ASE 2019 34th IEEE/ACM International Conference on Automated Software Engineering (ASE)2019匹配度 1/10 · 该论文是对 Java 项目“面向接口编程”原则的软件工程实证研究,以共同变更度量依赖降低效果,属于面向对象设计原则的经验研究。它与用户关注的方向(PL 与 LLM/Agent 的交叉、静态分析在 ML/Agent 系统中的应用、浮点程序分析、贝叶斯程序分析)均无交集,也不涉及形式化方法或 LLM 工具。引用 1 inbox
Benoit Verhaeghe, Christopher Fuhrman, Latifa Guerrouj, Nicolas Anquetil, Stephane Ducasse
crossref: 2026-09-12

AI 速览

一句话:通过对126个GitHub Java项目的实证分析,以共同变更为指标检验面向接口编程能否降低依赖。

面向接口编程(programming to an interface, PTI)是面向对象软件开发中的常见建议,预期可带来抽象简化、降低对实现的依赖并提高灵活性。然而接口不可变、过度类层次可能增加复杂度,以及“推测性泛化”代码坏味等问题,使PTI的实际收益需要实证检验。为推进对PTI的经验认识,作者对GitHub上126个Java项目开展实证研究,重点以共同变更(cochange)为度量,评估PTI在降低依赖方面的收益。摘要未报告具体量化结果,但该研究旨在从大规模项目数据中检验PTI的依赖降低假设。

问题
PTI被广泛推荐,但其降低依赖等收益缺乏大规模实证证据,且存在接口不可变、类层次过深和推测性泛化等风险。
方法
对GitHub上126个Java项目进行实证分析,以共同变更(cochange)为指标度量PTI带来的依赖降低效益。
评估
通过分析126个Java项目的cochange数据来评估PTI与依赖降低的关系;摘要未给出具体量化结果。
原文摘要(Abstract)

A popular recommendation to programmers in object-oriented software is to "program to an interface, not an implementation" (PTI). Expected benefits include increased simplicity from abstraction, decreased dependency on implementations, and higher flexibility. Yet, interfaces must be immutable, excessive class hierarchies can be a form of complexity, and "speculative generality" is a known code smell. To advance the empirical knowledge of PTI, we conducted an empirical investigation that involves 126 Java projects on GitHub, aiming to measuring the decreased dependency benefits (in terms of cochange).

链接与引用

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

BibTeX
@inproceedings{paperbot5283,
  title = {Empirical Study of Programming to an Interface},
  author = {Benoit Verhaeghe and Christopher Fuhrman and Latifa Guerrouj and Nicolas Anquetil and Stephane Ducasse},
  booktitle = {ASE},
  year = {2019},
  doi = {10.1109/ase.2019.00083}
}