paperbot · PL 论文追踪

全部论文 待读 收藏

P2 HeaderSplit: An Automated Tool for Splitting Header Files in C Projects

HeaderSplit:面向 C 项目的头文件自动拆分工具
FSE Proceedings of the 33rd ACM International Conference on the Foundations of Software Engineering2025匹配度 1/10 · 论文属于C头文件自动拆分与重构工具,关注多视图图聚类和循环依赖修复,未涉及LLM/Agent、机器学习系统静态分析、浮点程序分析或贝叶斯程序分析,与研究画像核心方向不符。引用 1 inbox
Yue Wang, Jiaxuan Sun, Tongwei Deng, Wenhui Chang, Yanzhen Zou, Bing Xie
crossref: 2026-09-12

AI 速览

一句话:提出 HeaderSplit,基于多视图图聚类与循环依赖修复自动拆分 C 头文件并更新 include,作为 VS Code 扩展实现。

C 项目中头文件常因职责累积而变得臃肿,但现有文件拆分工作主要面向类文件,很少考虑构建依赖,也无法保证拆分后文件间依赖无环。本文提出 HeaderSplit,一个专门用于拆分 C 项目头文件的自动化工具。它首先基于多视图图聚类与循环依赖修复启发式给出拆分方案,展示每个新文件包含的代码元素及文件间的 include 关系;经用户确认后,自动生成新头文件,并更新所有直接或传递包含原头文件的代码中的 include 语句。该工具实现为 VS Code 扩展,并在真实项目上评估,结果显示内聚性提升、重编译减少且依赖无环,运行时间可接受。

问题
如何自动将臃肿的 C 头文件拆分为多个文件,同时考虑系统构建依赖并保证拆分后文件间无环依赖。
方法
HeaderSplit 使用多视图图聚类与循环依赖修复启发式生成拆分方案,并在用户批准后自动生成新头文件、更新相关 include 语句。
评估
实现为 VS Code 扩展,在真实 C 项目上评估,考察内聚性、重编译量、依赖无环性与运行时间。
原文摘要(Abstract)

Developers often need to refactor bloated code files that have accumulated multiple responsibilities over time, typically by splitting a large code file into several smaller ones. Existing works, primarily focusing on class file decomposition, often fail to split header files as they seldom consider build dependencies of the system and cannot ensure acyclic dependencies among the decomposed files. In this work, we propose HeaderSplit, an automated tool designed specifically for splitting header files in C projects. It first suggests a decomposition plan based on multi-view graph clustering and cyclic dependencies fixing heuristics, showing the code elements in each new file and the "include" relationships among the files. Upon user approval, HeaderSplit automatically executes the refactoring, generating new header files and updating the include statements in all code files that directly or transitively include the original header file. Implemented as a VS Code extension, Header-Split has been evaluated on real-world projects, showing improved cohesion, reduction in recompilation, and ensured acyclic dependencies, all within acceptable time limits. The tool is available at https://github.com/wangyue0502/HeaderSplit. The demonstration video can be found at https://youtu.be/QXi-emXkdzk.

链接与引用

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

BibTeX
@inproceedings{paperbot9054,
  title = {HeaderSplit: An Automated Tool for Splitting Header Files in C Projects},
  author = {Yue Wang and Jiaxuan Sun and Tongwei Deng and Wenhui Chang and Yanzhen Zou and Bing Xie},
  booktitle = {FSE},
  year = {2025},
  doi = {10.1145/3696630.3728594}
}