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

抽象控制(扩展)

Abstracting Abstract Control (Extended)

J. Ian Johnson, David Van Horn

摘要:

动态语言的优点也是它的缺点:运行时灵活性是以编译时可预测性为代价的。动态语言的许多特征,如闭包、延续、各种形式的反射和缺乏静态类型,使许多程序员感到高兴,而编译器编写人员、工具开发人员和验证工程师则感到遗憾。这些特性的动态性只是混淆了使用它们的程序的静态推理。因此,对动态语言的静态分析很少,而且很少是合理的。“抽象抽象机”(AAM)的方法来构建静态分析最近已被提出作为一种方法,以改善设计分析的困难,这样的语言功能。该方法,所谓的,因为它派生出一个功能的声音和可计算的近似程序的行为开始从抽象的机器语义的语言,提供了一个可行的方法来动态语言分析,因为所需要的是一个机器描述的解释器。原始的AAM配方产生有限的状态抽象,不能忠实地表示解释器的控制堆栈。最近的进展表明,高阶程序可以近似下推系统。然而,这些自动机理论模型要么在检查或修改控制堆栈的功能上崩溃。在本文中,我们解决的问题,使下推流分析域的动态语言功能。我们修改了抽象抽象机技术,以针对下推系统的更强的计算模型。在自动机理论的地方,我们只使用抽象的机器和记忆。作为案例研究,我们展示了该技术适用于闭包,垃圾回收,堆栈检查,和一流的可组合延续的语言。

英文摘要:

The strength of a dynamic language is also its weakness: run-time flexibility comes at the cost of compile-time predictability. Many of the hallmarks of dynamic languages such as closures, continuations, various forms of reflection, and a lack of static types make many programmers rejoice, while compiler writers, tool developers, and verification engineers lament. The dynamism of these features simply confounds statically reasoning about programs that use them. Consequently, static analyses for dynamic languages are few, far between, and seldom sound. The "abstracting abstract machines" (AAM) approach to constructing static analyses has recently been proposed as a method to ameliorate the difficulty of designing analyses for such language features. The approach, so called because it derives a function for the sound and computable approximation of program behavior starting from the abstract machine semantics of a language, provides a viable approach to dynamic language analysis since all that is required is a machine description of the interpreter. The original AAM recipe produces finite state abstractions, which cannot faithfully represent an interpreter's control stack. Recent advances have shown that higher-order programs can be approximated with pushdown systems. However, these automata theoretic models either break down on features that inspect or modify the control stack. In this paper, we tackle the problem of bringing pushdown flow analysis to the domain of dynamic language features. We revise the abstracting abstract machines technique to target the stronger computational model of pushdown systems. In place of automata theory, we use only abstract machines and memoization. As case studies, we show the technique applies to a language with closures, garbage collection, stack-inspection, and first-class composable continuations.

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

↑