Abstract
The comprehension of source code is very difficult, especially if the programmer is not familiar with the programming language. Pseudocode explains and describes code contents that are based on the semantic analysis and understanding of the source code. In this paper, a novel re-trieval-based transformer pseudocode generation model is proposed. The proposed model adopts different retrieval similarity methods and neural machine translation to generate pseudocode. The proposed model handles words of low frequency and words that do not exist in the training dataset. It consists of three steps. First, we retrieve the sentences that are similar to the input sentence using different similarity methods. Second, pass the source code retrieved (input retrieved) to the deep learning model based on the transformer to generate the pseudocode retrieved. Third, the replace-ment process is performed to obtain the target pseudo code. The proposed model is evaluated using Django and SPoC datasets. The experiments show promising performance results compared to other language models of machine translation. It reaches 61.96 and 50.28 in terms of BLEU performance measures for Django and SPoC, respectively.
Author supplied keywords
Cite
CITATION STYLE
Alokla, A., Gad, W., Nazih, W., Aref, M., & Salem, A. B. (2022). Retrieval-Based Transformer Pseudocode Generation. Mathematics, 10(4). https://doi.org/10.3390/math10040604
Register to see more suggestions
Mendeley helps you to discover research relevant for your work.