Related types

4Citations
Citations of this article
15Readers
Mendeley users who have this article in their library.
Get full text

Abstract

We have identified a large class of Java errors that are caused by method calls becoming trivial since their formal and actual argument types are unrelated. A classical example is a call to the equals method on a String object with an Integer argument, which always returns false, but similar situations occur for many other methods in common frameworks. Typically, the programmer has provided the wrong arguments and meant for the call to have a non-trivial effect. We give a thorough analysis of the bug patterns found through our experiments which show that such errors are not only frequent in development code but also persist in production code. We formalize the notion of relatedness between actual and formal types and capture this in an extension of the Java 1.6 type system. The resulting compiler, which is fully implemented and backwards compatible, performs a static analysis that is modular and efficient. © 2011 Springer-Verlag Berlin Heidelberg.

Cite

CITATION STYLE

APA

Winther, J., & Schwartzbach, M. I. (2011). Related types. In Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics) (Vol. 6813 LNCS, pp. 434–458). https://doi.org/10.1007/978-3-642-22655-7_21

Register to see more suggestions

Mendeley helps you to discover research relevant for your work.

Already have an account?

Save time finding and organizing research with Mendeley

Sign up for free