arrow
Return

Learning to Predict User-Defined Types

delete2023-04-01
delete4
PRE
AI
K
Kevin Jesse *
P
Prémkumar Dévanbu
A
Anand Ashok Sawant
DOI:10.1109/TSE.2022.3178945delete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

Abstract

En 中文
TypeScript is a widely adopted gradual typed language where developers can optionally type variables, functions, parameters and more. Probabilistic type inference approaches with ML (machine learning) work well especially for commonly occurring types such as boolean, number, and string. TypeScript permits a wide range of types including developer defined class names and type interfaces. These developer defined types, termed user-defined types, can be written within the realm of language naming conventions. The set of user-defined types is boundless and existing bounded type guessing approaches are an imperfect solution. Existing works either under perform in user-defined types or ignore user-defined types altogether. This work leverages a BERT-style pre-trained model, with multi-task learning objectives, to learn how to type user-defined classes and interfaces. Thus we present DiverseTyper, a solution that explores the diverse set of user-defined types by uniquely aligning classes and interfaces declarations to the places in which they are used. DiverseTyper surpasses all existing works including those that model user-defined types.
Keywords:
Annotations
Codes
Vocabulary
Encoding
Task analysis
Software development management
Training
Multi-Task learning
representation learning
transfer learning
type inference

Journal

IEEE Transactions on Software Engineering cover
IEEE Transactions on Software Engineering
IF:
5.6
Papers:
2.8K
Citations:
1.1W

Organization

University of California System cover
University of California System
Scholars:
37.5W
Papers: 33.7W
Citations: 6.6K