使用访问图进行堆引用分析
Heap Reference Analysis Using Access Graphs
摘要:
尽管在程序分析的理论和实践方面取得了重大进展,但堆数据的属性分析还没有达到与静态和堆栈数据分析相同的成熟程度。堆栈和静态数据的空间和时间结构是很好理解的,而堆数据的空间和时间结构似乎是任意的,是无界的。我们设计有界表示,总结堆数据的属性。这个总结是基于操作堆的程序的结构。所得到的摘要表示是某些类型的图,称为访问图。这些表示的有界性和操作它们的单调性使得通过数据流分析来计算它们成为可能。受益于堆引用分析的一个重要应用是垃圾回收,其中当前的活性是保守地近似于来自程序变量的可达性。因此,当前的垃圾收集器留下了大量未收集的垃圾,这一事实已被几项实证研究所证实。我们提出了第一个端到端的静态分析来区分活动对象和可达对象。我们使用这些信息通过修改程序使死对象不可访问。这个应用程序很有趣,因为它需要发现表示复杂语义的数据流信息。特别是,我们发现堆数据的四个属性:活性,别名,可用性和可预测性。总之,它们涵盖了分析方向(即向前和向后)和信息汇合(即联合和交叉)的所有组合。我们的分析也可以用于堵塞C/C ++语言中的内存泄漏。
英文摘要:
Despite significant progress in the theory and practice of program analysis, analysing properties of heap data has not reached the same level of maturity as the analysis of static and stack data. The spatial and temporal structure of stack and static data is well understood while that of heap data seems arbitrary and is unbounded. We devise bounded representations which summarize properties of the heap data. This summarization is based on the structure of the program which manipulates the heap. The resulting summary representations are certain kinds of graphs called access graphs. The boundedness of these representations and the monotonicity of the operations to manipulate them make it possible to compute them through data flow analysis. An important application which benefits from heap reference analysis is garbage collection, where currently liveness is conservatively approximated by reachability from program variables. As a consequence, current garbage collectors leave a lot of garbage uncollected, a fact which has been confirmed by several empirical studies. We propose the first ever end-to-end static analysis to distinguish live objects from reachable objects. We use this information to make dead objects unreachable by modifying the program. This application is interesting because it requires discovering data flow information representing complex semantics. In particular, we discover four properties of heap data: liveness, aliasing, availability, and anticipability. Together, they cover all combinations of directions of analysis (i.e. forward and backward) and confluence of information (i.e. union and intersection). Our analysis can also be used for plugging memory leaks in C/C++ languages.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。