Conflict-aware Inference of Python Compatible Runtime Environments with Domain Knowledge Graph
Wei Cheng, Xiangrong Zhu, Wei Hu
摘要
Code sharing and reuse is a widespread use practice in software engineering. Although a vast amount of open-source Python code is accessible on many online platforms, programmers often find it difficult to restore a successful runtime environment. Previous studies validated automatic inference of Python dependencies using pre-built knowledge bases. However, these studies do not cover sufficient knowledge to accurately match the Python code and also ignore the potential conflicts between their inferred dependencies, thus resulting in a low success rate of inference. In this paper, we propose PyCRE, a new approach to automatically inferring Python compatible runtime environments with domain knowledge graph (KG). Specifically, we design a domain-specific ontology for Python third-party packages and construct KGs for over 10,000 popular packages in Python 2 and Python 3. PyCRE discovers candidate libraries by measuring the matching degree between the known libraries and the third-party resources used in target code. For the NP-complete problem of dependency solving, we propose a heuristic graph traversal algorithm to efficiently guarantee the compatibility between packages. PyCRE achieves superior performance on a real-world dataset and efficiently resolves nearly half more import errors than previous methods.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 5 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Compatibility Issues in Deep Learning Systems: Problems and Opportunities 引用了 Restoring Execution Environments of Jupyter Notebooks
- Less is More? An Empirical Study on Configuration Issues in Python PyPI Ecosystem 引用了 Restoring Execution Environments of Jupyter Notebooks
- ModuleGuard: Understanding and Detecting Module Conflicts in Python Ecosystem 引用了 Restoring Execution Environments of Jupyter Notebooks
引用它的顶会 Paper5
- Demystifying Dependency Bugs in Deep Learning StackKaifeng Huang, Bihuan Chen, Susheng Wu, Junming Cao 等FSE 2023 · 20 次引用
- Compatibility Issues in Deep Learning Systems: Problems and OpportunitiesJun Wang, Guanping Xiao, Shuai Zhang, Huashan Lei 等FSE 2023 · 13 次引用
- Automatically Resolving Dependency-Conflict Building Failures via Behavior-Consistent Loosening of Library Version ConstraintsHuiyan Wang, Shuguan Liu, Lingyu Zhang, Chang XuFSE 2023 · 8 次引用
- Less is More? An Empirical Study on Configuration Issues in Python PyPI EcosystemYun Peng, Ruida Hu, Ruoke Wang, Cuiyun Gao 等ICSE 2024 · 5 次引用
- ModuleGuard: Understanding and Detecting Module Conflicts in Python EcosystemRuofan Zhu, Xingyu Wang, Chengwei Liu, Zhengzi Xu 等ICSE 2024 · 1 次引用
它引用的 Paper2
相关 Paper
- Knowledge-Based Environment Dependency Inference for Python ProgramsHongjie Ye, Wei Chen, Wensheng Dou, Guoquan Wu 等ICSE 2022 · 21 次引用
- Fixing dependency errors for Python build reproducibilitySuchita Mukherjee, Abigail Almanza, Cindy Rubio-GonzálezISSTA 2021 · 55 次引用
- Knowledge-Based Version Incompatibility Detection for Deep LearningZhongkai Zhao, Bonan Kou, Mohamed Yilmaz Ibrahim, Muhao Chen 等FSE 2023 · 7 次引用
- How to Pet a Two-Headed Snake? Solving Cross-Repository Compatibility Issues with HeraYifan Xie, Zhouyang Jia, Shanshan Li, Ying Wang 等ASE 2024 · 2 次引用
- smartPip: A Smart Approach to Resolving Python Dependency Conflict IssuesChao Wang, Rongxin Wu, Haohao Song, Jiwu Shu 等ASE 2022 · 15 次引用
