当前位置: X-MOL 学术arXiv.cs.PL › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
Deep Static Modeling of invokedynamic
arXiv - CS - Programming Languages Pub Date : 2020-01-08 , DOI: arxiv-2001.02545
George Fourtounis and Yannis Smaragdakis

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.

中文翻译:

调用动态的深度静态建模

Java 7 以invokedynamic 框架的形式引入了可编程动态链接。包含可编程动态链接的代码的静态分析经常被认为是 Java 程序分析中不健全的重要来源。例如,Java 8 中引入的 Java lambdas 是一个非常流行的特性,但是它对静态分析有抵抗力,因为它混合了调用动态和动态代码生成。这些技术使静态分析假设无效:可编程链接破坏了有关方法解析的推理,而根据定义,动态生成的代码不能静态使用。在本文中,我们展示了静态分析可以对调用动态的使用进行预测建模,同时还可以与额外的规则合作来处理 lambda 的运行时代码生成。我们的方法插入到现有的静态分析中,并有助于消除处理 lambda(包括方法引用等相关功能)和通用调用动态使用中的所有不合理之处。我们在我们自己的基准测试套件和第三方基准测试中评估我们的技术,高效地发现以前由于不健全而无法访问的所有代码。
更新日期:2020-01-09
down
wechat
bug