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 条
  • [21] Soft Pneumatic Sensing Chambers for Generic and Interactive Human-Machine Interfaces
    Tawk, Charbel
    Panhuis, Marc In Het
    Spinks, Geoffrey M.
    Alici, Gursel
    ADVANCED INTELLIGENT SYSTEMS, 2019, 1 (01)
  • [22] Injection-on-Skin Granular Adhesive for Interactive Human-Machine Interface
    Kim, Sumin
    Jang, Jaepyo
    Kang, Kyumin
    Jin, Subin
    Choi, Heewon
    Son, Donghee
    Shin, Mikyung
    ADVANCED MATERIALS, 2023, 35 (48)
  • [23] Design of Human-Machine Integration System to Meet Diverse Interactive Tasks
    Yang, Yameng
    Zhang, Yu
    INTERNATIONAL JOURNAL OF HUMAN-COMPUTER INTERACTION, 2024,
  • [24] Mechanically modulable and human-machine interactive luminescent fiber display platforms
    Wang, Yang
    Gao, Wenli
    Chen, Qiaolin
    Ren, Jing
    Chen, Xin
    Li, Jian
    Shao, Zhengzhong
    Ling, Shengjie
    MRS BULLETIN, 2024, 49 (08) : 802 - 816
  • [25] Wearable and Implantable Electronics for the next Generation of Human-Machine Interactive Devices
    Wu, Yu
    Wang, Shiwei
    Shen, Boyang
    Zhao, Hubin
    Lu, Haichang
    Gao, Shuo
    FRONTIERS IN ELECTRONICS, 2022, 3
  • [26] Low-Voltage Soft Actuators for Interactive Human-Machine Interfaces
    Chen, Shaohua
    Tan, Matthew Wei Ming
    Gong, Xuefei
    Lee, Pooi See
    ADVANCED INTELLIGENT SYSTEMS, 2022, 4 (02)
  • [27] Flexible Magnetoelectric Fiber for Self-Powered Human-Machine Interactive
    Wang, Xinyu
    Qin, Jieyao
    Gong, Junyao
    Wei, Xinjie
    Guo, Jianhong
    Hu, Wanjin
    Wang, Xiaofeng
    Fu, Zhuan
    Xia, Liangjun
    Xu, Weilin
    ACS SENSORS, 2024, 9 (11): : 6113 - 6121
  • [28] English-Turkish Literary Translation Through Human-Machine Interaction
    Sahin, Mehmet
    Gurses, Sabri
    TRADUMATICA-TRADUCCIO I TECNOLOGIES DE LA INFORMACIO I LA COMUNICACIO, 2021, (19): : 179 - 203
  • [29] Using Human Interactive Proofs to Secure Human-Machine Interactions via Untrusted Intermediaries
    Mitchell, Chris J.
    SECURITY PROTOCOLS, 2009, 5087 : 164 - 170
  • [30] Contactless User-Interactive Sensing Display for Human-Human and Human-Machine Interactions
    He, Jiaqi
    Wei, Ruilai
    Ma, Xiaole
    Wu, Wenqiang
    Pan, Xiaojun
    Sun, Junlu
    Tang, Jiaqi
    Xu, Zhangsheng
    Wang, Chunfeng
    Pan, Caofeng
    ADVANCED MATERIALS, 2024, 36 (25)