Mining the Ecosystem to Improve Type Inference For Dynamically Typed Languages


Autoria(s): Spasojevic, Boris; Lungu, Mircea; Nierstrasz, Oscar
Data(s)

2014

Resumo

Dynamically typed languages lack information about the types of variables in the source code. Developers care about this information as it supports program comprehension. Ba- sic type inference techniques are helpful, but may yield many false positives or negatives. We propose to mine information from the software ecosys- tem on how frequently given types are inferred unambigu- ously to improve the quality of type inference for a single system. This paper presents an approach to augment existing type inference techniques by supplementing the informa- tion available in the source code of a project with data from other projects written in the same language. For all available projects, we track how often messages are sent to instance variables throughout the source code. Predictions for the type of a variable are made based on the messages sent to it. The evaluation of a proof-of-concept prototype shows that this approach works well for types that are sufficiently popular, like those from the standard librarie, and tends to create false positives for unpopular or domain specific types. The false positives are, in most cases, fairly easily identifiable. Also, the evaluation data shows a substantial increase in the number of correctly inferred types when compared to the non-augmented type inference.

Formato

application/pdf

Identificador

http://boris.unibe.ch/67055/1/p133-spasojevic.pdf

Spasojevic, Boris; Lungu, Mircea; Nierstrasz, Oscar (2014). Mining the Ecosystem to Improve Type Inference For Dynamically Typed Languages. In: Proceedings of the 2014 ACM International Symposium on New Ideas, New Paradigms, and Reflections on Programming and Software. Onward! '14 (pp. 133-142). New York, NY, USA: ACM 10.1145/2661136.2661141 <http://dx.doi.org/10.1145/2661136.2661141>

doi:10.7892/boris.67055

info:doi:10.1145/2661136.2661141

urn:isbn:978-1-4503-3210-1

Idioma(s)

eng

Publicador

ACM

Relação

http://boris.unibe.ch/67055/

http://scg.unibe.ch/archive/papers/Spas14c.pdf

Direitos

info:eu-repo/semantics/restrictedAccess

Fonte

Spasojevic, Boris; Lungu, Mircea; Nierstrasz, Oscar (2014). Mining the Ecosystem to Improve Type Inference For Dynamically Typed Languages. In: Proceedings of the 2014 ACM International Symposium on New Ideas, New Paradigms, and Reflections on Programming and Software. Onward! '14 (pp. 133-142). New York, NY, USA: ACM 10.1145/2661136.2661141 <http://dx.doi.org/10.1145/2661136.2661141>

Palavras-Chave #000 Computer science, knowledge & systems #510 Mathematics
Tipo

info:eu-repo/semantics/conferenceObject

info:eu-repo/semantics/publishedVersion

PeerReviewed