arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2202.12481cs.LGcs.PLcs.SE
收藏

面向程序设计语言处理的多视图图表示:算法检测研究

Multi-View Graph Representation for Programming Language Processing: An Investigation into Algorithm Detection

Shanghai Jiao Tong University(上海交通大学);University of Michigan(密歇根大学)

Ting Long, Yutong Xie, Xianyu Chen, Weinan Zhang, Qinxiang Cao, Yong Yu

摘要:

程序表示是程序设计语言处理中的一个基本问题,其目的是将程序源代码转换为具有自动提取特征的向量。最近的工作试图用基于源代码结构的神经网络来表示程序。然而,这样的方法往往集中在语法和考虑只有一个单一的角度来看,程序,限制了模型的表示能力。提出了一种多视图图(MVG)程序表示方法。MVG更加关注代码语义,同时将数据流和控制流作为多个视图。这些意见,然后组合和处理的图神经网络(GNN),以获得一个全面的程序表示,涵盖各个方面。我们彻底评估我们提出的MVG方法的算法检测,PLP的一个重要的和具有挑战性的子字段的上下文中。具体来说,我们使用公共数据集POJ-104,并构建了一个新的具有挑战性的数据集ALG-109来测试我们的方法。在实验中,MVG的性能显着优于以前的方法,证明了我们的模型具有强大的表示源代码的能力。

英文摘要:

Program representation, which aims at converting program source code into vectors with automatically extracted features, is a fundamental problem in programming language processing (PLP). Recent work tries to represent programs with neural networks based on source code structures. However, such methods often focus on the syntax and consider only one single perspective of programs, limiting the representation power of models. This paper proposes a multi-view graph (MVG) program representation method. MVG pays more attention to code semantics and simultaneously includes both data flow and control flow as multiple views. These views are then combined and processed by a graph neural network (GNN) to obtain a comprehensive program representation that covers various aspects. We thoroughly evaluate our proposed MVG approach in the context of algorithm detection, an important and challenging subfield of PLP. Specifically, we use a public dataset POJ-104 and also construct a new challenging dataset ALG-109 to test our method. In experiments, MVG outperforms previous methods significantly, demonstrating our model's strong capability of representing source code.

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

↑