Non-null References by Default in the Java Modeling Language

Uloženo v:
Podrobná bibliografie
Název: Non-null References by Default in the Java Modeling Language
Autoři: Patrice Chalin, Frédéric Rioux
Přispěvatelé: The Pennsylvania State University CiteSeerX Archives
Zdroj: http://www.cs.iastate.edu/~leavens/SAVCBS/2005/papers/Chalin-Rioux.pdf.
Informace o vydavateli: ACM Press
Rok vydání: 2005
Sbírka: CiteSeerX
Témata: Documentation, Design, Languages, Theory, Verification. Keywords Contracts, Java Modeling Language, JML, reference types, nonnull references
Popis: Based on our experiences and those of our peers, we hypothesized that in Java code, the majority of declarations that are of reference types are meant to be non-null. Unfortunately, the Java Modeling Language (JML), like most interface specification and objectoriented programming languages, assumes that such declarations are possibly-null by default. As a consequence, developers need to write specifications that are more verbose than necessary in order to accurately document their module interfaces. In practice, this results in module interfaces being left incompletely and inaccurately specified. In this paper we present the results of a study that confirms our hypothesis. Hence, we propose an adaptation to JML that preserves its language design goals and that allows developers to specify that declarations of reference types are to be interpreted as non-null by default. We explain how this default is safer and results in less writing on the part of specifiers than null-by-default. The paper also reports on an implementation of the proposal in some of the JML tools.
Druh dokumentu: text
Popis souboru: application/pdf
Jazyk: English
Relation: http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.131.6019
Dostupnost: http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.131.6019
http://www.cs.iastate.edu/~leavens/SAVCBS/2005/papers/Chalin-Rioux.pdf
Rights: Metadata may be used without restrictions as long as the oai identifier remains attached to it.
Přístupové číslo: edsbas.DCF6F779
Databáze: BASE
Popis
Abstrakt:Based on our experiences and those of our peers, we hypothesized that in Java code, the majority of declarations that are of reference types are meant to be non-null. Unfortunately, the Java Modeling Language (JML), like most interface specification and objectoriented programming languages, assumes that such declarations are possibly-null by default. As a consequence, developers need to write specifications that are more verbose than necessary in order to accurately document their module interfaces. In practice, this results in module interfaces being left incompletely and inaccurately specified. In this paper we present the results of a study that confirms our hypothesis. Hence, we propose an adaptation to JML that preserves its language design goals and that allows developers to specify that declarations of reference types are to be interpreted as non-null by default. We explain how this default is safer and results in less writing on the part of specifiers than null-by-default. The paper also reports on an implementation of the proposal in some of the JML tools.