Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/949305.949332acmconferencesArticle/Chapter ViewAbstractPublication PagessplashConference Proceedingsconference-collections
Article

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

Published: 26 October 2003 Publication History
  • Get Citation Alerts
  • Abstract

    Distinguishing non-null references from possibly-null references at the type level can detect null-related errors in object-oriented 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 for annotating and checking null-related properties in C# programs.

    References

    [1]
    Robert DeLine and Manuel Fähndrich. Enforcing high-level protocols in low-level software. In Proceedings of the 2001 ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), volume 36, number 5 in SIGPLAN Notices, pages 59--69. ACM, May 2001.]]
    [2]
    ECMA. Standard ECMA-334: C# Language Specification, December 2002. Available on the web as http://www.ecma-international.org/publications/files/ecma-st/Ecma-334.pdf.]]
    [3]
    David Evans, John Guttag, James Horning, and Yang~Meng Tan. LCLint: A tool for using specifications to check code. In Proceedings of the ACM SIGSOFT '94 Symposium on the Foundations of Software Engineering, pages 87--96, 1994.]]
    [4]
    Manuel Fähndrich and K. Rustan M. Leino. Heap monotonic typestates. In Proceedings of the 1st International Workshop on Aliasing, Confinement and Ownership, July 2003.]]
    [5]
    Kathleen Fisher and John H. Reppy. The design of a class mechanism for Moby. In Proceedings of the 1999 ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), volume~34, number~5 in SIGPLAN Notices, pages 37--49. ACM, May 1999.]]
    [6]
    Robert Fitzgerald, Todd B. Knoblock, Erik Ruf, Bjarne Steensgaard, and David Tarditi. Marmot: An optimizing compiler for Java. Software-Practice and Experience, 30(3), 2000.]]
    [7]
    Cormac Flanagan, Matthew Flatt, Shriram Krishnamurthi, Stephanie Weirich, and Matthias Felleisen. Catching bugs in the web of program invariants. In Proceedings of the ACM SIGPLAN '96 Conference on Programming Language Design and Implementation (PLDI), volume 31, number 5 in SIGPLAN Notices, pages 23--32. ACM, May 1996.]]
    [8]
    Cormac Flanagan, K. Rustan M. Leino, Mark Lillibridge, Greg Nelson, James B. Saxe, and Raymie Stata. Extended static checking for Java. In Proceedings of the 2002 ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), volume 37, number 5 in SIGPLAN Notices, pages 234--245. ACM, May 2002.]]
    [9]
    James Gosling, Bill Joy, and Guy Steele. The Java\raisebox.6ex tm Language Specification. Addison-Wesley, 1996.]]
    [10]
    Trevor Jim, Greg Morrisett, Dan Grossman, Michael Hicks, James Cheney, and Yanling Wang. Cyclone: A safe dialect of C. In USENIX Annual Technical Conference, General Track, pages 275--288, June 2002.]]
    [11]
    Barbara Liskov, Dorothy Curtis, Mark Day, Sanjay Ghemawat, Robert Gruber, Paul Johnson, and Andrew C. Myers. Theta reference manual, preliminary version. Memo~88, Programming Methodology Group, MIT Laboratory for Computer Science, February 1995. Available on the web at http://www.pmg.lcs.mit.edu/Theta.html.]]
    [12]
    Barbara Liskov and John Guttag. Abstraction and Specification in Program Development. MIT Electrical Engineering and Computer Science Series. MIT Press, 1986.]]
    [13]
    Robin Milner, Mads Tofte, and Robert Harper. The Definition of Standard ML. MIT Press, 1990.]]
    [14]
    Greg Morrisett, David Walker, Karl Crary, and Neal Glew. From system F to typed assembly language. ACM Transactions on Programming Languages and Systems, 21(3):527--568, 1999.]]
    [15]
    George C. Necula, Scott McPeak, and Westley Weimer. CCured: Type-safe retrofitting of legacy code. In Proceedings of the 29th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 128--139, 2002.]]
    [16]
    Simon Peyton Jones, John Hughes, Lennart Augustsson, Dave Barton, Brian Boutel, Warren Burton, Joseph Fasel, Kevin Hammond, Ralf Hinze, Paul Hudak, Thomas Johnsson, Mark Jones, John Launchbury, Erik Meijer, John Peterson, Alastair Reid, Colin Runciman, and Philip Wadler. Haskell 98 report, February 1999. Available on the web as http://haskell.org/onlinereport.]]
    [17]
    Chris Smith. Java pointifications: Nullability constraints, June 2001. Available on the web as http://cdsmith.twu.net/professional/java/pontifications/nonnull.html.]]
    [18]
    Frederick Smith, David Walker, and Greg Morrisett. Alias types. In Proceedings of the 14th European Symposium on Programming, volume 1782 of Lecture Notes in Computer Science, pages 366--381. Springer, March 2000.]]
    [19]
    Raymie Stata. Improving the safety of Java, December 1995. Available on the web as http://larch-www.lcs.mit.edu:8001/\homedirraymie/Java/javachangessafety.html.]]

    Cited By

    View all
    • (2024) Octopus: Scaling Value-Flow Analysis via Parallel Collection of Realizable Path ConditionsACM Transactions on Software Engineering and Methodology10.1145/363274333:3(1-33)Online publication date: 24-Jan-2024
    • (2023)Toward Programming Languages for Reasoning: Humans, Symbolic Systems, and AI AgentsProceedings of the 2023 ACM SIGPLAN International Symposium on New Ideas, New Paradigms, and Reflections on Programming and Software10.1145/3622758.3622895(136-152)Online publication date: 18-Oct-2023
    • (2023)Usability-Oriented Design of Liquid Types for Java2023 IEEE/ACM 45th International Conference on Software Engineering (ICSE)10.1109/ICSE48619.2023.00132(1520-1532)Online publication date: May-2023
    • Show More Cited By

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM Conferences
    OOPSLA '03: Proceedings of the 18th annual ACM SIGPLAN conference on Object-oriented programing, systems, languages, and applications
    October 2003
    430 pages
    ISBN:1581137125
    DOI:10.1145/949305
    • cover image ACM SIGPLAN Notices
      ACM SIGPLAN Notices  Volume 38, Issue 11
      Special Issue: Proceedings of the OOPSLA '03 conference
      November 2003
      417 pages
      ISSN:0362-1340
      EISSN:1558-1160
      DOI:10.1145/949343
      Issue’s Table of Contents
    Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

    Sponsors

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 26 October 2003

    Permissions

    Request permissions for this article.

    Check for updates

    Author Tags

    1. Java
    2. c#
    3. non-null types
    4. null references
    5. type system

    Qualifiers

    • Article

    Conference

    OOPSLA03
    Sponsor:

    Acceptance Rates

    OOPSLA '03 Paper Acceptance Rate 26 of 147 submissions, 18%;
    Overall Acceptance Rate 268 of 1,244 submissions, 22%

    Upcoming Conference

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)10
    • Downloads (Last 6 weeks)0
    Reflects downloads up to 11 Aug 2024

    Other Metrics

    Citations

    Cited By

    View all
    • (2024) Octopus: Scaling Value-Flow Analysis via Parallel Collection of Realizable Path ConditionsACM Transactions on Software Engineering and Methodology10.1145/363274333:3(1-33)Online publication date: 24-Jan-2024
    • (2023)Toward Programming Languages for Reasoning: Humans, Symbolic Systems, and AI AgentsProceedings of the 2023 ACM SIGPLAN International Symposium on New Ideas, New Paradigms, and Reflections on Programming and Software10.1145/3622758.3622895(136-152)Online publication date: 18-Oct-2023
    • (2023)Usability-Oriented Design of Liquid Types for Java2023 IEEE/ACM 45th International Conference on Software Engineering (ICSE)10.1109/ICSE48619.2023.00132(1520-1532)Online publication date: May-2023
    • (2023)What Types Are Needed for Typing Dynamic Objects? A Python-Based Empirical StudyProgramming Languages and Systems10.1007/978-981-99-8311-7_2(24-45)Online publication date: 21-Nov-2023
    • (2022)The Principles of the Flix Programming LanguageProceedings of the 2022 ACM SIGPLAN International Symposium on New Ideas, New Paradigms, and Reflections on Programming and Software10.1145/3563835.3567661(112-127)Online publication date: 29-Nov-2022
    • (2022)A conceptual framework for safe object initialization: a principled and mechanized soundness proof of the Celsius modelProceedings of the ACM on Programming Languages10.1145/35633146:OOPSLA2(729-757)Online publication date: 31-Oct-2022
    • (2022)Wildcards need witness protectionProceedings of the ACM on Programming Languages10.1145/35633016:OOPSLA2(373-394)Online publication date: 31-Oct-2022
    • (2022)Containerless Plurals: Separating Number from Type in Object-Oriented ProgrammingACM Transactions on Programming Languages and Systems10.1145/352763544:4(1-56)Online publication date: 21-Sep-2022
    • (2020)A type-and-effect system for object initializationProceedings of the ACM on Programming Languages10.1145/34282434:OOPSLA(1-28)Online publication date: 13-Nov-2020
    • (2020)Putting the semantics into semantic versioningProceedings of the 2020 ACM SIGPLAN International Symposium on New Ideas, New Paradigms, and Reflections on Programming and Software10.1145/3426428.3426922(157-179)Online publication date: 18-Nov-2020
    • Show More Cited By

    View Options

    Get Access

    Login options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Media

    Figures

    Other

    Tables

    Share

    Share

    Share this Publication link

    Share on social media