login

Automatic documentation inference for exceptions

Published 20 July 2008
Raymond P.L. Buse, Westley Weimer
Citations124

TL;DR

A fully automated tool that statically infers and characterizes exception-causing conditions in Java programs based on an inter-procedural, context-sensitive analysis that is well-suited for use as human-readable documentation of exceptional conditions.

Abstract

Exception handling is a powerful and widely-used program-ming language abstraction for constructing robust software systems. Unfortunately, it introduces an inter-procedural flow of control that can be difficult to reason about. Fail-ure to do so correctly can lead to security vulnerabilities, breaches of API encapsulation, and any number of safety policy violations. We present a fully automated tool that statically infers and characterizes exception-causing conditions in Java pro-grams. Our tool is based on an inter-procedural, context-sensitive analysis. The output of this tool is well-suited for use as human-readable documentation of exceptional condi-tions. We evaluate the output of our tool by comparing it to over 900 instances of existing exception documentation in almost two million lines of code. We find that the output of our tool is at least as good as existing documentation 85% of the time and is better 25 % of the time.

Keywords

Computer Science