基于ML的程序翻译:风险与希望
On ML-Based Program Translation: Perils and Promises
摘要:
随着新的和高级的程序设计语言的出现,将遗留软件迁移到新的程序设计语言变得势在必行。基于无监督机器学习的程序翻译可以在这种迁移中发挥重要作用,即使没有足够大的并行源代码的可靠语料库。然而,由于其统计性质,这些翻译远非完美。这项工作调查了无监督的程序翻译器,以及它们失败的原因和原因。通过对此类失败的深入错误分析,我们发现此类翻译器失败的情况遵循一些特定的模式。有了这个洞察力,我们开发了一个基于规则的程序突变引擎,如果输入遵循特定的模式,则对输入代码进行预处理,如果输出遵循某些模式,则对输出进行后处理。我们表明,我们的代码处理工具,结合程序翻译,可以形成一个混合程序翻译,并显着提高国家的最先进的。在未来,我们设想一个端到端的程序翻译工具,编程领域的知识可以嵌入到基于ML的翻译管道使用前和后处理步骤。
英文摘要:
With the advent of new and advanced programming languages, it becomes imperative to migrate legacy software to new programming languages. Unsupervised Machine Learning-based Program Translation could play an essential role in such migration, even without a sufficiently sizeable reliable corpus of parallel source code. However, these translators are far from perfect due to their statistical nature. This work investigates unsupervised program translators and where and why they fail. With in-depth error analysis of such failures, we have identified that the cases where such translators fail follow a few particular patterns. With this insight, we develop a rule-based program mutation engine, which pre-processes the input code if the input follows specific patterns and post-process the output if the output follows certain patterns. We show that our code processing tool, in conjunction with the program translator, can form a hybrid program translator and significantly improve the state-of-the-art. In the future, we envision an end-to-end program translation tool where programming domain knowledge can be embedded into an ML-based translation pipeline using pre- and post-processing steps.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。