paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Hybrid Fault-Driven Mutation Testing for Python

面向 Python 的混合故障驱动变异测试
ICSE Proceedings of the 2026 IEEE/ACM 48th International Conference on Software Engineering2026匹配度 3/10 · 论文属于程序分析与测试方向,使用静态与动态分析改进 Python 变异测试,与 PL 侧的程序分析有一定关联;但它不涉及 LLM/Agent、机器学习系统、浮点程序分析或贝叶斯程序分析,也不是用户画像中明确追踪的核心交叉方向。引用 0 inbox
Saba Alimadadi, Golnaz Gharachorlu
crossref: 2026-09-12dblp: 2026-09-12arxiv: 2026-09-12

AI 速览

一句话:提出七种源自 Python 反模式的变异算子,用静态与动态分析混合实现 PyTation,扩充故障模型并减少等价变异体。

变异测试通过注入人工故障评估测试套件有效性,但现有技术在 Python 这类动态类型语言上难以刻画常见故障。本文从 Python 程序中普遍存在的反模式出发,提出七个新的变异算子,用以补充通用算子并拓宽所模拟故障的范围。作者设计了一种混合静态与动态分析的变异测试技术,基于这些算子对 Python 程序进行变异,并借助动态分析启发式尽量减少等价变异体。该技术实现为工具 PyTation,并在 13 个开源 Python 应用上评估。结果表明,PyTation 生成的变异体与通用工具互补,在测试执行中表现出不同行为,能揭示高覆盖率测试套件的不足;同时其唯一变异体比例高、交叉杀死率与测试重叠率低,等价变异体也较少,说明其故障模型具有新颖性。

问题
既有变异测试算子难以覆盖 Python 等动态类型语言中的常见故障,导致测试套件评估不充分。
方法
从 Python 常见反模式提炼七个变异算子,采用静态与动态分析混合的方式实施变异,并用动态分析启发式抑制等价变异体,实现工具 PyTation。
评估
在 13 个开源 Python 应用上评估,考察变异体与通用工具的互补性、唯一变异体比例、交叉杀死率、测试重叠率与等价变异体数量,并检验其对高覆盖率测试套件的揭示能力。
原文摘要(Abstract)

Mutation testing is an effective technique for assessing the effectiveness of test suites by systematically injecting artificial faults into programs. However, existing mutation testing techniques fall short in capturing many types of common faults in dynamically-typed languages like Python. In this paper, we introduce a novel set of seven mutation operators that are inspired by prevalent anti-patterns in Python programs, designed to complement the existing general-purpose operators and broaden the spectrum of simulated faults. We propose a mutation testing technique that utilizes a hybrid of static and dynamic analyses to mutate Python programs based on these operators while minimizing equivalent mutants. We implement our approach in a tool called PyTation and evaluate it on 13 open-source Python applications. Our results show that PyTation generates mutants that complement those from general-purpose tools, exhibiting distinct behaviour under test execution and uncovering inadequacies in high-coverage test suites. We further demonstrate that PyTation produces a high proportion of unique mutants, a low cross-kill rate, and a low test overlap ratio relative to baseline tools, highlighting its novel fault model. PyTation also incurs few equivalent mutants, aided by dynamic analysis heuristics.

链接与引用

DOI 原文 · arXiv · DBLP

BibTeX
@inproceedings{abs-2601-19088,
  title = {Hybrid Fault-Driven Mutation Testing for Python},
  author = {Saba Alimadadi and Golnaz Gharachorlu},
  booktitle = {ICSE},
  year = {2026},
  doi = {10.1145/3744916.3787804}
}