arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1907.06205cs.SEcs.CLcs.FLcs.LGcs.PLstat.ML
收藏

基于神经网络的未声明变量的自动修复和类型绑定

Automatic Repair and Type Binding of Undeclared Variables using Neural Networks

Iowa State University(爱荷华州立大学)

Venkatesh Theru Mohan, Ali Jannesari

摘要:

深度学习已被用于程序分析中,用于使用软件缺陷数据集预测隐藏的软件缺陷,使用生成对抗网络预测安全漏洞,以及通过学习程序代码上经过训练的神经机器翻译来识别语法错误。然而,所有这些方法要么需要缺陷数据集,要么需要可执行的无缺陷源代码来训练深度学习模型。我们的神经网络模型既没有使用任何缺陷数据集进行训练,也没有使用无缺陷的编程源代码,而是使用抽象树(AST)的结构语义细节进行训练,其中每个节点代表源代码中出现的一个构造。这个模型的实现是为了修复最常见的语义错误之一,比如未声明的变量错误,以及在程序编译之前推断它们的类型信息。通过该方法,在1059个程序的Prutor数据集上,只有未声明变量错误的程序,该模型能正确定位和识别81%的程序,并能正确推断出80%的程序类型。

英文摘要:

Deep learning had been used in program analysis for the prediction of hidden software defects using software defect datasets, security vulnerabilities using generative adversarial networks as well as identifying syntax errors by learning a trained neural machine translation on program codes. However, all these approaches either require defect datasets or bug-free source codes that are executable for training the deep learning model. Our neural network model is neither trained with any defect datasets nor bug-free programming source codes, instead it is trained using structural semantic details of Abstract Syntax Tree (AST) where each node represents a construct appearing in the source code. This model is implemented to fix one of the most common semantic errors, such as undeclared variable errors as well as infer their type information before program compilation. By this approach, the model has achieved in correctly locating and identifying 81% of the programs on prutor dataset of 1059 programs with only undeclared variable errors and also inferring their types correctly in 80% of the programs.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑