Type Harvesting

Keywords: Dynamically Typed Programming Languages, Type Inference, Dynamic Analysis, Unit Tests

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, static type inference is not particularly well suited to obtain the desired information.

Our approach introduces type harvesting, a practical approach to obtaining type information. For a specified system under observation, we wrap all corresponding methods and closely observe their types at run-time. Type harvesting allows for exploiting unit tests to automatically obtain type information for a code base. Its evaluation, using several complex applications, shows that type harvesting yields excellent results with high precision.


More information

  • 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. (PDF)
Last modified 4 years ago Last modified on 12/18/2013 04:41:38 PM

Attachments (1)

Download all attachments as: .zip