arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2303.09062cs.SEcs.AIcs.LG
收藏

低资源程序设计语言伪代码生成的知识转移

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

TCS Research(塔塔咨询服务公司研究院)

Ankita Sontakke, Kanika Kalra, Manasi Patwardhan, Lovekesh Vig, Raveendra Kumar Medicherla, Ravindra Naik, Shrishti Pradhan

摘要:

用于软件维护的遗留源代码的伪代码描述的生成是手动密集型任务。最近的编码器-解码器语言模型已经显示出用于为诸如C++的高资源程序设计语言自动化伪代码生成的前景,但是严重依赖于大的代码-伪代码语料库的可用性。为用遗留程序设计语言(PL)编写的代码请求这样的伪代码注释是耗时且昂贵的事情,需要对源PL的透彻理解。在本文中,我们专注于使用并行代码伪码数据来传输在高资源PL(C++)上训练的代码到伪码神经模型所获得的知识。我们的目标是将这些知识转移到没有PL伪代码并行数据的传统PL(C)中进行训练。为了实现这一点,我们利用迭代反向翻译(IBT)方法与一种新的基于测试用例的过滤策略,以适应训练的C++到伪代码模型的C到伪代码模型。我们观察到通过回译生成的C代码的成功率提高了23.27%,超过了连续的IBT迭代,说明了我们的方法的有效性。

英文摘要:

Generation of pseudo-code descriptions of legacy source code for software maintenance is a manually intensive task. Recent encoder-decoder language models have shown promise for automating pseudo-code generation for high resource programming languages such as C++, but are heavily reliant on the availability of a large code-pseudocode corpus. Soliciting such pseudocode annotations for codes written in legacy programming languages (PL) is a time consuming and costly affair requiring a thorough understanding of the source PL. In this paper, we focus on transferring the knowledge acquired by the code-to-pseudocode neural model trained on a high resource PL (C++) using parallel code-pseudocode data. We aim to transfer this knowledge to a legacy PL (C) with no PL-pseudocode parallel data for training. To achieve this, we utilize an Iterative Back Translation (IBT) approach with a novel test-cases based filtration strategy, to adapt the trained C++-to-pseudocode model to C-to-pseudocode model. We observe an improvement of 23.27% in the success rate of the generated C codes through back translation, over the successive IBT iteration, illustrating the efficacy of our approach.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑