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

基于习得代码习惯用法的程序合成和语义解析

Program Synthesis and Semantic Parsing with Learned Code Idioms

UC Berkeley(加州大学伯克利分校);Microsoft Research(微软研究院)

Richard Shin, Miltiadis Allamanis, Marc Brockschmidt, Oleksandr Polozov

摘要:

由于需要同时推理目标程序中的高级模式和低级实现细节,因此从自然语言规范对通用源代码进行程序合成具有挑战性。在这项工作中,我们提出了PATOIS,一个系统,允许神经程序合成器明确交错高层次和低层次的推理在每一代的步骤。它通过从给定的语料库中自动挖掘常见的代码习惯用法,将它们合并到神经合成的底层语言中,并训练基于树的神经合成器在代码生成期间使用这些习惯用法来实现这一点。我们评估两个复杂的语义解析数据集上的PATOIS,并表明使用学习的代码习惯用法提高了合成器的准确性。

英文摘要:

Program synthesis of general-purpose source code from natural language specifications is challenging due to the need to reason about high-level patterns in the target program and low-level implementation details at the same time. In this work, we present PATOIS, a system that allows a neural program synthesizer to explicitly interleave high-level and low-level reasoning at every generation step. It accomplishes this by automatically mining common code idioms from a given corpus, incorporating them into the underlying language for neural synthesis, and training a tree-based neural synthesizer to use these idioms during code generation. We evaluate PATOIS on two complex semantic parsing datasets and show that using learned code idioms improves the synthesizer's accuracy.

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

↑