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 条
  • [41] Prospects of soft biopotential interfaces for wearable human-machine interactive devices and applications
    Nagwade, Pritish
    Parandeh, Samira
    Lee, Sanghoon
    SOFT SCIENCE, 2023, 3 (03):
  • [42] Human-Machine Intelligence
    Zhang C.
    Kim J.
    Jeon J.
    Xing J.
    Ahn C.R.
    Tang P.
    Cai H.
    Civil Engineering Magazine Archive, 2023, 93 (05): : 74 - 79
  • [43] Human-machine communication
    Farbrot, JE
    Nihlwing, C
    Svengren, H
    ATW-INTERNATIONAL JOURNAL FOR NUCLEAR POWER, 2005, 50 (02): : 96 - +
  • [44] ON HUMAN-MACHINE INTERFACE
    BUHR, P
    COMMUNICATIONS OF THE ACM, 1983, 26 (07) : 463 - 464
  • [45] Cangjie's Poetry: An Interactive Art Experience of a Semantic Human-Machine Reality
    Zhang, Weidi
    Ren, Donghao
    Legrady, George
    PROCEEDINGS OF THE ACM ON COMPUTER GRAPHICS AND INTERACTIVE TECHNIQUES, 2021, 4 (02)
  • [46] A Wearable Human-Machine Interactive Instrument for Controlling a Wheelchair Robotic Arm System
    Lu, Zilin
    Zhou, Yajun
    Hu, Li
    Zhu, Junbiao
    Liu, Songhan
    Huang, Qiyun
    Li, Yuanqing
    IEEE TRANSACTIONS ON INSTRUMENTATION AND MEASUREMENT, 2024, 73 : 1 - 15
  • [47] On human-machine relations
    Degani, Asaf
    Goldman, Claudia V.
    Deutsch, Omer
    Tsimhoni, Omer
    COGNITION TECHNOLOGY & WORK, 2017, 19 (2-3) : 211 - 231
  • [48] Enhancing human-machine pair inspection with risk number and code inspection diagram
    Dai, Yujun
    Liu, Shaoying
    Xu, Guangquan
    SOFTWARE QUALITY JOURNAL, 2024, 32 (03) : 939 - 959
  • [49] Human-Adaptive Robot Interaction Using Interactive EC with Human-Machine Hybrid Evaluation
    Suga, Yuki
    Ogata, Tetsuya
    Sugano, Shigeki
    JOURNAL OF ROBOTICS AND MECHATRONICS, 2008, 20 (04) : 610 - 620
  • [50] Human-machine symbiosis: A multivariate perspective for physically coupled human-machine systems
    Inga, Jairo
    Ruess, Miriam
    Robens, Jan Heinrich
    Nelius, Thomas
    Rothfuss, Simon
    Kille, Sean
    Dahlinger, Philipp
    Lindenmann, Andreas
    Thomaschke, Roland
    Neumann, Gerhard
    Matthiesen, Sven
    Hohmann, Soren
    Kiesel, Andrea
    INTERNATIONAL JOURNAL OF HUMAN-COMPUTER STUDIES, 2023, 170