TitleInference of field initialization
Publication TypeConference Paper
Year of Publication2011
AuthorsSpoto F, Ernst MD
Conference NameICSE 2011, Proceedings of the 33rd International Conference on Software Engineering
Pagination231–240
Date or Month PublishedMay
Conference LocationWaikiki, Hawaii, USA
AbstractA \emphraw 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-\textttnull. 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. \par 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.
Downloadsftp://ftp.cs.washington.edu/tr/2010/02/UW-CSE-10-02-01.PDF earlier TR with additional details https://homes.cs.washington.edu/~mernst/pubs/initialization-icse2011.pdf PDF https://homes.cs.washington.edu/~mernst/pubs/initialization-icse2011-sli... slides (PDF)
Citation KeySpotoE2011