错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

GPT4D: Automatic Cross-Version Linux Driver Upgrade Toolkit

  • Borui Yang,
  • Hongyu Li,
  • Dongqi Cai

摘要

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.