跳到正文
EasyXiv 检索
投稿 关于 登录

按回车检索 · 直接输入编号(如 1706.03762)可跳转到论文

计算机科学 > 程序设计语言

arXiv:2004.10657 (cs)
[提交于 2020年4月23日]

标题:Typilus: Neural Type Hints

作者:Miltiadis Allamanis, Earl T. Barr, Soline Ducousso, Zheng Gao
查看论文《Typilus: Neural Type Hints》的 PDF
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读
摘要: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 TypeSpace -- a 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 types, including rare and user-defined ones. We realise our approach in Typilus for Python that combines the TypeSpace with an optional type checker. We show that Typilus accurately predicts types. Typilus confidently predicts types for 70% of all annotatable symbols; when it predicts a type, that type optionally type checks 95% of the time. Typilus can also find incorrect type annotations; two important and popular open source libraries, fairseq and allennlp, accepted our pull requests that fixed the annotation errors Typilus discovered.
评论: Accepted to PLDI 2020
主题: 程序设计语言 (cs.PL); 机器学习 (cs.LG); 机器学习 (stat.ML)
引用方式: arXiv:2004.10657 [cs.PL]
  (或者 arXiv:2004.10657v1 [cs.PL] 对于此版本)
  https://doi.org/10.48550/arXiv.2004.10657
相关 DOI: https://doi.org/10.1145/3385412.3385997

提交历史

来自:Miltiadis Allamanis
[v1] 2020年4月23日 星期四 00:00:00 UTC
全文链接:

访问论文:

  • 查看原文 PDF
  • 中文 PDF (下批处理)
  • EasyResearch 阅读
  • TeX 源文件
  • arXiv 原文页面
查看许可

当前浏览上下文:

cs.PL
< 上一篇   |   下一篇 >
最新 | 近期 | 2020-04
切换浏览方式为:
cs
cs.LG
stat.ML

参考文献与引用

  • Google Scholar
  • Semantic Scholar

BibTeX 格式的引用

EasyXiv 是独立运营的中文预印本站点,与 arXiv 及康奈尔大学无隶属关系。 论文元数据与原文来自 arXiv.org,感谢 arXiv 提供开放获取服务。
关于 · 帮助 · 投稿指南 · 版权 · arXiv 原站