Deep Static Modeling of invokedynamic (Artifact)

Authors George Fourtounis , Yannis Smaragdakis

Thumbnail PDF

Artifact Description

  • Filesize: 362 kB
  • 4 pages

Document Identifiers

Author Details

George Fourtounis
  • University of Athens, Department of Informatics and Telecommunications, Greece
Yannis Smaragdakis
  • University of Athens, Department of Informatics and Telecommunications, Greece

Cite AsGet BibTex

George Fourtounis and Yannis Smaragdakis. Deep Static Modeling of invokedynamic (Artifact). In Special Issue of the 33rd European Conference on Object-Oriented Programming (ECOOP 2019). Dagstuhl Artifacts Series (DARTS), Volume 5, Issue 2, pp. 6:1-6:4, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2019)



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.

Subject Classification

ACM Subject Classification
  • Software and its engineering → Compilers
  • Theory of computation → Program analysis
  • Software and its engineering → General programming languages
  • invokedynamic
  • lambdas
  • static analysis


  • Access Statistics
  • Total Accesses (updated on a weekly basis)
    PDF Downloads