Augmenting Type Inference with Lightweight Heuristics

Lazarevic, Nevena (2017). Augmenting Type Inference with Lightweight Heuristics. (Dissertation, Universität Bern, Philosophisch-naturwissenschaftliche Fakultät)

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

Download (1MB) | Preview

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)

Division/Institute:

08 Faculty of Science > Institute of Computer Science (INF)
08 Faculty of Science > Institute of Computer Science (INF) > Software Composition Group (SCG) [discontinued]

UniBE Contributor:

Lazarevic, Nevena, Nierstrasz, Oscar

Subjects:

000 Computer science, knowledge & systems
500 Science > 510 Mathematics

Language:

English

Submitter:

Igor Peter Hammer

Date Deposited:

29 Mar 2018 12:07

Last Modified:

02 Mar 2023 23:30

URN:

urn:nbn:ch:bel-bes-3217

Additional Information:

e-Dissertationen (edbe)

BORIS DOI:

10.7892/boris.113991

URI:

https://boris.unibe.ch/id/eprint/113991

Actions (login required)

Edit item Edit item
Provide Feedback