arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1907.08615cs.SEcs.LGstat.ML
收藏

Source Code的逻辑分段

Logical Segmentation of Source Code

Two Six Labs(Two Six实验室)

Jacob Dormuth, Ben Gelman, Jessica Moore, David Slater

摘要:

许多软件分析方法都依赖于机器学习方法。代码分割-将源代码分解为有意义的块的过程-可以通过特征化代码,减少噪音和限制问题空间来增强这些方法。传统上,代码分割是使用语法线索来完成的;当前的方法并没有有意地捕获逻辑内容。我们开发了一种新颖的深度学习方法来生成逻辑代码段,而不管代码的语言或语法正确性如何。由于缺乏逻辑分段的源代码,我们引入了一个独特的数据集的建设技术,以近似地面真理的逻辑分段代码。逻辑代码分段可以改进诸如自动注释代码、检测软件漏洞、修复bug、标记代码功能以及合成新代码之类的任务。

英文摘要:

Many software analysis methods have come to rely on machine learning approaches. Code segmentation - the process of decomposing source code into meaningful blocks - can augment these methods by featurizing code, reducing noise, and limiting the problem space. Traditionally, code segmentation has been done using syntactic cues; current approaches do not intentionally capture logical content. We develop a novel deep learning approach to generate logical code segments regardless of the language or syntactic correctness of the code. Due to the lack of logically segmented source code, we introduce a unique data set construction technique to approximate ground truth for logically segmented code. Logical code segmentation can improve tasks such as automatically commenting code, detecting software vulnerabilities, repairing bugs, labeling code functionality, and synthesizing new code.

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

↑