paperbot · PL 论文追踪

全部论文 待读 收藏

P2 The impact of generic data structures

泛型数据结构的影响
ASE Proceedings of the 35th IEEE/ACM International Conference on Automated Software Engineering2020匹配度 2/10 · 论文研究 Linux 内核中 C 泛型双向链表的静态分析与类型推断工具,属于传统程序分析,但未涉及用户核心关注的 PL 与 AI/LLM 交叉、浮点程序分析或贝叶斯程序分析,因此匹配度较低。引用 0 inbox
Nic Volanschi, Julia Lawall
crossref: 2026-09-12

AI 速览

一句话:研究 Linux 内核中 C 泛型双向链表的利弊,并提出列表类型推断与可视化工具,可辅助理解并发现缺陷。

Linux 内核长期依赖大量维护者协作,理解复杂数据结构是维护中的关键难题。内核用 C 编写,可通过类型转换和指针运算定义信息量极低的数据类型,双向链表尤其典型。本文分析这种泛型链表在表达力、代码理解与可靠性方面的优缺点,并基于观察开发了一套工具集,包括描述性列表类型推断和列表可视化工具。工具在近期 Linux 内核版本中识别出超过 10,000 个列表字段和变量,并成功为其中 90% 推断类型。作者进一步展示这些工具可用于发现此前已修复的缺陷,并新识别出 6 个缺陷。

问题
Linux 内核中 C 泛型双向链表等数据结构因类型转换和指针运算而缺乏描述性信息,维护者难以快速理解并保证可靠性。
方法
分析泛型链表的利弊,并实现描述性列表类型推断与列表可视化工具,在真实内核代码上运行。
评估
在近期 Linux 内核版本中识别 10,000+ 个列表字段和变量,类型推断成功率达 90%,并检测已修复缺陷及 6 个新缺陷。
原文摘要(Abstract)

The increasing adoption of the Linux kernel has been sustained by a large and constant maintenance effort, performed by a wide and heterogeneous base of contributors. One important problem that maintainers face in any code base is the rapid understanding of complex data structures. The Linux kernel is written in the C language, which enables the definition of arbitrarily uninformative datatypes, via the use of casts and pointer arithmetic, of which doubly linked lists are a prominent example. In this paper, we explore the advantages and disadvantages of such lists, for expressivity, for code understanding, and for code reliability. Based on our observations, we have developed a toolset that includes inference of descriptive list types and a tool for list visualization. Our tools identify more than 10,000 list fields and variables in recent Linux kernel releases and succeeds in typing 90%. We show how these tools could have been used to detect previously fixed bugs and identify 6 new ones.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@inproceedings{paperbot5877,
  title = {The impact of generic data structures},
  author = {Nic Volanschi and Julia Lawall},
  booktitle = {ASE},
  year = {2020},
  doi = {10.1145/3324884.3416635}
}