4.4 Article

HMPT: a human-machine cooperative program translation method

期刊

AUTOMATED SOFTWARE ENGINEERING
卷 30, 期 2, 页码 -

出版社

SPRINGER
DOI: 10.1007/s10515-023-00395-9

关键词

Program translation; Human-machine cooperation; Neural machine translation; Transformer; Interactive machine learning

向作者/读者索取更多资源

Program translation aims to convert one programming language to another, and traditional methods using only human or machine effort have limitations. To address this, we propose a human-machine cooperative method called HMPT. It reduces human effort by introducing an interactive protocol that incorporates human edits into the model and generates better output code. It also reduces response time by avoiding duplicate prefix generation and minimizing invalid suffix generation. Experimental results show significant reductions in human effort and response time compared to baselines.
Program translation aims to translate one kind of programming language to another, e.g., from Python to Java. Due to the inefficiency of translation rules construction with pure human effort (software engineer) and the low quality of machine translation results with pure machine effort, it is suggested to implement program translation in a human-machine cooperative way. However, existing human-machine program translation methods fail to utilize the human's ability effectively, which require human to post-edit the results (i.e., statically modified directly on the model generated code). To solve this problem, we propose HMPT (Human-Machine Program Translation), a novel method that achieves program translation based on human-machine cooperation. It can (1) reduce the human effort by introducing a prefix-based interactive protocol that feeds the human's edit into the model as the prefix and regenerates better output code, and (2) reduce the interactive response time resulted by excessive program length in the regeneration process from two aspects: avoiding duplicate prefix generation with cache attention information, as well as reducing invalid suffix generation by splicing the suffix of the results. The experiments are conducted on two real datasets. Results show compared to the baselines, our method reduces the human effort up to 73.5% at the token level and reduces the response time up to 76.1%.

作者

我是这篇论文的作者
点击您的名字以认领此论文并将其添加到您的个人资料中。

评论

主要评分

4.4
评分不足

次要评分

新颖性
-
重要性
-
科学严谨性
-
评价这篇论文

推荐

暂无数据
暂无数据