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

使用抽象内存模型的大型应用程序的聚焦动态切片

Focused Dynamic Slicing for Large Applications using an Abstract Memory-Model

Alexis Soifer, Diego Garbervetsky, Victor Braberman, Sebastian Uchitel

摘要:

动态切片技术计算程序依赖性,以找到在特定执行的程序点上影响变量值的所有语句。尽管它们有许多潜在的用途,但它们的适用性受到限制,因为它们通常不能扩展到小型应用程序之外。我们认为,这种限制的核心是使用内存引用来识别数据依赖关系。特别地,与存储器引用一起工作阻碍了对待切片的代码的不同处理(例如,用户感兴趣的类)与代码的其余部分(包括库和框架)分离。对未关注的代码执行粗粒度分析的能力可以提供性能增益,并可能成为实现可伸缩性的一条途径。在本文中,我们提出了一种新的方法,完全取代内存引用注册和处理与内存分析模型,与程序符号(即,条款)。事实上,这种方法支持不对不属于要切片的代码的代码进行插装(因此不生成任何跟踪)的替代方案。我们报告了一个用于C\#的抽象动态切片器\textit{DynAbs}的实现,以及一个评估,该评估显示了Roslyn和Powershell(可以在GitHub中找到的两个最大和最现代的C\#应用程序)的大小和相关部分可以在最多几分钟内对其测试用例断言进行切片。我们还展示了如何减少代码切片的重点可以带来重要的加速与边际相对精度损失。

英文摘要:

Dynamic slicing techniques compute program dependencies to find all statements that affect the value of a variable at a program point for a specific execution. Despite their many potential uses, applicability is limited by the fact that they typically cannot scale beyond small-sized applications. We believe that at the heart of this limitation is the use of memory references to identify data-dependencies. Particularly, working with memory references hinders distinct treatment of the code-to-be-sliced (e.g., classes the user has an interest in) from the rest of the code (including libraries and frameworks). The ability to perform a coarser-grained analysis for the code that is not under focus may provide performance gains and could become one avenue toward scalability. In this paper, we propose a novel approach that completely replaces memory reference registering and processing with a memory analysis model that works with program symbols (i.e., terms). In fact, this approach enables the alternative of not instrumenting -- thus, not generating any trace -- for code that is not part of the code-to-be-sliced. We report on an implementation of an abstract dynamic slicer for C\#, \textit{DynAbs}, and an evaluation that shows how large and relevant parts of Roslyn and Powershell -- two of the largest and modern C\# applications that can be found in GitHub -- can be sliced for their test cases assertions in at most a few minutes. We also show how reducing the code-to-be-sliced focus can bring important speedups with marginal relative precision loss.

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

↑