Exploring the Architectural Impact of Possible Dependencies in Python Software
Wuxia Jin, Yuanfang Cai, Rick Kazman, Gang Zhang, Qinghua Zheng, Ting Liu
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.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 31a56cc7-2929-42f7-96cc-9af125bc0bbdCited by top-tier papers2
- StateFormer: fine-grained type recovery from binaries using generative state modelingKexin Pei, Jonas Guan, Matthew Broughton, Zhongtian Chen et al.FSE 2021 · 53 citations
- PairSmell: A Novel Perspective Inspecting Software Modular StructureChenxing Zhong, Daniel Feitosa, Paris Avgeriou, Huang Huang et al.ICSE 2025
Related papers
- PyAnalyzer: An Effective and Practical Approach for Dependency Extraction from Python CodeWuxia Jin, Shuo Xu, Dawei Chen, Jiajun He et al.ICSE 2024 · 4 citations
- The evolution of type annotations in python: an empirical studyLuca Di Grazia, Michael PradelFSE 2022 · 29 citations
- DLInfer: Deep Learning with Static Slicing for Python Type InferenceYanyan Yan, Yang Feng, Hongcheng Fan, Baowen XuICSE 2023 · 9 citations
- PyTER: effective program repair for Python type errorsWonseok Oh, Hakjoo OhFSE 2022 · 22 citations
- Co-evolution of Types and Dependencies: Towards Repository-Level Type Inference for Python CodeShuo Sun, Shixin Zhang, Jiwei Yan, Jun Yan et al.FSE 2026
