Pluggable type-checking for custom type qualifiers in Java
Matthew M. Papi, Mahmood Ali, Telmo Luis Correa et al. · DSpace@MIT (Massachusetts Institute of Technology) · 2007
We have created a framework for adding custom type qualifiers to the Javalanguage in a backward-compatible way. The type system designer definesthe qualifiers and creates a compiler plug-in that enforces theirsemantics. Programmers can write the type qualifiers in their programs andbe informed of errors or assured that the program is free of those errors.The system builds on existing Java tools and APIs.In order to evaluate our framework, we have written four type-checkersusing the framework: for a non-null type system that can detect andprevent null pointer errors; for an interned type system that can detectand prevent equality-checking errors; for a reference immutability typesystem, Javari, that can detect and prevent mutation errors; and for areference and object immutability type system, IGJ, that can detect andprevent even more mutation errors. We have conducted case studies usingeach checker to find real errors in existing software. These case studiesdemonstrate that the checkers and the framework are practical and useful.
Cited by 4 works. Open-access PDF
Authors
References
- Design Patterns
- Extended static checking for Java
- Dynamically discovering likely program invariants to support program evolution
- Simplify: a theorem prover for program checking
- Flow-sensitive type qualifiers
- A theory of type qualifiers
- On programming of arithmetic operations
- Anatomy of LISP
- The jastadd extensible java compiler
- Declaring and checking non-null types in an object-oriented language