Safe bounds check annotations

Jeffery von Ronne, Andreas Gampe, David Niedzielski, Kleanthis Psarris
2009 Concurrency and Computation  
The Java programming language's semantics require that out-of-bounds array accesses be caught at runtime. In general, this requires dynamic checks at the time the array element is accessed. Some of these checks can be eliminated statically during just-in-time (JIT) compilation, but the most precise analyses are too expensive to run in JIT compilers. This paper presents a framework in which thorough static range analyses can be used safely during the less-performance-critical compilation of Java
more » ... source into machineindependent mobile code. In this framework, the static analysis results are used to derive proofs that certain linear inequality constraints hold. These linear constraints and their proofs are then added to the mobile code as annotations. The annotation framework is designed so that proofs can be verified efficiently. This allows the JIT compiler to safely eliminate array bounds checks during compilation without expensive runtime analysis. Experiments with a prototype system that can generate and verify these annotations, demonstrate that this framework is more precise than prior work and that verification is efficient. *
doi:10.1002/cpe.1341 fatcat:iqkrcblsp5gjhlmlr25gtjdloy