Preventing bugs with pluggable type-checking for Java
Type-checking helps to detect and prevent errors. However, Java types are incapable of expressing important information, such as whether a variable may be null, whether a value is intended to be side-effected, or whether a String is interned. As a result, a Java program can suffer from null
pointer exceptions, incorrect mutations, errors in equality testing, and many other types of problems.
I will present practical tools that you can use at compile time to detect such errors, prevent them, or verify their absence. The tools are built upon JSR 308, an extension to the Java annotation system that is planned for inclusion in Java 7. Using JSR 308, a programmer can write type qualifiers in a Java program (e.g., List<@NonNull Object>) and use a javac plugin to check the program for errors or verify their absence. The programmer annotation burden is light. (By contrast, non-type-system-based tools such as FindBugs require even less program annotation, but they are less complete in their checking.)
The talk will include demonstrations of the tools in action. The demonstrated tools are freely available from http://pag.csail.mit.edu/jsr308/ and are backward-compatible with Java 5 compilers and virtual machines.
tools (could also be classified as "new & cool" or "core")
familiarity with Java 5
Download de presentatie (215 Kb)
Michael Ernst is specification lead for JSR 308 and is an Associate Professor in computer science at MIT.
His research aims to make software more reliable, more secure, and easier (and more fun!) to produce. His technical interests are primarily in software engineering, including static and dynamic program analysis, testing, security, type theory, programming language design, and verification. He has built many tools that extend the state of the art in software development.
His homepage is http://people.csail.mit.edu/mernst/ .