paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Exploring the architectural impact of possible dependencies in Python software

探索 Python 软件中 possible dependencies 的架构影响
ASE Proceedings of the 35th IEEE/ACM International Conference on Automated Software Engineering2020匹配度 3/10 · 论文使用类型推断对 Python 的 possible dependencies 做静态分析,属于程序分析范畴,但其核心问题是动态语言缺失依赖对软件架构质量(耦合、可维护性、co-change)的实证影响,与用户关注的“PL→AI(ML/Agentic 程序静态分析)”“AI→PL(LLM 改进静态分析)”“浮点/贝叶斯程序分析”均无直接交集。引用 13 inbox
Wuxia Jin, Yuanfang Cai, Rick Kazman, Gang Zhang, Qinghua Zheng, Ting Liu
crossref: 2026-09-12

AI 速览

一句话:通过类型推断显式化 Python 的 possible dependencies,实证表明其对架构质量的影响超过显式依赖。

动态类型语言(如 Python)允许省略显式类型引用,使部分句法依赖在源码中不可见,作者称之为 possible dependencies。现有架构分析与工具通常忽略这些依赖,其缺失对架构分析的影响尚不清楚。论文对 105 个 Python 项目开展实证研究,用类型推断显式化 possible dependencies。结果显示:文件级 possible dependencies 至少占全部文件级依赖的 27.93%,并形成与仅显式依赖不同的结构(平均差异 30.71%);加入后共变关系捕捉的精确率提升 0.52%~14.18%、召回率提升 31.73%~39.12%、F1 提升 22.13%~32.09%;涉及 possible dependencies 的文件平均多影响 28% 的文件和 42% 的架构子空间依赖,多消耗 32% 维护工作量。现有工具因此高估了这类系统的模块化程度。

问题
动态类型语言缺少显式类型引用,导致 possible dependencies 在源码中不可见;现有架构分析与工具未考虑这些依赖,其影响程度未知。
方法
对 105 个 Python 项目进行实证研究,利用类型推断技术显式化 possible dependencies,并比较其对依赖结构、共变关系、架构子空间和维护工作量的影响。
评估
通过 105 个 Python 项目的定量分析,评估文件级依赖占比、依赖结构差异、共变关系捕捉指标、影响范围与维护成本。
原文摘要(Abstract)

Dependencies among software entities are the basis for many software analytic research and architecture analysis tools. Dynamically typed languages, such as Python, JavaScript and Ruby, tolerate the lack of explicit type references, making certain syntactic dependencies indiscernible in source code. We call these possible dependencies, in contrast with the explicit dependencies that are directly referenced in source code. Type inference techniques have been widely studied and applied, but existing architecture analytic research and tools have not taken possible dependencies into consideration. The fundamental question is, to what extent will these missing possible dependencies impact the architecture analysis? To answer this question, we conducted an empirical study with 105 Python projects, using type inference techniques to manifest possible dependencies. Our study revealed that the architectural impact of possible dependencies is substantial---higher than that of explicit dependencies: (1) file-level possible dependencies account for at least 27.93% of all file-level dependencies, and create different dependency structures than that of explicit dependencies only, with an average difference of 30.71%; (2) adding possible dependencies significantly improves the precision (0.52%~14.18%), recall(31.73%~39.12%), and F1 scores (22.13%~32.09%) of capturing co-change relations; (3) on average, a file involved in possible dependencies influences 28% more files and 42% more dependencies within architectural sub-spaces than a file involved in just explicit dependencies; (4) on average, a file involved in possible dependencies consumes 32% more maintenance effort. Consequently, maintainability scores reported by existing tools make a system written in these dynamic languages appear to be better modularized than it actually is. This evidence strongly suggests that possible dependencies have a more significant impact than explicit dependencies on architecture quality, that architecture analysis and tools should assess and even emphasize the architectural impact of possible dependencies due to dynamic typing.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot5976,
  title = {Exploring the architectural impact of possible dependencies in Python software},
  author = {Wuxia Jin and Yuanfang Cai and Rick Kazman and Gang Zhang and Qinghua Zheng and Ting Liu},
  booktitle = {ASE},
  year = {2020},
  doi = {10.1145/3324884.3416619}
}