论文标题

深层静态建模

Deep Static Modeling of invokedynamic

论文作者

Fourtounis, George, Smaragdakis, Yannis

论文摘要

Java 7以Invokedy框架的形式引入了可编程的动态链接。对包含可编程动态链接的代码的静态分析通常被认为是Java程序分析中的不健全性的重要来源。例如,Java Lambdas(Java 8中)是一个非常受欢迎的功能,但是它可以抵抗静态分析,因为它将InvoKedynaliganig与动态代码生成混合在一起。这些技术使静态分析假设无效:可编程链接的断断续续的方法分辨率的推理,而动态生成的代码在定义上是无法静态可用的。在本文中,我们表明静态分析可以预测地模拟Invokedy动态的使用,同时还可以与额外的规则合作以处理Lambdas的运行时代码生成。我们的方法插入了现有的静态分析中,并有助于消除处理lambdas的所有不健全性(包括相关的功能,例如方法参考)和通用的Invokedy nemics用途。我们根据自己和第三方基准的基准套件评估我们的技术,从而发现了以前无法达到的所有代码,这是由于不健全性而无法高效的。

Java 7 introduced programmable dynamic linking in the form of the invokedynamic framework. Static analysis of code containing programmable dynamic linking has often been cited as a significant source of unsoundness in the analysis of Java programs. For example, Java lambdas, introduced in Java 8, are a very popular feature, which is, however, resistant to static analysis, since it mixes invokedynamic with dynamic code generation. These techniques invalidate static analysis assumptions: programmable linking breaks reasoning about method resolution while dynamically generated code is, by definition, not available statically. In this paper, we show that a static analysis can predictively model uses of invokedynamic while also cooperating with extra rules to handle the runtime code generation of lambdas. Our approach plugs into an existing static analysis and helps eliminate all unsoundness in the handling of lambdas (including associated features such as method references) and generic invokedynamic uses. We evaluate our technique on a benchmark suite of our own and on third-party benchmarks, uncovering all code previously unreachable due to unsoundness, highly efficiently.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源