[论文解读] MuSe: a Mutation Testing Plugin for the Remix IDE
MuSe 是一个 Remix-IDE 插件,提供 50 种变异操作符(其中包括六种面向安全的操作符),通过 AST 级别的变异和与常见框架的集成,在 Solidity 合约中注入漏洞并评估测试套件,同时使用 Slither 评估检测能力。
Mutation testing is a technique to assess the effectiveness of test suites by introducing artificial faults into programs. Although mutation testing plugins are available for many platforms and languages, none is currently available for Remix-IDE, the most widely used Integrated Development Environment for the entire contract development journey, used by users of all knowledge levels, and serves as a learning lab for teaching and experimenting with Ethereum. The quality and security of smart contracts are crucial in blockchain systems, as even minor issues can result in substantial financial losses. This paper proposes MuSe, a mutation testing plugin for the Remix-IDE. MuSe includes traditional, Solidity-specific, and security-oriented mutation operators. Its integration into the Remix-IDE eliminates the need for additional setup and lowers the entry barrier. As a result, developers and researchers can immediately leverage mutation testing to assess the effectiveness of their test suites and identify potential issues in smart contracts. We provide a demo video showing MuSe: https://www.youtube.com/watch?v=MIFk9exTDu0 and its repository: https://github.com/GerardoIuliano/MuSe-Remix-Plugin.
研究动机与目标
- 通过直接集成到 Remix-IDE,推进 Solidity 的变异测试。
- 提供全面的变异操作符集,包括安全导向的操作符。
- 在 Remix 中实现端到端的变异测试工作流,从变异到测试执行与报告。
- 为漏洞检测器的基准测试和可用数据集生成提供支持。
提出的方法
- 基于 SuMo 和 Solidity-parser-antlr,通过访问者模式对 Solidity AST 进行变异。
- 新增六个安全导向的操作符,使总变异数达到 50 个。
- 应用操作符优化和简单编译器等价性以减少冗余变体。
- 通过配置文件和 CLI 与 Truffle、Hardhat、Brownie、Foundry 集成。
- 提供基于 Docker 的安装方式和 Remix 本地插件工作流,便于在 IDE 中立即使用。
- 实时生成并记录变异体,并输出 HTML 变异报告。

实验结果
研究问题
- RQ1MuSe 能否在范围广泛的 Solidity 合同中有效注入安全导向的漏洞?
- RQ2六个安全导向操作符在真实合约中的注入率及分布如何?
- RQ3Slither 对 MuSe 生成的变异体中注入的漏洞检测能力如何,这对测试套件有效性意味着什么?
- RQ4IDE 集成如何影响智能合约测试的可用性、采用度和快速反馈?
主要发现
| 操作符 | 被变异的 SC 数量 | # 变异体 | 注入率 |
|---|---|---|---|
| UR | 33,910 | 213,912 | 71.50% |
| TX | 32,250 | 65,825 | 68.00% |
| CL | 26,604 | 61,687 | 56.00% |
| UC | 4,094 | 4,992 | 8.60% |
| US | 2,248 | 3,928 | 4.70% |
| DTU | 113 | 149 | 0.23% |
| - | - | 350,493 | 34.83% |
- MuSe 通过生成的变异体将易损数据集扩大约 840%。
- 六个安全导向操作符的注入率差异较大,其中 UR(未使用的返回值)、TX(tx.origin)和 CL(循环中的多次调用)为最具可注入性的几类。
- Slither 以不同的成功率回忆注入的漏洞:UC 和 US 达到 1.000 的回忆率,CL 0.810,UR 0.605,TX 0.336,DTU 0.100,平均回忆率为 0.597。
- 在 213,912 个变异体中,来自 33,910 个被变异合约的首要注入类型为 UR,占比 71.50%。
- MuSe 支持与 Remix-IDE 以及四个测试框架的直接集成,实现端到端的变异、测试和 HTML 报告。

更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。