Preventing Runtime Errors at Compile Time

A session at Open Source Bridge 2011

  • Michael Ernst
  • David Lazar

Wednesday 22nd June, 2011

10:00am to 11:45am (PST)

Are you tired of null pointer exceptions, unintended side effects, SQL injections, concurrency errors, mistaken equality tests, and other run-time errors that appear during testing or in the field? A pluggable type system can guarantee the absence of these errors, and many more real, important bugs.

Are you a software architect who wants to be able to quickly and easily implement custom checks that prevent more errors at compile time? You need a framework that supports you in creating a formally correct code checker.

This presentation is aimed at both audiences. A pluggable type system can give a compile-time guarantee of important properties. We will explain what it is, how to use it, and even how to create your own. You can create a simple pluggable type-checker in 2 minutes, and you can enhance it thereafter.

The demo uses the Checker Framework, which enables you to create pluggable type systems for Java. It takes advantage of features planned by Oracle for Java 8, but your code remains backward-compatible. The pluggable type-checker can be run as part of javac or via an Eclipse plug-in, and integration with build tools such as Ant and Maven is provided. The tools are "freely available":http://types.cs.washington.edu/checker-framework/.

The Checker Framework provides 12 pluggable type systems that are ready to use, including nullness, immutability, and locking checkers. The presentation will first develop a simple declarative type checker that checks the consistency of method signature strings. The presentation will then discuss the design and usage of more advanced checkers.

The Checker Framework has found hundreds of bugs in over 3 million lines of open source code, including from Oracle, Google, Apache, etc. Overall, we found that the type checkers were easy to write, easy for novices to productively use, and effective in finding real bugs and verifying program properties, even for widely tested and used open source projects. It is easy to improve the quality of your Java code, and you can start using the Checker Framework today!

About the speakers

This person is speaking at this event.
Michael Ernst
This person is speaking at this event.
David Lazar
This person is speaking at this event.
Werner M. Dietl

Coverage of this session

Sign in to add slides, notes or videos to this session

Tell your friends!

When

Time 10:00am11:45am PST

Date Wed 22nd June 2011

Short URL

lanyrd.com/sfrbw

Official session page

opensourcebridge.org/…ions/658

View the schedule

Share

Topics

See something wrong?

Report an issue with this session