arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 1910.12306cs.LGcs.SEstat.ML
收藏

TreeCaps:用于程序处理的树形胶囊网络Source Code

TreeCaps: Tree-Structured Capsule Networks for Program Source Code Processing

A*STAR(新加坡科技研究局);Singapore Management University(新加坡管理大学)

Vinoj Jayasundara, Nghi Duy Quoc Bui, Lingxiao Jiang, David Lo

摘要:

程序理解是软件开发和维护过程中的一项基本任务。软件开发人员通常需要了解大量现有代码,然后才能开发新功能或修复现有程序中的错误。能够自动处理程序设计语言代码并准确地提供代码功能的摘要可以显著帮助开发人员减少在代码导航和理解上花费的时间,从而提高生产力。与自然语言文章不同,程序设计语言中的源代码通常遵循严格的语法结构,并且在通过复杂的控制流和数据流彼此远离的代码元素之间可能存在依赖关系。现有的基于树的卷积神经网络(TBCNN)和门控图神经网络(GGNN)的研究不能准确地捕捉代码元素之间的基本语义依赖。在本文中,我们提出了新的基于树的胶囊网络(TreeCaps)和相关技术,用于以自动化的方式处理程序代码,编码代码语法结构,并更准确地捕获代码依赖关系。基于不同的程序设计语言编写的程序的评价,我们表明,我们的TreeCaps为基础的方法可以优于其他方法在许多程序的功能分类。

英文摘要:

Program comprehension is a fundamental task in software development and maintenance processes. Software developers often need to understand a large amount of existing code before they can develop new features or fix bugs in existing programs. Being able to process programming language code automatically and provide summaries of code functionality accurately can significantly help developers to reduce time spent in code navigation and understanding, and thus increase productivity. Different from natural language articles, source code in programming languages often follows rigid syntactical structures and there can exist dependencies among code elements that are located far away from each other through complex control flows and data flows. Existing studies on tree-based convolutional neural networks (TBCNN) and gated graph neural networks (GGNN) are not able to capture essential semantic dependencies among code elements accurately. In this paper, we propose novel tree-based capsule networks (TreeCaps) and relevant techniques for processing program code in an automated way that encodes code syntactical structures and captures code dependencies more accurately. Based on evaluation on programs written in different programming languages, we show that our TreeCaps-based approach can outperform other approaches in classifying the functionalities of many programs.

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

↑