基于深度学习的代码生成方法研究进展
作者:
作者单位:

作者简介:

通讯作者:

中图分类号:

基金项目:

国家重点研发计划(2022YFB3103900);国家自然科学基金(62002084,62192733,62192731,61751210,62072007,61832009,62192730);广东省自然科学基金面上项目(2023A1515011959);深圳市基础研究专项面上项目(JCYJ20220531095214031);香港研究资助局项目(CUHK14210920)


Deep Learning Based Code Generation Methods: Literature Review
Author:
Affiliation:

Fund Project:

  • 摘要
  • |
  • 图/表
  • |
  • 访问统计
  • |
  • 参考文献
  • |
  • 相似文献
  • |
  • 引证文献
  • |
  • 资源附件
  • |
  • 文章评论
    摘要:

    关注根据自然语言描述生成相关代码片段的代码生成(code generation)任务. 在软件开发过程中, 开发人员常常会面临两种情形. 一种是通用功能的实现, 需要开发人员编写大量重复且技术含量较低的代码; 另一种是依赖于特定任务要求, 需要开发人员查询文档或使用其他工具才能完成的代码编写工作. 代码生成作为最直接辅助开发人员完成编码的工作受到学术界和工业界的广泛关注. 让机器理解用户需求, 自行完成程序编写也一直是软件工程领域重点关注的问题之一. 近年来, 随着深度学习在软件工程领域任务中的不断发展, 尤其是预训练模型的引入使得代码生成任务取得了十分优异的性能. 系统梳理当前基于深度学习的代码生成相关工作, 并将目前基于深度学习的代码生成方法分为3类: 基于代码特征的方法、 结合检索的方法以及结合后处理的方法. 第1类是指使用深度学习算法利用代码特征进行代码生成的方法, 第2类和第3类方法依托于第1类方法进行改进. 依次对每一类方法的已有研究成果进行系统的梳理、 分析与总结. 除此之外, 汇总并分析已有的代码生成工作中常用的语料库与评估方法, 以便于后续研究进行实验设计. 最后, 对代码生成方法研究进展进行总结, 并针对未来值得关注的研究方向进行展望.

    Abstract:

    This study focuses on Code Generation task that aims at generating relevant code fragments according to given natural language descriptions. In the process of software development, developers often encounter two scenarios. One is writing a large amount of repetitive and low-technical code for implementing common functionalities. The other is writing code that depends on specific task requirements, which may necessitate external resources such as documentation or other tools. Therefore, code generation has received a lot of attention among academia and industry for assisting developers in coding. It has also been one of the key concerns in the field of software engineering to make machines understand users’ requirements and write programs on their own. The recent development of deep learning techniques, especially pre-training models, makes the code generation task achieve promising performance. In this study, the current work on deep learning-based code generation is systematically reviewed and the current deep learning-based code generation methods are classified into three categories: methods based on code features, methods incorporated with retrieval, and methods incorporated with post-processing. The first category refers to the methods that use deep learning algorithms for code generation based on code features, and the second and third categories improve the performance of the methods in the first category. The existing research results of each category of methods are systematically reviewed, summarized, and commented. Besides, the study analyzes the corpus and the popular evaluation metrics used in the existing code generation work. Finally, it summarizes the overall literature review and provides a prospect for future research directions worthy of attention.

    参考文献
    相似文献
    引证文献
引用本文

杨泽洲,陈思榕,高翠芸,李振昊,李戈,吕荣聪.基于深度学习的代码生成方法研究进展.软件学报,2024,35(2):604-628

复制
分享
文章指标
  • 点击次数:
  • 下载次数:
  • HTML阅读次数:
  • 引用次数:
历史
  • 收稿日期:2023-03-05
  • 最后修改日期:2023-05-01
  • 录用日期:
  • 在线发布日期: 2023-10-25
  • 出版日期:
您是第位访问者
版权所有:中国科学院软件研究所 京ICP备05046678号-3
地址:北京市海淀区中关村南四街4号,邮政编码:100190
电话:010-62562563 传真:010-62562533 Email:jos@iscas.ac.cn
技术支持:北京勤云科技发展有限公司

京公网安备 11040202500063号