Semantic foundations and inference of non-null annotations

Laurent Hubert 1, * Thomas Jensen 1 David Pichardie 1
* Corresponding author
1 Lande - Logiciel : ANalyse et DEveloppement
IRISA - Institut de Recherche en Informatique et Systèmes Aléatoires, Inria Rennes – Bretagne Atlantique
Abstract : This paper proposes a semantics-based automatic null pointer analysis for inferring non-null annotations of fields in object-oriented programs. The analysis is formulated for a minimalistic OO language and is expressed as a constraint-based abstract interpretation of the program which for each field of a class infers whether the field is definitely non-null or possibly null after object initialization. The analysis is proved correct with respect to an operational semantics of the minimalistic OO language. This correctness proof has been machine checked using the Coq proof assistant. We also prove the analysis complete with respect to the non-null type system proposed by Fähndrich and Leino, in the sense that for every typable program the analysis is able to prove the absence of null dereferences without any hand-written annotations. Experiments with a prototype implementation of the analysis show that the inference is feasible for large programs.
Document type :
Reports
[Research Report] RR-6482, INRIA. 2008
Liste complète des métadonnées


https://hal.inria.fr/inria-00266171
Contributor : Laurent Hubert <>
Submitted on : Tuesday, March 25, 2008 - 11:09:22 AM
Last modification on : Friday, January 13, 2017 - 2:18:11 PM
Document(s) archivé(s) le : Friday, November 25, 2016 - 10:10:47 PM

File

RR-6482.pdf
Files produced by the author(s)

Identifiers

  • HAL Id : inria-00266171, version 2

Collections

Citation

Laurent Hubert, Thomas Jensen, David Pichardie. Semantic foundations and inference of non-null annotations. [Research Report] RR-6482, INRIA. 2008. <inria-00266171v2>

Share

Metrics

Record views

380

Document downloads

77