A Verifiable, Control Flow Aware Constraint Analyzer for Bounds Check Elimination

  • David Niedzielski
  • Jeffery von Ronne
  • Andreas Gampe
  • Kleanthis Psarris
Conference paper

DOI: 10.1007/978-3-642-03237-0_11

Part of the Lecture Notes in Computer Science book series (LNCS, volume 5673)
Cite this paper as:
Niedzielski D., von Ronne J., Gampe A., Psarris K. (2009) A Verifiable, Control Flow Aware Constraint Analyzer for Bounds Check Elimination. In: Palsberg J., Su Z. (eds) Static Analysis. SAS 2009. Lecture Notes in Computer Science, vol 5673. Springer, Berlin, Heidelberg

Abstract

The Java platform requires that out-of-bounds array accesses produce runtime exceptions. In general, this requires a dynamic bounds check each time an array element is accessed. However, if it can be proven that the array index is within the bounds of the array, the check can be eliminated. We present a new algorithm based on extended Static Single Assignment (eSSA) form that builds a constraint system representing control flow qualified, linear constraints among program variables derived from program statements. Our system then derives relationships among variables, and provides a verifiable proof of its conclusions. This proof can be verified by a runtime system to minimize the analysis’s performance impact. Our system simultaneously considers both control flow and data flow when analyzing the constraint system, handles general linear inequalities instead of simple difference constraints, and provides verifiable proofs for its claims. We present experimental results demonstrating that this method eliminates more bounds checks, and when combined with runtime verification, results in a lower runtime cost than prior work. Our algorithm improves benchmark performance by up to nearly 10% over the baseline SafeTSA system.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Springer-Verlag Berlin Heidelberg 2009

Authors and Affiliations

  • David Niedzielski
    • 1
  • Jeffery von Ronne
    • 1
  • Andreas Gampe
    • 1
  • Kleanthis Psarris
    • 1
  1. 1.The University of TexasSan Antonio

Personalised recommendations