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

使用抽象垃圾回收的下推流分析

Pushdown flow analysis with abstract garbage collection

J. Ian Johnson, Ilya Sergey, Christopher Earl, Matthew Might, David Van Horn

摘要:

在函数式程序的静态分析中,下推流分析和抽象垃圾回收扩展了我们对程序静态知识的了解。这项工作阐明了理论和实践挑战的解决方案,这些挑战阻碍了将这些技术的力量结合起来。下推流分析为高阶程序中的返回流分析提供了无界但可计算的多变量。抽象垃圾回收对在创建它们的抽象上下文的调用之间变得不可达的抽象地址授予无界多变性。下推分析解决了高阶语言中精确分析递归的问题;抽象垃圾回收是解决"粘性"问题的关键。单独来看,我们的基准测试表明,每种方法都可以减少分析时间,并将精度提高几个数量级。我们将这些方法结合起来。结合这些技术的挑战并不微妙:计算下推系统的可达控制状态依赖于在转换到堆栈顶部期间限制访问;另一方面,抽象垃圾回收需要完全访问整个堆栈来计算根集,就像具体收集一样。有条件下推系统正是针对这样一个难题而开发的,但是现有的方法不适合垃圾回收的动态特性。我们展示了下推垃圾收集控制流分析的可行路径问题的完全精确和近似的解决方案。实验表明,协同垃圾回收和下推技术之间的相互作用,融合证明了"优于两个世界"的精度。

英文摘要:

In the static analysis of functional programs, pushdown flow analysis and abstract garbage collection push the boundaries of what we can learn about programs statically. This work illuminates and poses solutions to theoretical and practical challenges that stand in the way of combining the power of these techniques. Pushdown flow analysis grants unbounded yet computable polyvariance to the analysis of return-flow in higher-order programs. Abstract garbage collection grants unbounded polyvariance to abstract addresses which become unreachable between invocations of the abstract contexts in which they were created. Pushdown analysis solves the problem of precisely analyzing recursion in higher-order languages; abstract garbage collection is essential in solving the "stickiness" problem. Alone, our benchmarks demonstrate that each method can reduce analysis times and boost precision by orders of magnitude. We combine these methods. The challenge in marrying these techniques is not subtle: computing the reachable control states of a pushdown system relies on limiting access during transition to the top of the stack; abstract garbage collection, on the other hand, needs full access to the entire stack to compute a root set, just as concrete collection does. Conditional pushdown systems were developed for just such a conundrum, but existing methods are ill-suited for the dynamic nature of garbage collection. We show fully precise and approximate solutions to the feasible paths problem for pushdown garbage-collecting control-flow analysis. Experiments reveal synergistic interplay between garbage collection and pushdown techniques, and the fusion demonstrates "better-than-both-worlds" precision.

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

↑