| 4 | |
| 5 | '''Keywords:''' Dynamically Typed Programming Languages, Type Inference, Dynamic Analysis, Unit Tests |
| 6 | |
| 7 | Dynamically typed programming languages are powerful tools for rapid software development. |
| 8 | However, there are scenarios that would benefit from actual type information being available—e. g., code generation and optimisation as well as program comprehension. |
| 9 | Since code written in such languages usually makes little or no explicit assumptions about types, static type inference is not particularly well suited to obtain the desired information. |
| 10 | |
| 11 | Our approach introduces type harvesting, a practical approach to obtaining type information. |
| 12 | |
| 13 | It is based on stepwise code execution of the code in question, closely observing the types of entities in question. |
| 14 | |
| 15 | Type harvesting allows for exploiting unit tests to automatically obtain type information for a code base. |
| 16 | Its evaluation, using several complex applications, shows that type harvesting yields excellent results with high precision. |
| 17 | |
| 18 | == Demonstration == |
| 19 | |
| 20 | == More information == |
| 21 | |
| 22 | * Michael Haupt, Michael Perscheid, Robert Hirschfeld. ''Type Harvesting – A Practical Approach to Obtaining Typing Information in Dynamic Programming Languages.'' In Proceedings of ACM Symposium on Applied Computing (SAC 2011), TaiChung, Taiwan, March 2011, ACM. ([http://michaelperscheid.de/publications/papers/HauptPerscheidHirschfeld_2011_TypeHarvestingAPracticalApproachToObtainingTypingInformationInDynamicProgrammingLanguages_AcmDL.pdf PDF]) |