Code generation is crucial to reduce manual software development efforts. Recently, neural techniques have been used to generate source code automatically. While promising, these approaches are evaluated on tasks for generating code in single programming languages. However, in actual development, one programming language is often embedded in another. For example, SQL statements are often embedded as strings in base programming languages such as Python and Java, and JavaScript programs are often embedded in sever-side programming languages, such as PHP, Java, and Python. We call this a turducken-style programming. In this paper, we define a new code generation task: given a natural language comment, this task aims to generate a program in a base language with an embedded language. To our knowledge, this is the first turducken-style code generation task. For this task, we present Lyra: a dataset in Python with embedded SQL. This dataset contains 2,000 carefully annotated database manipulation programs from real usage projects. Each program is paired with both a Chinese comment and an English comment. In our experiment, we adopted Transformer, a state-of-the-art technique, as the baseline. In the best setting, Transformer achieves 0.5% and 1.5% AST exact matching accuracy using Chinese and English comments, respectively. Therefore, we believe that Lyra provides a new challenge for code generation.


翻译:代码生成对于减少人工软件开发努力至关重要 。 最近, 神经技术已被自动地用于生成源代码 。 虽然这些方法很有希望, 但是这些方法在生成单一编程语言代码的任务中得到了评估 。 但是, 在实际开发中, 一种编程语言往往嵌入另一种语言 。 例如, SQL 语句通常作为字符串嵌在基编程语言中, 如 Python 和 Java, 以及 JavaScript 程序通常嵌入于嵌入于嵌入的 Sython 和 JavaScript 等分层编程语言中 。 这个数据集包含2,000 个由实际使用项目( PHP、 Java 和 Python ) 精心加注的数据库操作程序。 我们在本文件中定义了一个新的代码生成任务: 给出自然语言评论, 任务的目的是以嵌入语言生成一个基础语言的程式。 对于我们的知识来说, 这是首个突变式的代码生成任务 。 。 对于这项任务, 我们使用 最精确的版本, 和最精确的 Ry- prefile 。

0
下载
关闭预览

相关内容

强化学习最新教程,17页pdf
专知会员服务
167+阅读 · 2019年10月11日
计算机视觉最佳实践、代码示例和相关文档
专知会员服务
17+阅读 · 2019年10月9日
Call for Participation: Shared Tasks in NLPCC 2019
中国计算机学会
5+阅读 · 2019年3月22日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
16+阅读 · 2018年12月24日
PTGAN for Person Re-Identification
统计学习与视觉计算组
4+阅读 · 2018年9月10日
已删除
将门创投
5+阅读 · 2018年3月21日
推荐|深度强化学习聊天机器人(附论文)!
全球人工智能
4+阅读 · 2018年1月30日
【推荐】自然语言处理(NLP)指南
机器学习研究会
35+阅读 · 2017年11月17日
gan生成图像at 1024² 的 代码 论文
CreateAMind
4+阅读 · 2017年10月31日
Auto-Encoding GAN
CreateAMind
7+阅读 · 2017年8月4日
Arxiv
0+阅读 · 2021年10月16日
Arxiv
0+阅读 · 2021年10月15日
Adversarial Mutual Information for Text Generation
Arxiv
13+阅读 · 2020年6月30日
VIP会员
相关VIP内容
强化学习最新教程,17页pdf
专知会员服务
167+阅读 · 2019年10月11日
计算机视觉最佳实践、代码示例和相关文档
专知会员服务
17+阅读 · 2019年10月9日
相关资讯
Call for Participation: Shared Tasks in NLPCC 2019
中国计算机学会
5+阅读 · 2019年3月22日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
16+阅读 · 2018年12月24日
PTGAN for Person Re-Identification
统计学习与视觉计算组
4+阅读 · 2018年9月10日
已删除
将门创投
5+阅读 · 2018年3月21日
推荐|深度强化学习聊天机器人(附论文)!
全球人工智能
4+阅读 · 2018年1月30日
【推荐】自然语言处理(NLP)指南
机器学习研究会
35+阅读 · 2017年11月17日
gan生成图像at 1024² 的 代码 论文
CreateAMind
4+阅读 · 2017年10月31日
Auto-Encoding GAN
CreateAMind
7+阅读 · 2017年8月4日
Top
微信扫码咨询专知VIP会员