DocumentCode
3141676
Title
Automatic testing of sequential and concurrent substitutability
Author
Pradel, Michael ; Gross, Thomas R.
Author_Institution
Dept. of Comput. Sci., ETH Zurich, Zurich, Switzerland
fYear
2013
fDate
18-26 May 2013
Firstpage
282
Lastpage
291
Abstract
Languages with inheritance and polymorphism assume that a subclass instance can substitute a superclass instance without causing behavioral differences for clients of the superclass. However, programmers may accidentally create subclasses that are semantically incompatible with their superclasses. Such subclasses lead to bugs, because a programmer may assign a subclass instance to a superclass reference. This paper presents an automatic testing technique to reveal subclasses that cannot safely substitute their superclasses. The key idea is to generate generic tests that analyze the behavior of both the subclass and its superclass. If using the subclass leads to behavior that cannot occur with the superclass, the analysis reports a warning. We find a high percentage of widely used Java classes, including classes from JBoss, Eclipse, and Apache Commons Collections, to be unsafe substitutes for their superclasses: 30% of these classes lead to crashes, and even more have other behavioral differences.
Keywords
Java; concurrency control; program debugging; program testing; Apache commons collections; Eclipse classes; JBoss classes; Java classes; automatic testing technique; behavioral differences; bugs; concurrent substitutability; languages; polymorphism; programmers; sequential substitutability; subclass instance; superclass instance; superclass reference; Computer bugs; Generators; Java; Libraries; Programming; Runtime;
fLanguage
English
Publisher
ieee
Conference_Titel
Software Engineering (ICSE), 2013 35th International Conference on
Conference_Location
San Francisco, CA
Print_ISBN
978-1-4673-3073-2
Type
conf
DOI
10.1109/ICSE.2013.6606574
Filename
6606574
Link To Document