hmCodeTrans: Human-Machine Interactive Code Translation

被引:0
|
作者
Liu, Jiaqi [1 ]
Zhang, Fengming [1 ]
Zhang, Xin [1 ]
Yu, Zhiwen [1 ,2 ]
Wang, Liang [1 ]
Zhang, Yao [1 ]
Guo, Bin [1 ]
机构
[1] Northwestern Polytech Univ, Sch Comp Sci, Xian 710129, Peoples R China
[2] Haerbin Engn Univ, Harbin 150001, Peoples R China
关键词
Code translation; human-machine collaboration; interactive translation;
D O I
10.1109/TSE.2024.3379583
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
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.
引用
收藏
页码:1163 / 1181
页数:19
相关论文
共 50 条
  • [1] Approach to human-machine natural interactive system
    Chen, F
    Yuan, BZ
    ICSP '98: 1998 FOURTH INTERNATIONAL CONFERENCE ON SIGNAL PROCESSING, PROCEEDINGS, VOLS I AND II, 1998, : 633 - 636
  • [2] Situation awareness in human-machine interactive systems
    Ziemke, Tom
    Schaefer, Kristin E.
    Endsley, Mica
    COGNITIVE SYSTEMS RESEARCH, 2017, 46 : 1 - 2
  • [3] Design of target code in human-machine interface
    Zeng, Qingxin
    Zhuang, Damin
    Ma, Yinxiang
    Beijing Hangkong Hangtian Daxue Xuebao/Journal of Beijing University of Aeronautics and Astronautics, 2007, 33 (06): : 631 - 634
  • [4] Emotional Affordances in Human-Machine Interactive Planning and Negotiation
    Franzoni, Valentina
    Milani, Alfredo
    Vallverdu, Jordi
    2017 IEEE/WIC/ACM INTERNATIONAL CONFERENCE ON WEB INTELLIGENCE (WI 2017), 2017, : 924 - 930
  • [5] Human-machine Translation Model Evaluation Based on Artificial Intelligence Translation
    Li, Ruicha
    Nawi, Abdullah Mohd
    Kang, Myoung Sook
    EMITTER-INTERNATIONAL JOURNAL OF ENGINEERING TECHNOLOGY, 2023, 11 (02)
  • [6] HMPT: a human-machine cooperative program translation method
    Zhang, Xin
    Yu, Zhiwen
    Liu, Jiaqi
    Wang, Hui
    Wang, Liang
    Guo, Bin
    AUTOMATED SOFTWARE ENGINEERING, 2023, 30 (02)
  • [7] A Human-machine Cooperation Protocol for Machine Translation Output Edit Annotation
    Costa, Felipe de Almeida
    Pagano, Adriana S.
    Ferreira, Thiago Castro
    Meira, Wagner, Jr.
    TRADUMATICA-TRADUCCIO I TECNOLOGIES DE LA INFORMACIO I LA COMUNICACIO, 2021, (19): : 148 - 170
  • [8] Human-machine interactive interface design for WebGIS integrated with VISI
    School of Resources and Environment Science, Wuhan University, 129 Luoyu Road, Wuhan 430079, China
    Wuhan Daxue Xuebao (Xinxi Kexue Ban), 2006, 6 (534-536):
  • [9] The robotic wheelchair SENA.: A human-machine interactive approach
    Gonzalez, J.
    Galindo, C.
    Fernandez, J. A.
    Blanco, J. L.
    Munoz, A.
    Arevalo, V.
    REVISTA IBEROAMERICANA DE AUTOMATICA E INFORMATICA INDUSTRIAL, 2008, 5 (02): : 38 - +
  • [10] Web GIS Human-Machine Interactive Interface Design with VISI
    Xiong Lan
    Hu Hongliang
    Du Qingyun
    Huang Maojun
    Wang Mingjun
    GEO-SPATIAL INFORMATION SCIENCE, 2008, 11 (01) : 66 - 70