arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2101.09563cs.SE
收藏

Präzi:从基于包到基于调用的依赖网络

Präzi: From Package-based to Call-based Dependency Networks

Joseph Hejderup, Moritz Beller, Konstantinos Triantafyllou, Georgios Gousios

摘要:

Java、JavaScript和Rust等现代程序设计语言通过托管高度相互依赖的软件包(即,可重用库)。研究软件包之间的相互依赖性的标准方法是通过解析清单数据来推断包依赖性网络。这样的网络有助于回答诸如“有多少软件包依赖于具有已知安全问题的软件包?或者“最常用的软件包是什么?".然而,在现有的研究中,一个被忽视的方面是,清单推断的关系不一定检查这些依赖关系在源代码中的实际使用。为了更好地建模包之间的依赖关系,我们开发了Präzi,这是一种结合包的清单和调用图的方法。Präzi在更细粒度的函数级别而不是清单级别构建依赖网络。本文讨论了流行系统程序设计语言Rust的原型Präzi实现。我们使用Präzi在功能级别上描述Rust的包存储库Cratesio,并与基于元数据的网络进行比较研究。我们的结果表明,基于元数据的网络概括了包如何使用其依赖关系。使用Präzi,我们发现包只调用了40%的已解析依赖项,并且对34个案例的手动分析表明,并非所有包都以相同的方式使用依赖项。我们认为,有兴趣了解开发人员或程序如何使用依赖关系的研究人员和从业者应该考虑其上下文-而不是所有已解决的依赖关系的总和。

英文摘要:

Modern programming languages such as Java, JavaScript, and Rust encourage software reuse by hosting diverse and fast-growing repositories of highly interdependent packages (i.e., reusable libraries) for their users. The standard way to study the interdependence between software packages is to infer a package dependency network by parsing manifest data. Such networks help answer questions such as "How many packages have dependencies to packages with known security issues?" or "What are the most used packages?". However, an overlooked aspect in existing studies is that manifest-inferred relationships do not necessarily examine the actual usage of these dependencies in source code. To better model dependencies between packages, we developed Präzi, an approach combining manifests and call graphs of packages. Präzi constructs a dependency network at the more fine-grained function-level, instead of at the manifest level. This paper discusses a prototypical Präzi implementation for the popular system programming language Rust. We use Präzi to characterize Rust's package repository, Cratesio, at the function level and perform a comparative study with metadata-based networks. Our results show that metadata-based networks generalize how packages use their dependencies. Using Präzi, we find packages call only 40% of their resolved dependencies, and that manual analysis of 34 cases reveals that not all packages use a dependency the same way. We argue that researchers and practitioners interested in understanding how developers or programs use dependencies should account for its context -- not the sum of all resolved dependencies.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑