Type Checking for Reliable APIs

Presenter: Maria Kechagia
Date: 12 April 2017

Abstract

We propose to configure at compile time the checking associated with Application Programming Interfaces’ methods that can receive possibly malformed values (e.g. erroneous user inputs and problematic retrieved records from databases) and thus cause application execution failures. To achieve this, we design a type system for implementing a pluggable checker on the Java’s compiler and find at compile time insufficient checking bugs that can lead to application crashes due to malformed inputs. Our goal is to wrap methods when they receive external inputs so that the former generate checked instead of unchecked exceptions. We believe that our approach can improve Java developers’ productivity, by using exception handling only when it is required, and ensure client applications’ stability. We want to evaluate our checker by using it to verify the source code of Java projects from the Apache ecosystem. Also, we want to analyze stack traces to validate the identified failures by our checker.