Pseudocode to Code Based on Adaptive Global and Local Information

Qianqian Yu,Zhangjin Huang,Naijie Gu
DOI: https://doi.org/10.1109/saner56733.2023.00016
2023-01-01
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.
What problem does this paper attempt to address?