Semantic Foundations and Inference of Non-null Annotations
Abstract
This paper proposes a semantics-based automatic null pointer analysis for inferring non-null annotations of fields in ob ject- 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 ob ject initialization. The analysis is proved correct with respect to an operational semantics of the mini- malistic 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 ̈ahndrich 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.
Domains
Programming Languages [cs.PL]
Origin : Files produced by the author(s)
Loading...