一句话:提出模块化调用图构建架构 Unimocg,将类型信息计算与调用解析解耦,统一支持多种语言特性并兼容十种调用图算法。
传统调用图构建算法把可能的运行时类型计算与(虚拟)调用解析纠缠在一起,这种设计既难以支持复杂的语言特性与 API,也难以在精度、可靠性与可扩展性之间做出系统性权衡,还阻碍了依赖类型信息的精确下游分析。本文提出 Unimocg:一种模块化的调用图构建架构,将类型信息计算与调用解析解耦。借助模块化设计,Unimocg 能把各类调用图算法与算法无关的模块组合起来,以支持单个语言特性,且这些模块无需额外代价即可达到所选算法的精度;其他分析也能以完整精度复用调用图构建所得的类型信息。作者据此构建了一个由可复用模块组成的调用图算法框架,目前支持来自差异极大算法族的十种算法,如 CHA、RTA、XTA 与 k-l-CFA。实验表明这些算法在保持一致可靠性的同时未牺牲精度或性能,并展示了 Unimocg 如何改进不可变性分析。
Traditional call-graph construction algorithms conflate the computation of possible runtime types with the actual resolution of (virtual) calls. This tangled design impedes supporting complex language features and APIs and making systematic trade-offs between precision, soundness, and scalability. It also impedes implementation of precise downstream analyses that rely on type information. To address the problem, we propose Unimocg, a modular architecture for call-graph construction that decouples the computation of type information from resolving calls. Due to its modular design, Unimocg can combine a wide range of different call-graph algorithms with algorithm-agnostic modules to support individual language features. Moreover, these modules operate at the same precision as the chosen call-graph algorithm with no further effort. Additionally, Unimocg allows other analyses to easily reuse type information from the call-graph construction at full precision. We demonstrate how Unimocg enables a framework of call-graph algorithms with different precision, soundness, and scalability trade-offs from reusable modules. Unimocg currently supports ten call-graph algorithms from vastly different families, such as CHA, RTA, XTA, and k-l-CFA. These algorithms show consistent soundness without sacrificing precision or performance. We also show how an immutability analysis is improved using Unimocg.
@inproceedings{paperbot8461,
title = {Unimocg: Modular Call-Graph Algorithms for Consistent Handling of Language Features},
author = {Dominik Helm and Tobias Roth and Sven Keidel and Michael Reif and Mira Mezini},
booktitle = {ISSTA},
year = {2024},
doi = {10.1145/3650212.3652109}
}