Declaring and checking non-null types in an object-oriented language
OOPSLA '03 Proceedings of the 18th annual ACM SIGPLAN conference on Object-oriented programing, systems, languages, and applications
Javari: adding reference immutability to Java
OOPSLA '05 Proceedings of the 20th annual ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications
A framework for implementing pluggable type systems
Proceedings of the 21st annual ACM SIGPLAN conference on Object-oriented programming systems, languages, and applications
The jastadd extensible java compiler
Proceedings of the 22nd annual ACM SIGPLAN conference on Object-oriented programming systems and applications
Establishing object invariants with delayed types
Proceedings of the 22nd annual ACM SIGPLAN conference on Object-oriented programming systems and applications
Practical pluggable types for java
ISSTA '08 Proceedings of the 2008 international symposium on Software testing and analysis
Semantic Foundations and Inference of Non-null Annotations
FMOODS '08 Proceedings of the 10th IFIP WG 6.1 international conference on Formal Methods for Open Object-Based Distributed Systems
Masked types for sound object initialization
Proceedings of the 36th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages
A non-null annotation inferencer for Java bytecode
Proceedings of the 8th ACM SIGPLAN-SIGSOFT workshop on Program analysis for software tools and engineering
Type-Based Object Immutability with Flexible Initialization
Genoa Proceedings of the 23rd European Conference on ECOOP 2009 --- Object-Oriented Programming
Java bytecode verification for @NonNull types
CC'08/ETAPS'08 Proceedings of the Joint European Conferences on Theory and Practice of Software 17th international conference on Compiler construction
Ownership and immutability in generic Java
Proceedings of the ACM international conference on Object oriented programming systems languages and applications
Building and using pluggable type systems
Proceedings of the eighteenth ACM SIGSOFT international symposium on Foundations of software engineering
Inference of field initialization
Proceedings of the 33rd International Conference on Software Engineering
Attached types and their application to three open problems of object-oriented programming
ECOOP'05 Proceedings of the 19th European conference on Object-Oriented Programming
Using the spec# language, methodology, and tools to write bug-free programs
Advanced Lectures on Software Engineering
Non-null references by default in java: alleviating the nullity annotation burden
ECOOP'07 Proceedings of the 21st European conference on Object-Oriented Programming
Corecursive Featherweight Java
Proceedings of the 14th Workshop on Formal Techniques for Java-like Programs
ECOOP'12 Proceedings of the 26th European conference on Object-Oriented Programming
Proceedings of the 15th Workshop on Formal Techniques for Java-like Programs
The billion-dollar fix: safe modular circular initialisation
ECOOP'13 Proceedings of the 27th European conference on Object-Oriented Programming
Aliasing in Object-Oriented Programming
Object ownership in program verification
Aliasing in Object-Oriented Programming
Hi-index | 0.00 |
One of the main purposes of object initialisation is to establish invariants such as a field being non-null or an immutable data structure containing specific values. These invariants are then implicitly assumed by the rest of the implementation, for instance, to ensure that a field may be safely dereferenced or that immutable data may be accessed concurrently. Consequently, letting an object escape from its constructor is dangerous; the escaping object might not yet satisfy its invariants, leading to errors in code that relies on them. Nevertheless, preventing objects entirely from escaping from their constructors is too restrictive; it is often useful to call auxiliary methods on the object under initialisation or to pass it to another constructor to set up mutually-recursive structures. We present a type system that tracks which objects are fully initialised and which are still under initialisation. The system can be used to prevent objects from escaping, but also to allow safe escaping by making explicit which objects might not yet satisfy their invariants. We designed, formalised and implemented our system as an extension to a non-null type system, but it is not limited to this application. Our system is conceptually simple and requires little annotation overhead; it is sound and sufficiently expressive for many common programming idioms. Therefore, we believe it to be the first such system suitable for mainstream use.