Proceedings of the 41st ACM SIGPLAN Conference on Programming Language Design and Implementation 2020
DOI: 10.1145/3385412.3385997
|View full text |Cite
|
Sign up to set email alerts
|

Typilus: neural type hints

Abstract: Type inference over partial contexts in dynamically typed languages is challenging. In this work, we present a graph neural network model that predicts types by probabilistically reasoning over a program's structure, names, and patterns. The network uses deep similarity learning to learn a TypeSpacea continuous relaxation of the discrete space of types-and how to embed the type properties of a symbol (i.e. identifier) into it. Importantly, our model can employ one-shot learning to predict an open vocabulary of… Show more

Help me understand this report
View preprint versions

Search citation statements

Order By: Relevance

Paper Sections

Select...
2
2
1

Citation Types

1
68
0

Year Published

2021
2021
2024
2024

Publication Types

Select...
3
3
2

Relationship

0
8

Authors

Journals

citations
Cited by 100 publications
(77 citation statements)
references
References 38 publications
1
68
0
Order By: Relevance
“…Machine Learning for Software Engineering has seen rapid development in recent years inspired by the successful application in the Natural Language Processing field [17]. It is applied in many tasks related to software code such as code translation (e.g., [18]), type inference (e.g., [9,10]), code refactoring (e.g., [19]) and, as we list below, bug identification.…”
Section: Related Workmentioning
confidence: 99%
See 2 more Smart Citations
“…Machine Learning for Software Engineering has seen rapid development in recent years inspired by the successful application in the Natural Language Processing field [17]. It is applied in many tasks related to software code such as code translation (e.g., [18]), type inference (e.g., [9,10]), code refactoring (e.g., [19]) and, as we list below, bug identification.…”
Section: Related Workmentioning
confidence: 99%
“…In future work, we also plan to make use of techniques such as Byte-Pair Encoding (BPE) [34,35], which attempts to mitigate the impact of out-of-vocabulary tokens. We note that the use of BPE is becoming more and more common in software engineering models (e.g., [10,33,36]).…”
Section: Future Workmentioning
confidence: 99%
See 1 more Smart Citation
“…Type Inference: Debin also attempted to recover type information -which is a different problem. Typilus (Allamanis et al, 2020) is a new GGNN-based approach for type inference.…”
Section: Related Workmentioning
confidence: 99%
“…We then compared the types inferred by SimTyper to existing, programmer-written annotations. Following prior work [Allamanis et al 2020], we count the number of cases where the the inferred type matches the existing type, as well as the number of matches up to parameterÐgeneric types where the base matches but the parameter is different (e.g., inferring Array<Integer> when the original was Array<String> would fall in this category). We found that, by combining constraint solving, InferDL heuristics, and type equality prediction from DeepSim, SimTyper generated 66% more type annotations that matched programmer-written types compared to using constraint solving alone.…”
Section: Introductionmentioning
confidence: 99%