Dynamically typed programming languages are powerful tools for rapid software development. However, there are scenarios that would benefit from actual type information being available---e. g., code generation and optimisation as well as program comprehension. Since code written in such languages usually makes little or no explicit assumptions about types, type inference is not particularly well suited to obtain the desired information. This paper introduces type harvesting, a practical approach to obtaining type information. It is based on stepwise code execution of the code in question, closely observing the types of entities in question. Type harvesting allows for exploiting unit tests to automatically obtain type information for a code base. The approach has been implemented in Squeak/Smalltalk. Its evaluation, using several complex applications, shows that type harvesting yields excellent results with high precision.
%0 Conference Paper
%1 Haupt:2011:THP
%A Haupt, Michael
%A Perscheid, Michael
%A Hirschfeld, Robert
%B Proceedings of the 2011 ACM Symposium on Applied Computing
%D 2011
%I ACM
%K SOM Testing Types VM
%P 1282--1289
%R 10.1145/1982185.1982464
%T Type Harvesting: A Practical Approach to Obtaining Typing Information in Dynamic Programming Languages
%U http://www.hpi.uni-potsdam.de/hirschfeld/publications/media/HauptPerscheidHirschfeld_2011_TypeHarvestingAPracticalApproachToObtainingTypingInformationInDynamicProgrammingLanguages_AcmDL.pdf
%X Dynamically typed programming languages are powerful tools for rapid software development. However, there are scenarios that would benefit from actual type information being available---e. g., code generation and optimisation as well as program comprehension. Since code written in such languages usually makes little or no explicit assumptions about types, type inference is not particularly well suited to obtain the desired information. This paper introduces type harvesting, a practical approach to obtaining type information. It is based on stepwise code execution of the code in question, closely observing the types of entities in question. Type harvesting allows for exploiting unit tests to automatically obtain type information for a code base. The approach has been implemented in Squeak/Smalltalk. Its evaluation, using several complex applications, shows that type harvesting yields excellent results with high precision.
%@ 978-1-4503-0113-8
@inproceedings{Haupt:2011:THP,
abstract = {Dynamically typed programming languages are powerful tools for rapid software development. However, there are scenarios that would benefit from actual type information being available---e. g., code generation and optimisation as well as program comprehension. Since code written in such languages usually makes little or no explicit assumptions about types, type inference is not particularly well suited to obtain the desired information. This paper introduces type harvesting, a practical approach to obtaining type information. It is based on stepwise code execution of the code in question, closely observing the types of entities in question. Type harvesting allows for exploiting unit tests to automatically obtain type information for a code base. The approach has been implemented in Squeak/Smalltalk. Its evaluation, using several complex applications, shows that type harvesting yields excellent results with high precision.},
acmid = {1982464},
added-at = {2014-05-13T00:36:32.000+0200},
author = {Haupt, Michael and Perscheid, Michael and Hirschfeld, Robert},
biburl = {https://www.bibsonomy.org/bibtex/270c3022767797f14bf4ec4db9227b111/gron},
booktitle = {Proceedings of the 2011 ACM Symposium on Applied Computing},
description = {Type harvesting},
doi = {10.1145/1982185.1982464},
interhash = {0d5156a30eb9baef0e57c97891f75e84},
intrahash = {70c3022767797f14bf4ec4db9227b111},
isbn = {978-1-4503-0113-8},
keywords = {SOM Testing Types VM},
location = {TaiChung, Taiwan},
numpages = {8},
pages = {1282--1289},
publisher = {ACM},
series = {SAC '11},
timestamp = {2014-05-13T00:36:32.000+0200},
title = {Type Harvesting: A Practical Approach to Obtaining Typing Information in Dynamic Programming Languages},
url = {http://www.hpi.uni-potsdam.de/hirschfeld/publications/media/HauptPerscheidHirschfeld_2011_TypeHarvestingAPracticalApproachToObtainingTypingInformationInDynamicProgrammingLanguages_AcmDL.pdf},
year = 2011
}