A Syntactic Neural Model for General-Purpose Code Generation

被引:281
|
作者
Yin, Pengcheng [1 ]
Neubig, Graham [1 ]
机构
[1] Carnegie Mellon Univ, Language Technol Inst, Pittsburgh, PA 15213 USA
关键词
D O I
10.18653/v1/P17-1041
中图分类号
TP39 [计算机的应用];
学科分类号
081203 ; 0835 ;
摘要
We consider the problem of parsing natural language descriptions into source code written in a general-purpose programming language like Python. Existing data-driven methods treat this problem as a language generation task without considering the underlying syntax of the target programming language. Informed by previous work in semantic parsing, in this paper we propose a novel neural architecture powered by a grammar model to explicitly capture the target syntax as prior knowledge. Experiments find this an effective way to scale up to generation of complex programs from natural language descriptions, achieving state-of-the-art results that well outperform previous code generation and semantic parsing approaches.
引用
收藏
页码:440 / 450
页数:11
相关论文
共 50 条
  • [1] REX: General-Purpose CNL with Code Generation Support
    Carvalho, Adriano
    [J]. APPLIED SCIENCES-BASEL, 2022, 12 (15):
  • [2] GENERAL-PURPOSE CODE CONVERTER
    GINGIS, MO
    [J]. INSTRUMENTS AND EXPERIMENTAL TECHNIQUES, 1984, 27 (04) : 878 - 881
  • [4] CODEP: Grammatical Seq2Seq Model for General-Purpose Code Generation
    Dong, Yihong
    Li, Ge
    Jin, Zhi
    [J]. ISSTA 2023 - Proceedings of the 32nd ACM SIGSOFT International Symposium on Software Testing and Analysis, 2023, : 188 - 198
  • [5] CODEP: Grammatical Seq2Seq Model for General-Purpose Code Generation
    Dong, Yihong
    Li, Ge
    Jin, Zhi
    [J]. PROCEEDINGS OF THE 32ND ACM SIGSOFT INTERNATIONAL SYMPOSIUM ON SOFTWARE TESTING AND ANALYSIS, ISSTA 2023, 2023, : 188 - 198
  • [6] BodyGAN: General-purpose Controllable Neural Human Body Generation
    Yang, Chaojie
    Li, Hanhui
    Wu, Shengjie
    Zhang, Shengkai
    Yan, Haonan
    Jiao, Nianhong
    Tang, Jie
    Zhou, Runnan
    Liang, Xiaodan
    Zheng, Tianxiang
    [J]. 2022 IEEE/CVF CONFERENCE ON COMPUTER VISION AND PATTERN RECOGNITION (CVPR), 2022, : 7723 - 7732
  • [7] POSTBUCKLING ANALYSIS USING A GENERAL-PURPOSE CODE
    THURSTON, GA
    BROGAN, FA
    STEHLIN, P
    [J]. AIAA JOURNAL, 1986, 24 (06) : 1013 - 1020
  • [8] ANALYZING ROTOR DYNAMICS WITH A GENERAL-PURPOSE CODE
    ELLIOTT, AS
    MCCONVILLE, JB
    [J]. MECHANICAL ENGINEERING, 1990, 112 (12): : 21 - 25
  • [9] A General-Purpose Model Translation System for a Universal Neural Chip
    Galluppi, Francesco
    Rast, Alexander
    Davies, Sergio
    Furber, Steve
    [J]. NEURAL INFORMATION PROCESSING: THEORY AND ALGORITHMS, PT I, 2010, 6443 : 58 - 65
  • [10] GENERAL-PURPOSE COMPOSITIONAL MODEL
    ACS, G
    DOLESCHALL, S
    FARKAS, E
    [J]. SOCIETY OF PETROLEUM ENGINEERS JOURNAL, 1985, 25 (04): : 543 - 553