arrow
返回

hmCodeTrans: Human-Machine Interactive Code Translation

delete2024-05-01
delete1
PRE
AI
J
Jiaqi Liu
F
Fengming Zhang
X
Xin Zhang
Z
Zhiwen Yu *
L
Liang Wang
Y
Yao Zhang
郭
郭斌 (Bin Guo)
DOI:10.1109/TSE.2024.3379583delete
delete原文链接
delete分享
delete收藏
摘要

摘要

En 中文
Code translation, i.e., translating one kind of code language to another, plays an important role in scenarios such as application modernization and multi-language versions of applications on different platforms. Even the most advanced machine-based code translation methods can not guarantee an error-free result. Therefore, the participance of software engineer is necessary. Considering both accuracy and efficiency, it is suggested to work in a human-machine collaborative way. However, in many realistic scenarios, human and machine collaborate ineffectively - model translates first and then human makes further editing, without any interaction. To solve this problem, we propose hmCodeTrans, a novel method that achieves code translation in an interactive human-machine collaborative way. It can (1) save the human effort by introducing two novel human-machine collaboration patterns: prefix-based and segment-based ones, which feed the software engineer's sequential or scattered editing back to model and thus enabling the model to make a better retranslation; (2) reduce the response time based on two proposed modules: attention cache module that avoids duplicate prefix inference with cached attention information, and suffix splicing module that reduces invalid suffix inference by splicing a predefined suffix. The experiments are conducted on two real datasets. Results show that compared with the baselines, our approach can effectively save the human effort and reduce the response time. Last but not least, a user study involving five real software engineers is given, which validates that the proposed approach owns the lowest human effort and shows the users' satisfaction towards the approach.
Keyword:
Code translation
human-machine collaboration
interactive translation

期刊

IEEE Transactions on Software Engineering 封面图
IEEE Transactions on Software Engineering
IF:
5.6
论文数:
3.0K
被引数:
1.3W

机构

西北工业大学 封面图
西北工业大学
学者数:
7.1K
论文数: 2.1K
被引数: 3.7W
引用论文

引用论文

err分享
err收藏
Interactive neural machine translation交互式神经机器翻译
err2017-09-01
err51
errOAAI
errPeris, Alvaro; Domingo, Miguel; Casacuberta, Francisco
err分享
err收藏
err分享
err收藏
Dynamical analysis of relaxation luminescence in ZnS:Er3+ thin film devices
err2003-06-15
err0
PREAI
errYu-Jiang Wang; Chen-Xu Wu; Mou-Zhi Chen; Mei-Chun Huang
err分享
err收藏
ATG24 Represses Autophagy and Differentiation and Is Essential for Homeostasy of the Flagellar Pocket in Trypanosoma brucei
err2015-06-19
err0
errOAAI
errAna Brennand; Eva Rico; Daniel J. Rigden; Patrick Van Der Smissen; Pierre J. Courtoy; Paul A. M. Michels
err分享
err收藏
Recent Developments in SiC Device Research
err1999-01-01
err0
PREAI
errC. I. Harris; A. O. Konstantinov
err分享
err收藏
err分享
err收藏
Growth control of herbaceous ground cover and egg quality from an integrated poultry-hazelnut orchard system
err2020-01-01
err0
errOAAI
errCarlo Cosentino; Pierangelo Freschi; Simonetta Fascetti; Rosanna Paolino; Mauro Musto
err分享
err收藏
学者 查看更多内容