DocumentCode
1727485
Title
Changing Java´s Semantics for Handling Null Pointer Exceptions
Author
Dobolyi, Kinga ; Weimer, Westley
Author_Institution
Univ. of Virginia, Charlottesville, VA
fYear
2008
Firstpage
47
Lastpage
56
Abstract
We envision a world where no exceptions are raised; instead, language semantics are changed so that operations are total functions. Either an operation executes normally or tailored recovery code is applied where exceptions would have been raised. As an initial step and evaluation of this idea, we propose to transform programs so that null pointer dereferences are handled automatically without a large runtime overhead. We increase robustness by replacing code that raises null pointer exceptions with error-handling code, allowing the program to continue execution. Our technique first finds potential null pointer dereferences and then automatically transforms programs to insert null checks and error-handling code. These transformations are guided by composable, context-sensitive recovery policies. Error-handling code may, for example, create default objects of the appropriate types, or restore data structure invariants. If no null pointers would be dereferenced, the transformed program behaves just as the original.We applied our transformation in experiments involving multiple benchmarks, the Java Standard Library, and externally reported null pointer exceptions. Our technique was able to handle the reported exceptions and allow the programs to continue to do useful work, with an average execution time overhead of less than 1% and an average bytecode space overhead of 22%.
Keywords
Java; programming language semantics; Java Standard Library; context-sensitive recovery policies; error-handling code; language semantics; null checks; null pointer exceptions; Data structures; Databases; Java; Libraries; Null value; Reliability engineering; Robustness; Runtime; Software reliability; Virtual machining; Null pointer; error handling; exception; recovery;
fLanguage
English
Publisher
ieee
Conference_Titel
Software Reliability Engineering, 2008. ISSRE 2008. 19th International Symposium on
Conference_Location
Seattle, WA
ISSN
1071-9458
Print_ISBN
978-0-7695-3405-3
Electronic_ISBN
1071-9458
Type
conf
DOI
10.1109/ISSRE.2008.59
Filename
4700309
Link To Document