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

by   Guang Yang, et al.

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.


page 1

page 2

page 3

page 4


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...

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...

Relevance Transformer: Generating Concise Code Snippets with Relevance Feedback

Tools capable of automatic code generation have the potential to augment...

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

Generation of pseudo-code descriptions of legacy source code for softwar...

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...

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...

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