Facilitating program comprehension with call graph multilevel hierarchical abstractions

Facilitating program comprehension with call graph multilevel hierarchical abstractions
复制标题

DOI:
10.1016/j.jss.2021.110945
复制
发表时间:
2021
期刊:
J. Syst. Softw.
影响因子:
--
通讯作者:
Rakan Alanazi;Gharib Gharibi;Yugyung Lee
Rakan Alanazi;Gharib Gharibi;Yugyung Lee
中科院分区:
其他
文献类型:
--
作者:
Rakan Alanazi;Gharib Gharibi;Yugyung Lee

文献摘要

相似文献

程序理解是软件维护和发展的基本前提。为了理解软件结构,开发人员经常阅读它的代码库或文档——如果可用且没有过时的话。这两种方法都是乏味、耗时和低效的。最近出现了一些方法和工具来促进程序的理解,例如静态调用图,它将软件系统的结构描述为一个有向图。然而,调用图的使用仍然面临两个主要挑战:(1)大型调用图可能难以理解,(2)它们仅限于单个粒度级别,例如函数调用。在本文中,我们引入了一种粗化技术来创建调用图的多级、分层表示。具体来说,我们提出了一种执行路径的分层聚类方法,以便在不同粒度级别和不同软件单元(包括包、类和函数)上可视化调用图。我们的首要目标是帮助软件开发人员理解软件系统,从高层次的抽象到低层次的实现,并能够单独关注系统的特定部分。为了验证我们的方法和工具支持,我们对来自11个以上行业的18名软件工程师进行了用户研究,他们使用我们的系统执行了几项任务,然后回答了一项调查。结果表明,该方法可以自动构造调用图的多级抽象,并将其分层聚类为有意义的抽象。该工具的视频演示可在https://rakanalanazi.github.io/CodEx/上获得。
Program comprehension is a fundamental prerequisite for software maintenance and evolution. In order to understand a software structure, developers often read its codebase or documentation—if available and not outdated. Both approaches are tedious, time-consuming, and inefficient. Recent methods and tools have emerged to facilitate program comprehension, such as static call graphs, which depict the structure of the software system as a directed graph. However, the usage of call graphs still faces two main challenges: (1) large call graphs can be difficult to understand, and (2) they are limited to a single level of granularity, such as function calls. In this paper, we introduce a coarsening technique to create multi-level, hierarchical representations of the call graph. Specifically, we propose a hierarchical clustering approach of the execution paths to visualize the call graph at different granularity levels and for different software units, including packages, classes, and functions. Our overarching goal is to assist software developers in understanding the software system from a high-level of abstraction to the low-level of implementation with the ability to focus on particular parts of the system individually. To validate our approach and tool support, we conducted a user study of 18 software engineers from more than 11 industries who carried out several tasks using our system and then answered a survey. The results demonstrate that our approach is feasible to automatically construct multi-level abstractions of the call graph and hierarchically cluster them into meaningful abstractions. A video demo of the tool is available at https://rakanalanazi.github.io/CodEx/.