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

$k$ - CFA参数的解析与开发

Resolving and Exploiting the $k$-CFA Paradox

Matthew Might, Yannis Smaragdakis, David Van Horn

摘要:

低级程序分析是一个基本问题,在函数式语言中采用“流分析”的形式,在命令式和面向对象语言中采用“指向”分析。尽管有相似之处,但两个社区的词汇和结果在很大程度上仍然不同,相互理解有限。为数不多的联系之一是Shivers的$k$ -CFA工作,它推进了“上下文敏感分析”的概念,在两个社区都广为人知。最近的结果表明,$k$ -CFA的功能和面向对象的化身之间的关系并没有像想象的那样被很好地理解。Van Horn和Mairson证明了$k \geq 1$的$k$-CFA是EXPTIME完备的;因此,不存在多项式时间算法。然而,在面向对象语言中,有几种多项式时间的上下文敏感点分析公式。因此,看起来函数式$k$ -CFA实际上可能是与面向对象的$k$ -CFA完全不同的分析。我们解决了这个悖论,表明完全相同的规范$k$ -CFA是多项式时间的面向对象的语言,但指数时间的功能:对象和闭包是微妙的不同,在一种方式,相互作用的上下文敏感性和复杂性至关重要。这种照明导致一个直接的回报:通过投影面向对象的处理对象到闭包,我们推导出多项式时间层次的上下文敏感的CFA函数程序。

英文摘要:

Low-level program analysis is a fundamental problem, taking the shape of "flow analysis" in functional languages and "points-to" analysis in imperative and object-oriented languages. Despite the similarities, the vocabulary and results in the two communities remain largely distinct, with limited cross-understanding. One of the few links is Shivers's $k$-CFA work, which has advanced the concept of "context-sensitive analysis" and is widely known in both communities. Recent results indicate that the relationship between the functional and object-oriented incarnations of $k$-CFA is not as well understood as thought. Van Horn and Mairson proved $k$-CFA for $k \geq 1$ to be EXPTIME-complete; hence, no polynomial-time algorithm can exist. Yet, there are several polynomial-time formulations of context-sensitive points-to analyses in object-oriented languages. Thus, it seems that functional $k$-CFA may actually be a profoundly different analysis from object-oriented $k$-CFA. We resolve this paradox by showing that the exact same specification of $k$-CFA is polynomial-time for object-oriented languages yet exponential- time for functional ones: objects and closures are subtly different, in a way that interacts crucially with context-sensitivity and complexity. This illumination leads to an immediate payoff: by projecting the object-oriented treatment of objects onto closures, we derive a polynomial-time hierarchy of context-sensitive CFAs for functional programs.

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

↑