Declaring and checking non-null types in an object-oriented language

Manuel Fähndrich, K. Rustan M. Leino
2003 Proceedings of the 18th ACM SIGPLAN conference on Object-oriented programing, systems, languages, and applications - OOPSLA '03  
Distinguishing non-null references from possibly-null references at the type level can detect null-related errors in objectoriented programs at compile-time. This paper gives a proposal for retrofitting a language such as C# or Java with non-null types. It addresses the central complications that arise in constructors, where declared non-null fields may not yet have been initialized, but the partially constructed object is already accessible. The paper reports experience with an implementation
more » ... or annotating and checking null-related properties in C# programs.
doi:10.1145/949305.949332 dblp:conf/oopsla/FahndrichL03 fatcat:o6x4cv7h25h3douiwxlh4iytuy