Pluggable checking and inferencing of nonnull types for Java
(2007) In Journal of Object Technology 6(9). p.455-475- Abstract
- We have implemented a non-null type checker for Java and a new non-null inferencing algorithm for analyzing legacy code. The tools are modular extensions to the JastAdd extensible Java compiler, illustrating how pluggable type systems can be achieved. The resulting implementation is compact, less than 230 lines of code for the non-null checker and 460 for the inferencer. Non-null checking is a local analysis with little effect on compilation time. The inferencing algorithm is a whole-program analysis, yet it runs sufficiently fast for practical use, less than 10 seconds for 100.000 lines of code. We ran our inferencer on a large part of the JDK library, and could detect that around 70% of the dereferences, and around 24% of the method... (More)
- We have implemented a non-null type checker for Java and a new non-null inferencing algorithm for analyzing legacy code. The tools are modular extensions to the JastAdd extensible Java compiler, illustrating how pluggable type systems can be achieved. The resulting implementation is compact, less than 230 lines of code for the non-null checker and 460 for the inferencer. Non-null checking is a local analysis with little effect on compilation time. The inferencing algorithm is a whole-program analysis, yet it runs sufficiently fast for practical use, less than 10 seconds for 100.000 lines of code. We ran our inferencer on a large part of the JDK library, and could detect that around 70% of the dereferences, and around 24% of the method return values, were guaranteed to be non-null. (Less)
Please use this url to cite or link to this publication:
https://lup.lub.lu.se/record/772766
- author
- Ekman, Torbjörn LU and Hedin, Görel LU
- organization
- publishing date
- 2007
- type
- Contribution to journal
- publication status
- published
- subject
- in
- Journal of Object Technology
- volume
- 6
- issue
- 9
- pages
- 455 - 475
- publisher
- ETH, Zürich
- external identifiers
-
- scopus:36048972694
- ISSN
- 1660-1769
- language
- English
- LU publication?
- yes
- id
- c68ecb09-fbfe-4119-8650-97220d9f3bab (old id 772766)
- alternative location
- http://www.jot.fm/issues/issue_2007_10/paper23/
- date added to LUP
- 2016-04-01 16:25:18
- date last changed
- 2022-04-22 21:57:13
@article{c68ecb09-fbfe-4119-8650-97220d9f3bab, abstract = {{We have implemented a non-null type checker for Java and a new non-null inferencing algorithm for analyzing legacy code. The tools are modular extensions to the JastAdd extensible Java compiler, illustrating how pluggable type systems can be achieved. The resulting implementation is compact, less than 230 lines of code for the non-null checker and 460 for the inferencer. Non-null checking is a local analysis with little effect on compilation time. The inferencing algorithm is a whole-program analysis, yet it runs sufficiently fast for practical use, less than 10 seconds for 100.000 lines of code. We ran our inferencer on a large part of the JDK library, and could detect that around 70% of the dereferences, and around 24% of the method return values, were guaranteed to be non-null.}}, author = {{Ekman, Torbjörn and Hedin, Görel}}, issn = {{1660-1769}}, language = {{eng}}, number = {{9}}, pages = {{455--475}}, publisher = {{ETH, Zürich}}, series = {{Journal of Object Technology}}, title = {{Pluggable checking and inferencing of nonnull types for Java}}, url = {{http://www.jot.fm/issues/issue_2007_10/paper23/}}, volume = {{6}}, year = {{2007}}, }