paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Towards Effective Static Type-Error Detection for Python

面向高效的 Python 静态类型错误检测
ASE Proceedings of the 39th IEEE/ACM International Conference on Automated Software Engineering2024匹配度 4/10 · 论文聚焦通用 Python 静态类型错误检测与工具实现,属于静态分析但未涉及用户核心关注的 ML/Agentic 程序静态分析、LLM 与静态分析/形式化验证结合、浮点程序分析或贝叶斯程序分析。其经验研究和工具评估方法可能有一定借鉴,但不在当前研究方向核心。引用 6 inbox
Wonseok Oh, Hakjoo Oh
crossref: 2026-09-12dblp: 2026-09-12

AI 速览

一句话:通过实证研究提炼四项关键静态分析特性并实现工具 Pyinder,在 68 个真实类型错误中检出 34 个,远超现有工具合计的 16 个。

Python 的动态类型特性使静态类型错误检测在实践中效果不佳。本文是一篇经验论文,作者首先从 20 个开源项目中收集并分析了 68 个真实类型错误,通过实证研究归纳出对有效检测 Python 类型错误至关重要的四项静态分析特性。基于这些洞见,作者设计并实现了静态类型错误检测工具 Pyinder。评估结果显示,Pyinder 成功检测出 68 个错误中的 34 个,而现有类型分析工具合计仅能检测出 16 个。论文还讨论了 Pyinder 未能检测出的其余 34 个错误,为 Python 类型分析工具的未来方向提供了见解,并展示了 Pyinder 能够在近期 Python 项目中发掘此前未知的错误。

问题
现有的 Python 静态类型分析工具在实际开源项目上检出率低,缺乏对实践有效的静态分析特性的系统认识。
方法
从 20 个开源项目中收集并分析 68 个真实类型错误,据此提炼出四项关键静态分析特性,并设计实现了静态类型错误检测工具 Pyinder。
评估
在收集的 68 个真实类型错误上与现有类型分析工具进行检出数量对比(Pyinder 检出 34 个,现有工具合计仅 16 个),并展示其在近期 Python 项目中发现未知错误的能力。
原文摘要(Abstract)

In this experience paper, we design, implement, and evaluate a new static type-error detection tool for Python. To build a practical tool, we first collected and analyzed 68 real-world type errors gathered from 20 open-source projects. This empirical investigation revealed four key static-analysis features that are crucial for the effective detection of Python type errors in practice. Utilizing these insights, we present a tool called Pyinder, which can successfully detect 34 out of the 68 bugs, compared to existing type analysis tools that collectively detect only 16 bugs. We also discuss the remaining 34 bugs that Pyinder failed to detect, offering insights into future directions for Python type analysis tools. Lastly, we show that Pyinder can uncover previously unknown bugs in recent Python projects.

链接与引用

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

BibTeX
@inproceedings{OhO24,
  title = {Towards Effective Static Type-Error Detection for Python},
  author = {Wonseok Oh and Hakjoo Oh},
  booktitle = {ASE},
  year = {2024},
  doi = {10.1145/3691620.3695545}
}