Inference of field initialization

Download: implementation.

“Inference of field initialization” by Fausto Spoto and Michael D. Ernst. In ICSE'11, Proceedings of the 33rd International Conference on Software Engineering, (Waikiki, Hawaii, USA), May 25-27, 2011.


A raw object is partially initialized, with only some fields set to legal values. It may violate its object invariants, such as that a given field is non-null. Programs often manipulate partially-initialized objects, but they must do so with care. Furthermore, analyses must be aware of field initialization. For instance, proving the absence of null pointer dereferences or of division by zero, or proving that object invariants are satisfied, requires information about initialization.

We present a static analysis that infers a safe over-approximation of the program variables, fields, and array elements that, at run time, might hold raw objects. Our formalization is flow-sensitive and interprocedural, and it considers the exception flow in the analyzed program. We have proved the analysis sound and implemented it in a tool called Julia that computes initialization and nullness information. We have evaluated Julia on over 160K lines of code. We have compared its output to manually-written initialization and nullness information, and to an independently-written type-checking tool that checks initialization and nullness. Julia's output is accurate and useful both to programmers and to static analyses.

Download: implementation.

BibTeX entry:

   author = {Fausto Spoto and Michael D. Ernst},
   title = {Inference of field initialization},
   booktitle = {ICSE'11, Proceedings of the 33rd International Conference
	on Software Engineering},
   address = {Waikiki, Hawaii, USA},
   month = {May~25--27,},
   year = {2011}

(This webpage was created with bibtex2web.)

Back to Program Analysis Group publications.