
Research Article
GPT4D: Automatic Cross-Version Linux Driver Upgrade Toolkit
@INPROCEEDINGS{10.1007/978-3-031-71716-1_11, author={Borui Yang and Hongyu Li and Dongqi Cai}, title={GPT4D: Automatic Cross-Version Linux Driver Upgrade Toolkit}, proceedings={Machine Learning and Intelligent Communication. 8th EAI International Conference, MLICOM 2023, Beijing, China, December 17, 2023, Proceedings}, proceedings_a={MLICOM}, year={2024}, month={9}, keywords={Software Engineering Machine Learning Programming Language}, doi={10.1007/978-3-031-71716-1_11} }
- Borui Yang
Hongyu Li
Dongqi Cai
Year: 2024
GPT4D: Automatic Cross-Version Linux Driver Upgrade Toolkit
MLICOM
Springer
DOI: 10.1007/978-3-031-71716-1_11
Abstract
The Linux operating system, with a history spanning over 22 years since its inception in 1991, has undergone countless version updates. Each update potentially introduces changes to its Application Programming Interfaces (APIs), compelling developers to adjust drivers in accordance with these API modifications. Consequently, developers often dedicate a significant amount of time to the maintenance and refactoring of existing code. As machine learning-based approaches have advanced, a growing number of code-specific models have been developed. However, most previous research on generative code models has predominantly concentrated on generating new code, frequently neglecting the unique requirements of editing existing code. In this paper, we propose a toolkit named GPT4D that harnesses the capabilities of the Large Language Model GPT-4 to automatically upgrade Linux driver code. A key challenge is the token limit of the model, by which most of driver code could be too long to be processed. To address this issue, we have designed a code filter that analyzes the abstract syntax tree (AST), based on code differences, to identify the most relevant code segments. We demonstrate the efficiency of our toolkit by applying it to a real-world Linux driver that requires modification.