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 条
  • [31] Symbiotic Safety: Safe and Efficient Human-Machine Collaboration by utilizing Rules
    Ishigooka, Tasuku
    Yamada, Hiroyuki
    Otsuka, Satoshi
    Kanekawa, Nobuyasu
    Takahashi, Junya
    PROCEEDINGS OF THE 2022 DESIGN, AUTOMATION & TEST IN EUROPE CONFERENCE & EXHIBITION (DATE 2022), 2022, : 280 - 281
  • [32] Evaluating Knowledge Graph Accuracy Powered by Optimized Human-machine Collaboration
    Qi, Yifan
    Zheng, Weiguo
    Hong, Liang
    Zou, Lei
    PROCEEDINGS OF THE 28TH ACM SIGKDD CONFERENCE ON KNOWLEDGE DISCOVERY AND DATA MINING, KDD 2022, 2022, : 1368 - 1378
  • [33] Employees' job insecurity perception and unsafe behaviours in human-machine collaboration
    Wu, Tung-Ju
    Li, Jia-Min
    Wu, Yenchun Jim
    MANAGEMENT DECISION, 2022, 60 (09) : 2409 - 2432
  • [34] Human-Machine Collaborative Reinforcement Learning for Power Line Flow Regulation
    Wang, Chenxi
    Du, Youtian
    Chang, Yuanlin
    Guo, Zihao
    Huang, Yanhao
    IEEE TRANSACTIONS ON INDUSTRIAL INFORMATICS, 2024, 20 (04) : 5087 - 5099
  • [35] Anno-Mate: Human-Machine Collaboration Features for Fast Annotation
    Jose, John Anthony C.
    Cruz, Meygen D.
    Keh, Jefferson James U.
    Rivera, Maverick
    Sybingco, Edwin
    Dadios, Elmer P.
    JOURNAL OF ADVANCED COMPUTATIONAL INTELLIGENCE AND INTELLIGENT INFORMATICS, 2021, 25 (04) : 404 - 409
  • [36] Human-machine collaborative control of forward shovel hydraulic mining excavators
    Dong B.
    Qin T.
    Yang X.
    Li Y.
    Beijing Hangkong Hangtian Daxue Xuebao/Journal of Beijing University of Aeronautics and Astronautics, 2024, 50 (06): : 1952 - 1959
  • [37] ArtVerse: A Paradigm for Parallel Human-Machine Collaborative Painting Creation in Metaverses
    Guo, Chao
    Dou, Yong
    Bai, Tianxiang
    Dai, Xingyuan
    Wang, Chunfa
    Wen, Yi
    IEEE TRANSACTIONS ON SYSTEMS MAN CYBERNETICS-SYSTEMS, 2023, 53 (04): : 2200 - 2208
  • [38] Human-machine co-intelligence through symbiosis in the SMV space
    Yao, Yiyu
    APPLIED INTELLIGENCE, 2023, 53 (03) : 2777 - 2797
  • [39] Emotional Impact Analysis of Human-Machine Collaborative Decision-Making
    Zhao, Yuhui
    Gou, Juanqiong
    Wang, Zhe
    Wen, Yuxi
    2024 7TH INTERNATIONAL CONFERENCE ON ARTIFICIAL INTELLIGENCE AND BIG DATA, ICAIBD 2024, 2024, : 572 - 577
  • [40] Shapley-Optimized Reinforcement Learning for Human-Machine Collaboration Policy
    Zhang, Jie
    Niu, Yiqun
    He, Wei
    Jin, Cheng
    Wang, Chongjun
    DATABASE SYSTEMS FOR ADVANCED APPLICATIONS, DASFAA 2024, PT 2, 2025, 14851 : 291 - 300