DeepPseudo: Deep Pseudo-code Generation via Transformer and Code Feature Extraction

02/12/2021
by   Guang Yang, et al.
0

Pseudo-code written by natural language is helpful for novice developers' program comprehension. However, writing such pseudo-code is time-consuming and laborious. Motivated by the research advancements of sequence-to-sequence learning and code semantic learning, we propose a novel deep pseudo-code generation method DeepPseudo via Transformer and code feature extraction. In particular, DeepPseudo utilizes both Transformer encoder and code feature extractor to perform encoding for source code. Then it uses a pseudo-code generator to perform decoding, which can generate the corresponding pseudo-code. We choose corpus gathered from a web application framework Django, which contains 18,805 pairs of Python statements and corresponding pseudo-code. We first compare DeepPseudo with seven baselines from pseudo-code generation and neural machine translation domains in terms of four performance measures. Results show the competitiveness of DeepPseudo. Later, we analyze the rationality of the component settings (i.e., the usage of code feature extractor, the attention mechanism, and the positional encoding method) in DeepPseudo. Finally, we perform a human study to verify the effectiveness of DeepPseudo.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
06/14/2019

Generation of Pseudo Code from the Python Source Code using Rule-Based Machine Translation

Pseudo code is one of the valuable artifacts to comprehending the comple...
research
07/08/2021

ComFormer: Code Comment Generation via Transformer and Fusion Method-based Hybrid Code Representation

Developers often write low-quality code comments due to the lack of prog...
research
07/06/2020

Relevance Transformer: Generating Concise Code Snippets with Relevance Feedback

Tools capable of automatic code generation have the potential to augment...
research
03/16/2023

Knowledge Transfer for Pseudo-code Generation from Low Resource Programming Language

Generation of pseudo-code descriptions of legacy source code for softwar...
research
07/07/2017

A parallel corpus of Python functions and documentation strings for automated code documentation and code generation

Automated documentation of programming source code and automated code ge...
research
02/20/2022

DualSC: Automatic Generation and Summarization of Shellcode via Transformer and Dual Learning

A shellcode is a small piece of code and it is executed to exploit a sof...
research
04/05/2022

Joint Learning of Feature Extraction and Cost Aggregation for Semantic Correspondence

Establishing dense correspondences across semantically similar images is...

Please sign up or login with your details

Forgot password? Click here to reset