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] Development of a Bamboo Toothbrush Handle Machine with a Human-Machine Interactive Interface for Optimizing Process Conditions
    Wang, Bo-Jyun
    Lin, Chia-Hong
    Lee, Wen-Chih
    Hsiao, Chun-Ching
    SUSTAINABILITY, 2023, 15 (14)
  • [32] The symbiogenic experience: towards a framework for understanding human-machine coupling in the interactive arts
    Castellanos, Carlos
    Gromala, Diane
    TECHNOETIC ARTS, 2010, 8 (01) : 11 - 18
  • [33] An Interactive Human-Machine Learning Interface for Collecting and Learning from Complex Annotations
    Erskine, Jonathan
    Clifford, Matt
    Hepburn, Alexander
    Rodriguez, Raul Santos
    PROCEEDINGS OF THE THIRTY-THIRD INTERNATIONAL JOINT CONFERENCE ON ARTIFICIAL INTELLIGENCE, IJCAI 2024, 2024, : 8644 - 8647
  • [34] Human-Machine Communication
    Zarouali, Brahim
    Antheunis, Marjolijn
    van der Goot, Margot
    TIJDSCHRIFT VOOR COMMUNICATIEWETENSCHAP, 2024, 52 (03): : 263 - 266
  • [35] Game Theory-Based Interactive Control for Human-Machine Cooperative Driving
    Zhou, Yangyang
    Huang, Chao
    Hang, Peng
    APPLIED SCIENCES-BASEL, 2024, 14 (06):
  • [36] Human-machine systems
    Wieringa, PA
    Stassen, HG
    TRANSACTIONS OF THE INSTITUTE OF MEASUREMENT AND CONTROL, 1999, 21 (4-5) : 139 - 150
  • [37] Sustainable Human-Machine Interactive Triboelectric Nanogenerator toward a Smart Computer Mouse
    Chandrasekhar, Arunkumar
    Vivekananthan, Venkateswaran
    Khandelwal, Gaurav
    Kim, Sang-Jae
    ACS SUSTAINABLE CHEMISTRY & ENGINEERING, 2019, 7 (07) : 7177 - 7182
  • [38] Development of Human-Machine Interactive System of Virtual Underwater Vehicle-Manipulator
    Chang, Zongyu
    Feng, Xinglong
    Zhang, Yang
    Zheng, Zhongqiang
    2019 9TH IEEE ANNUAL INTERNATIONAL CONFERENCE ON CYBER TECHNOLOGY IN AUTOMATION, CONTROL, AND INTELLIGENT SYSTEMS (IEEE-CYBER 2019), 2019, : 445 - 450
  • [39] Artificial Intelligence in Clinical Medicine: Generative and Interactive Systems at the Human-Machine Interface
    Fouladvand, Sajjad
    Pierson, Emma
    Jankovic, Ivana
    Ouyang, David
    Chen, Jonathan H.
    Daneshjou, Roxana
    BIOCOMPUTING 2024, PSB 2024, 2024, : 1 - 7
  • [40] Interactive human-machine learning framework for modelling of ferroelectric-dielectric composites
    Liu, Ning
    Ihalage, Achintha
    Zhang, Hangfeng
    Giddens, Henry
    Yan, Haixue
    Hao, Yang
    JOURNAL OF MATERIALS CHEMISTRY C, 2020, 8 (30) : 10352 - 10361