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

广义指向图:一种新的指针记忆抽象

Generalized Points-to Graphs: A New Abstraction of Memory in the Presence of Pointers

Pritam M. Gharat, Uday P. Khedker, Alan Mycroft

摘要:

流和上下文敏感的点分析是难以规模化的;自上而下的方法,问题的中心是重复分析相同的程序;自下而上的方法,用于表示程序摘要的抽象没有规模化,同时保持精度。我们提出了一种新的抽象称为广义点到图(GPG)的观点点到关系的内存更新和概括他们使用的间接级别的计数离开未知的pointees隐式。这使我们能够构建GPG作为紧凑的表示自底向上的程序摘要的内存更新和控制流之间。它们的紧凑性通过以下优化来确保:强度降低降低了间接级别,冗余消除消除了冗余内存更新并最小化控制流(而不会过度近似内存更新之间的数据依赖),调用内联增强了这些优化的机会。我们为这些优化设计了新的操作和数据流分析。我们对点到分析的可伸缩性的追求导致了以下见解:程序分析中可伸缩性的真正杀手不是数据量,而是它在寻求精确性时可能受到的控制流的量。GPG的有效性在于它们在不损失精度的情况下丢弃尽可能多的控制流(即,通过保持数据相关性而不过度近似)。这就是为什么即使对于包含整个程序效果的主程序,GPG也非常小的原因。这使得我们的实现可以扩展到C程序的158 kLoC。

英文摘要:

Flow- and context-sensitive points-to analysis is difficult to scale; for top-down approaches, the problem centers on repeated analysis of the same procedure; for bottom-up approaches, the abstractions used to represent procedure summaries have not scaled while preserving precision. We propose a novel abstraction called the Generalized Points-to Graph (GPG) which views points-to relations as memory updates and generalizes them using the counts of indirection levels leaving the unknown pointees implicit. This allows us to construct GPGs as compact representations of bottom-up procedure summaries in terms of memory updates and control flow between them. Their compactness is ensured by the following optimizations: strength reduction reduces the indirection levels, redundancy elimination removes redundant memory updates and minimizes control flow (without over-approximating data dependence between memory updates), and call inlining enhances the opportunities of these optimizations. We devise novel operations and data flow analyses for these optimizations. Our quest for scalability of points-to analysis leads to the following insight: The real killer of scalability in program analysis is not the amount of data but the amount of control flow that it may be subjected to in search of precision. The effectiveness of GPGs lies in the fact that they discard as much control flow as possible without losing precision (i.e., by preserving data dependence without over-approximation). This is the reason why the GPGs are very small even for main procedures that contain the effect of the entire program. This allows our implementation to scale to 158kLoC for C programs.

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

↑