Co-Evolution of Types and Dependencies: Towards Repository-Level Type Inference for Python Code
Technology Center of Software Engineering, Institute of Software, Chinese Academy of Sciences(中国科学院软件研究所软件工程中心);Key Laboratory of System Software (Chinese Academy of Sciences), Institute of Software, Chinese Academy of Sciences(中国科学院软件研究所系统软件重点实验室)
Shuo Sun, Shixin Zhang, Jiwei Yan, Jun Yan, Jian Zhang
Python's dynamic typing mechanism, while promoting flexibility, is a significant source of runtime type errors that plague large-scale software, which inspires the automatic type inference techniques. Existing type inference tools have achieved advances in type inference within isolated code snippets. However, repository-level type inference remains a significant challenge, primarily due to the complex inter-procedural dependencies that are difficult to model and resolve. To fill this gap, we present \methodName, a novel approach based on LLMs that achieves repository-level type inference through the co-evolution of types and dependencies. \methodName~constructs an Entity Dependency Graph (EDG) to model the objects and type dependencies across the repository. During the inference process, it iteratively refines types and dependencies in EDG for accurate type inference. Our key innovations are: (1) an EDG model designed to capture repository-level type dependencies; (2) an iterative type inference approach where types and dependencies co-evolve in each iteration; and (3) a type-checker-in-the-loop strategy that validates and corrects inferences on-the-fly, thereby reducing error propagation. When evaluated on 12 complex Python repositories, \methodName~significantly outperformed prior works, achieving a \textit{TypeSim} score of 0.89 and a \textit{TypeExact} score of 0.84, representing a 27\% and 40\% relative improvement over the strongest baseline. More importantly, \methodName~removed new type errors introduced by the tool by 92.7\%. This demonstrates a significant leap towards automated, reliable type annotation for real-world Python development.
Evaluating Package-Level Scoping Strategies for Repository-Level Code Completion in Pharo
Univ. Lille, Inria, CNRS, Centrale Lille, UMR 9189 CRIStAL(里尔大学、法国国家信息与自动化研究所、法国国家科学研究中心、中央里尔学院、CRIStAL实验室);CIRAD, UMR SENS(法国农业研究国际合作中心);CNRS, University of Bordeaux, Bordeaux INP, LaBRI, UMR5800(法国国家科学研究中心、波尔多大学、波尔多理工学院、LaBRI实验室)
The Maven Dependency Graph: a Temporal Graph-based Representation of Maven Central
Maven Central Repository提供了一个非凡的数据源,可以理解Java应用程序中的复杂架构和演化现象。截至2018年9月6日,该存储库包括280万个工件(用基于JVM的语言实现的编译代码),每个工件都具有元数据的特征,例如确切的版本,上传日期和对其他工件的依赖关系列表。今天,想要分析Maven工件及其依赖关系的完整生态系统的人面临着两个关键挑战:(i)这是一个巨大的数据集;(ii)工件之间的依赖关系没有显式建模,无法查询。在本文中,我们提出了Maven依赖图。这个开放的源数据集提供了两个贡献:2018年9月6日拍摄的整个Maven Central的快照,存储在一个图形数据库中,我们在其中显式地建模所有依赖关系;一个开源基础设施来查询这个巨大的数据集。
PyGress: Tool for Analyzing the Progression of Code Proficiency in Python OSS Projects
Faculty of Information and Communication Technology, Mahidol University(玛希隆大学信息与通信技术学院);Graduate School of Information Science and Technology, The University of Osaka(大阪大学信息科学技术研究生院);Graduate School of Information Science, Nara Institute of Science and Technology(奈良先端科学技术大学院大学信息科学研究生院)
The Stackage Repository: An Exploratory Study of its Evolution
Escuela de Ingeniería, Universidad Católica del Norte, Chile(北天主教学工工程学院);Pragmatics Lab(语用学实验室);Systems and Computing Engineering Department, Universidad de los Andes, Colombia(安第斯大学系统计算工程系)
DependEval: Benchmarking LLMs for Repository Dependency Understanding
Nanyang Technological University(南洋理工大学);Tsinghua University(清华大学);Beihang University(北京航空航天大学);ShanghaiTech University(上海科技大学);The University of Hong Kong(香港大学)
Dataflow-Guided Retrieval Augmentation for Repository-Level Code Completion
Nanjing University(南京大学);State Key Laboratory for Novel Software Technology, Nanjing University(南京大学计算机软件新技术国家重点实验室);National Institute of Healthcare Data Science, Nanjing University(南京大学国家卫生数据科学研究院)