当前位置: X-MOL 学术IEEE Trans. Softw. Eng. › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
Learning to Predict User-Defined Types
IEEE Transactions on Software Engineering ( IF 7.4 ) Pub Date : 2022-05-30 , DOI: 10.1109/tse.2022.3178945
Kevin Jesse 1 , Premkumar Devanbu 1 , Anand Ashok Sawant 1
Affiliation  

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.

中文翻译:

学习预测用户定义的类型

TypeScript 是一种广泛采用的渐进式类型化语言,开发人员可以在其中选择性地键入变量、函数、参数等。ML(机器学习)的概率类型推理方法非常适用于常见类型,例如布尔值 ,数字 , 和细绳 . TypeScript 允许多种类型,包括开发人员定义的类名和类型接口。这些开发人员定义的类型,称为用户定义的类型,可以在语言命名约定的范围内编写。用户定义的类型集是无限的,现有的有界类型猜测方法是一个不完美的解决方案。现有工作要么在用户定义类型中执行不足,要么完全忽略用户定义类型。这项工作利用具有多任务学习目标的 BERT 风格的预训练模型来学习如何键入用户定义的类和接口。因此我们提出DiverseTyper ,一种通过将类和接口声明独特地对齐到使用它们的地方来探索不同的用户定义类型集的解决方案。DiverseTyper 超越了所有现有作品,包括那些为用户定义类型建模的作品。
更新日期:2022-05-30
down
wechat
bug