paperbot · PL 论文追踪

全部论文 待读 收藏

P2 SRCIROR: a toolset for mutation testing of C source code and LLVM intermediate representation

SRCIROR:面向 C 源代码与 LLVM 中间表示的变异测试工具集
ASE Proceedings of the 33rd ACM/IEEE International Conference on Automated Software Engineering2018匹配度 2/10 · 论文属于变异测试与软件测试工具,虽涉及 C/LLVM IR 和编译基础设施,但与用户核心方向 PL↔AI、Agentic 程序、浮点程序分析、贝叶斯程序分析及其与 LLM 的交叉均无直接关系。引用 21 inbox
Farah Hariri, August Shi
crossref: 2026-09-12

AI 速览

一句话:提出 SRCIROR 工具集,可在 C/C++ 源码与 LLVM IR 两个层面复用同类变异算子执行变异测试。

变异测试通过注入人工缺陷来评估测试套件质量,但现有工具通常只针对单一代码表示层面。本文提出 SRCIROR 工具集,支持在 C/C++ 源代码(SRC)和 LLVM 编译器中间表示(IR)两级进行变异测试。在源码层,SRCIROR 通过对 Clang AST 做模式匹配识别可变异构造;在 IR 层,它借助 LLVM pass 直接改写 IR 指令。该实现能够处理 Clang 支持的任意程序,扩展到大型程序时开销很小,且产生不可编译的无效变异体比例较低。工具在两级支持同一类变异算子,便于扩展新算子,并可通过收集覆盖率只对被执行到的代码元素生成变异体。作者在 Coreutils 上评估,揭示了 SRC 与 IR 层面之间的有趣差异,体现了该工具在跨代码表示层开展变异测试研究的价值。工具已在 GitHub 公开。

问题
现有变异测试工具多局限于单一代码表示层面,缺乏在 C/C++ 源码与 LLVM IR 之间统一、可扩展且低开销的变异测试支持。
方法
源码层基于 Clang AST 模式匹配定位变异点,IR 层通过 LLVM pass 直接修改 IR 指令,并在两级复用同一类变异算子,同时支持基于覆盖率的变异体生成。
评估
在 Coreutils 基准程序上运行,对比源码层与 IR 层的变异测试表现,并考察工具可处理的程序规模、额外开销与无效变异体比例。
原文摘要(Abstract)

We present SRCIROR (pronounced “sorcerer“), a toolset for performing mutation testing at the levels of C/C++ source code (SRC) and the LLVM compiler intermediate representation (IR). At the SRC level, SRCIROR identifies program constructs for mutation by pattern-matching on the Clang AST. At the IR level, SRCIROR directly mutates the LLVM IR instructions through LLVM passes. Our implementation enables SRCIROR to (1) handle any program that Clang can handle, extending to large programs with a minimal overhead, and (2) have a small percentage of invalid mutants that do not compile. SRCIROR enables performing mutation testing using the same classes of mutation operators at both the SRC and IR levels, and it is easily extensible to support more operators. In addition, SRCIROR can collect coverage to generate mutants only for covered code elements. Our tool is publicly available on GitHub (https://github.com/TestingResearchIllinois/srciror). We evaluate SRCIROR on Coreutils subjects. Our evaluation shows interesting differences between SRC and IR, demonstrating the value of SRCIROR in enabling mutation testing research across different levels of code representation.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot4782,
  title = {SRCIROR: a toolset for mutation testing of C source code and LLVM intermediate representation},
  author = {Farah Hariri and August Shi},
  booktitle = {ASE},
  year = {2018},
  doi = {10.1145/3238147.3240482}
}