Many software development problems can be addressed by program analysis tools, which traditionally are based on precise, logical reasoning and heuristics to ensure that the tools are practical. Recent work has shown tremendous success through an alternative way of creating developer tools, which we call neural software analysis. The key idea is to train a neural machine learning model on numerous code examples, which, once trained, makes predictions about previously unseen code. In contrast to traditional program analysis, neural software analysis naturally handles fuzzy information, such as coding conventions and natural language embedded in code, without relying on manually encoded heuristics. This article gives an overview of neural software analysis, discusses when to (not) use it, and presents three example analyses. The analyses address challenging software development problems: bug detection, type prediction, and code completion. The resulting tools complement and outperform traditional program analyses, and are used in industrial practice.
翻译:许多软件开发问题可以通过程序分析工具加以解决,程序分析工具传统上以精确、逻辑推理和逻辑分析为基础,确保工具实用;最近的工作通过一种创建开发工具的替代方法,证明取得了巨大成功,我们称之为神经软件分析。关键的想法是用许多代码实例来培训神经机学习模型,这些范例一旦经过培训,就对先前的未知代码作出预测。与传统的程序分析相比,神经软件分析自然处理模糊信息,例如代码中嵌入的编码惯例和自然语言,而无需依靠手动编码超链接。本文章概述了神经软件分析,讨论了何时(而不是)使用该软件,并介绍了三个实例分析。分析涉及挑战软件开发问题:错误检测、类型预测和代码完成。由此产生的工具补充并超越了传统的程序分析,并用于工业实践。