学习可扩展的精确程序语义表示
Learning Scalable and Precise Representation of Program Semantics
摘要:
神经程序嵌入已显示出帮助分析大规模复杂软件的潜力。新提出的深度神经架构以学习程序语义而不是表面的语法特征为荣。然而,由于只考虑源代码,绝大多数神经网络不能捕获程序语义的深层精确表示。在本文中,我们提出了\dypro,一种新的深度神经网络,从程序执行轨迹学习。与现有的动态模型相比,\dypro不仅能够在多个执行中泛化,以整体地学习程序的动态语义,而且\dypro在处理产生长执行轨迹的程序时也更有效。为了进行评估,我们对\dypro进行了语义分类(即根据语义对程序进行分类),并将其与两个主要的静态模型进行了比较:门控图神经网络和TreeLSTM。我们发现,\dypro达到所有模型中最高的预测精度。为了进一步揭示所有上述深度神经架构的能力,我们研究了模型是否可以学习检测程序的更深层次语义属性。特别是考虑到识别循环不变的任务,我们显示\dypro击败了所有静态模型的一个很大的利润。
英文摘要:
Neural program embedding has shown potential in aiding the analysis of large-scale, complicated software. Newly proposed deep neural architectures pride themselves on learning program semantics rather than superficial syntactic features. However, by considering the source code only, the vast majority of neural networks do not capture a deep, precise representation of program semantics. In this paper, we present \dypro, a novel deep neural network that learns from program execution traces. Compared to the prior dynamic models, not only is \dypro capable of generalizing across multiple executions for learning a program's dynamic semantics in its entirety, but \dypro is also more efficient when dealing with programs yielding long execution traces. For evaluation, we task \dypro with semantic classification (i.e. categorizing programs based on their semantics) and compared it against two prominent static models: Gated Graph Neural Network and TreeLSTM. We find that \dypro achieves the highest prediction accuracy among all models. To further reveal the capacity of all aforementioned deep neural architectures, we examine if the models can learn to detect deeper semantic properties of a program. In particular given a task of recognizing loop invariants, we show \dypro beats all static models by a wide margin.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。