BORIS Theses

BORIS Theses
Bern Open Repository and Information System

Augmenting Type Inference with Lightweight Heuristics

Lazarevic, Nevena (2017). Augmenting Type Inference with Lightweight Heuristics. (Thesis). Universität Bern, Bern

[img]
Preview
Text
17lazarevic_n.pdf - Thesis
Available under License Creative Commons: Attribution-Share Alike (CC-BY-SA 4.0).

Download (1MB) | Preview

Abstract

Static type information facilitates program comprehension and analysis. Yet, such information is absent in dynamically-typed languages, and that increases the time needed for software maintenance. Type inference algorithms may provide type information to developers, but in order to be fast and assist in development phase, they sacrifice the precision for speed. One of the biggest obstacles for their precision is polymorphism presence. In this thesis we first analyse the prevalence of polymorphism in object-oriented software, to assess the criticality it imposes on simple type inference. We find that polymorphism is omnipresent in object-oriented code, and that static analysis in dynamically-typed languages is also hampered by the usage of cross-hierarchy polymorphism, i.e., duck typing. As this big obstacle for static code analysis cannot be bypassed, we propose the need for lightweight heuristics to tackle the problem of imprecision of simple type inference algorithms. Four lightweight heuristics are employed to improve the performance of two simple and fast type inference approaches. These heuristics are founded on the source code and run-time information that are easy to collect without interrupting the workflow of a developer. The heuristics are evaluated and compared with the underlying algorithms based on their inference time and precision. All of them show a significant improvement when compared to the basic algorithm. They introduce a negligible overhead on the inference time, thus we deem them usable during regular coding tasks.

Item Type: Thesis
Dissertation Type: Single
Date of Defense: 2017
Additional Information: e-Dissertationen (edbe)
Subjects: 000 Computer science, knowledge & systems
500 Science > 510 Mathematics
Institute / Center: 08 Faculty of Science > Institute of Computer Science (INF)
08 Faculty of Science > Institute of Computer Science (INF) > Software Composition Group (SCG)
Depositing User: Admin importFromBoris
Date Deposited: 25 Jan 2019 12:57
Last Modified: 04 Feb 2019 08:19
URI: https://boristheses.unibe.ch/id/eprint/846

Actions (login required)

View Item View Item