Proceedings of ISP RAS

Null safety benchmarks for object initialization

Kogtenkov A.V. (Independent scientist, Podolsk, Russia)


Null pointer dereferencing remains one of the major issues in modern object-oriented languages. An obvious addition of keywords to distinguish between never null and possibly null references appears to be insufficient during object initialization when some fields declared as never null may be temporary null before the initialization completes. There are several proposals to solve the object initialization problem. How can they be compared in practice? Are the implementations sound? This work presents a set of examples distilling out the use cases from publications on the subject and open source libraries and explains the criteria behind. Then it discusses expected results for a selected set of tools performing null safety checks for Eiffel, Java, and Kotlin, and concludes with the actual outcomes demonstrating immaturity of the solutions.


null pointer dereferencing; null safety; void safety; object initialization; static analysis; null safety benchmarks


Proceedings of the Institute for System Programming, vol. 29, issue 6, 2017, pp. 135-150.

ISSN 2220-6426 (Online), ISSN 2079-8156 (Print).

DOI: 10.15514/ISPRAS-2017-29(6)-7

Full text of the paper in pdf Back to the contents of the volume