BCaLLM: Call Graph-Guided Python Breaking Change Detection with Large Language Models
Wei Cheng, Chen Shen, Huan Zhang, Yuhan Wu, Jingyue Yang, Wei Hu
Abstract
Software libraries frequently evolve, introducing breaking changes that disrupt client applications. Existing detection approaches primarily target static programming languages or focus on syntactic changes, leaving behavioral breaking changes in dynamic languages such as Python underexplored. This task is particularly challenging due to side effects and call relationships, two critical factors that implicitly alter API behaviors and propagate change impact across library APIs. To address these challenges, we propose a generalized taxonomy of function API breaking changes. Grounded in Hyrum’s Law, our taxonomy is defined from the client’s perspective of observable behaviors and unifies both syntactic and behavioral categories in a multi-label formulation. Furthermore, we present BCaLLM, a novel framework to detect fine-grained breaking changes in Python packages by leveraging call graphs and large language models (LLMs). BCaLLM constructs a fused call graph to scope change impact, prunes compatible APIs and code context via memory-based heuristics, and employs an LLM to detect specific breaking changes. We construct PyBCEval, a manually annotated benchmark of 588 APIs from 27 version pairs of 19 widely used Python packages. Experiments with diverse LLMs show that BCaLLM outperforms text-based baselines by 3.71%–10.16% and LLM-based baselines by 1.60%–4.83% in F1-score.
Ask about this paper
Ask your agent about it.
Lune has read the top-tier papers around this one, so every answer names the papers it rests on.
Your agent calls
Lunesearch_papers
Free to start. No credit card required.
Terminal
Install the CLIlune papers get 792900de-e044-4a89-85a4-bd5ba147888eRelated papers
- Pig: Leveraging Large Language Models for Python Library MigrationsMiryeong Kang, Wonseok Oh, Gabin An, Hakjoo OhFSE 2026
- LLMs Meet Library Evolution: Evaluating Deprecated API Usage in LLM-Based Code CompletionChong Wang, Kaifeng Huang, Jian Zhang, Yebo Feng et al.ICSE 2025 · 3 citations
- Demystifying and Detecting Misuses of Deep Learning APIsMoshi Wei, Nima Shiri Harzevili, Yuekai Huang, Jinqiu Yang et al.ICSE 2024 · 13 citations
- Cutting the Gordian Knot: Detecting Malicious PyPI Packages via a Knowledge-Mining FrameworkWenbo Guo, Chengwei Liu, Ming Kang, Yiran Zhang et al.USENIX Security 2026 · 1 citation
- An Empirical Study of Python Library Migration Using Large Language ModelsMohayeminul Islam, Ajay Kumar Jha, May Mahmoud, Ildar Akhmetov et al.ASE 2025 · 2 citations
