CodeGen-Test: An Automatic Code Generation Model Integrating Program Test Information

By Maosheng Zhong, Gen Liu, HongWei Li, Jiangling Kuang, Jinshan Zeng, Mingwen Wang. 2022

16 citations recorded by the source corpus.

Automatic code generation is to generate the program code of the corresponding language according to the given natural language description. At present, the mainstream methods basically use neural network to encode natural language description, form an abstract syntax tree in the decoder, and then convert the abstract syntax tree into program code. Although the generated code conforms to specific syntax rules, two problems are still ignored: one is the lack of program testing, which is an indispensable step in the process of complete code implementation; Second, it only focuses on whether the generated code meets the syntax requirements, ignoring the more important requirement - functional requirements. This paper constructs a CodeGen test model for integrating code testing, that is, on the basis of generating code that meets the syntax requirements, add program testing steps, integrate program testing information, and iteratively generate code that meets the functional requirements of the program, so as to improve the quality of code generation. This paper evaluates the effect of CodeGen test model on a python data set "hearthstone legend". The experimental results show that this method can effectively improve the quality of generated code. Compared with the existing optimal model, CodeGen test model improves the Bleu value by 0.4%, Rougel value by 0.4%.

Subfields: Computer Science Applications, Control and Systems Engineering, Software, Code Generation & Program Synthesis

How researchers see this paper

The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.

In Computer Science Applications

  1. Armando Solar-Lezama
  2. Koushik Sen
  3. Rishabh Singh

In Control and Systems Engineering

  1. Armando Solar-Lezama
  2. Tianjun Zhang

In Software

  1. Armando Solar-Lezama
  2. Koushik Sen
  3. Naman Jain
  4. Tianjun Zhang
  5. Ion Stoica
  6. Patrice Godefroid
  7. Rishabh Singh
  8. Gordon Fraser

In Code Generation & Program Synthesis

  1. Armando Solar-Lezama
  2. Koushik Sen
  3. Rishabh Singh

Citations in the corpus