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

使用文法驱动的Tree-to-Tree模型的程序语言翻译

Program Language Translation Using a Grammar-Driven Tree-to-Tree Model

Harvey Mudd College(哈维穆德学院)

Mehdi Drissi, Olivia Watkins, Aditya Khant, Vivaswat Ojha, Pedro Sandoval, Rakia Segev, Eric Weiner, Robert Keller

摘要:

在程序设计语言之间进行翻译的任务与翻译自然语言的挑战不同之处在于,程序设计语言是用一组严格得多的结构和语法规则来设计的。以前的工作已经使用了树到树的编码器/解码器模型,以在翻译期间利用程序的固有树结构。然而,神经解码器默认不利用目标语言的已知语法规则。在本文中,我们描述了一个树解码器,利用知识的语言的语法规则,专门生成语法正确的程序。我们发现,这种基于语法的树到树模型优于最先进的树到树模型在两种程序设计语言之间的翻译先前使用的合成任务。

英文摘要:

The task of translating between programming languages differs from the challenge of translating natural languages in that programming languages are designed with a far more rigid set of structural and grammatical rules. Previous work has used a tree-to-tree encoder/decoder model to take advantage of the inherent tree structure of programs during translation. Neural decoders, however, by default do not exploit known grammar rules of the target language. In this paper, we describe a tree decoder that leverages knowledge of a language's grammar rules to exclusively generate syntactically correct programs. We find that this grammar-based tree-to-tree model outperforms the state of the art tree-to-tree model in translating between two programming languages on a previously used synthetic task.

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

↑