Pseudocode to Code Based on Adaptive Global and Local Information
Authors:
- 1 March 2023
- conference paper
- Published by Institute of Electrical and Electronics Engineers (IEEE)
- p. 61-72
Abstract
The pseudocode-to-code task has two main stages: code translation and search synthesis. It faces two main challenges: First, the generated candidate code pieces need to be more accurate. Second, there are problems with search efficiency and accuracy. To address the above challenges, this work proposes a novel approach: For the encoder of code translation, a new multi-scale pyramid feature extractor is proposed to obtain multi-scale local information, which is combined with the global information to improve the accuracy of code translation. For the search synthesis stage, this paper designs the intra-line attention, the inter-line attention, and the code-errMsg attention, which are adaptively integrated with the graph attention to effectively fuse global and local information. Under a budget of 100 program compilations, our final model, AGL-Code, outperforms the previous state-of-the-art models, achieving 46.1%/63.5% synthesis success rate on the TestP/TestW of the SPoC dataset, respectively.Keywords
This publication has 33 references indexed in Scilit:
- An empirical investigation into learning bug-fixing patches in the wild via neural machine translation2018
- Get To The Point: Summarization with Pointer-Generator Networks2017
- A Syntactic Neural Model for General-Purpose Code Generation2017
- Abstract Syntax Networks for Code Generation and Semantic Parsing2017
- OpenNMT: Open-Source Toolkit for Neural Machine Translation2017
- Latent Predictor Networks for Code Generation2016
- An approach to automatic code generation for safety-critical systems2003
- High-integrity code generation for state-based formalisms2000
- STATEMATE: a working environment for the development of complex reactive systemsIEEE Transactions on Software Engineering, 1990
- A Methodology for LISP Program Construction from ExamplesJournal of the ACM, 1977