MutDafny: A Mutation-Based Approach to Assess Dafny Specifications
Isabel Amaral, Alexandra Mendes, José Campos
摘要
In verification-aware languages, such as Dafny, despite their critical role, specifications are as prone to error as implementations. Flaws in specifications can result in formally verified programs that deviate from the intended behavior. In this paper, we explore the use of mutation testing to reveal weaknesses in formal specifications written in Dafny.
We present MutDafny, a tool that increases the reliability of Dafny specifications by automatically signaling potential weaknesses. Using a mutation testing approach, we introduce faults (mutations) into the code and rely on formal specifications for detecting them. If a program with a mutant verifies, this may indicate a weakness in the specification. We extensively analyze mutation operators from popular tools, identifying the ones applicable to Dafny. In addition, we synthesize new operators tailored for the language from bugfix commits in publicly available Dafny projects on GitHub. Drawing from both, we equipped our tool with a total of 40 mutation operators. We evaluate MutDafny's effectiveness and efficiency on a dataset of 794 real-world Dafny programs, and manually analyze a subset of the resulting undetected mutants, identifying five weak real-world specifications (on average, one at every 241 lines of code) that would benefit from strengthening.
问问这篇 Paper
智能体会读完全文。
Lune 把这篇 Paper 索引到了每一个公式,引用它的顶会 Paper 也一样。你提问,回答直接引用原文。
它引用的顶会 Paper6
- Can Large Language Models Transform Natural Language Intent into Formal Method Postconditions?Madeline Endres, Sarah Fakhoury, Saikat Chakraborty, Shuvendu K. LahiriFSE 2024 · 被引用 27 次
- Towards AI-Assisted Synthesis of Verified Dafny MethodsMd Rakib Hossain Misu, Cristina V. Lopes, Iris Ma, James NobleFSE 2024 · 被引用 26 次
- Verification of the Incremental Merkle Tree Algorithm with DafnyFranck CassezFM 2021 · 被引用 9 次
- IronSpec: Increasing the Reliability of Formal SpecificationsEli Goldweber, Weixin Yu, Seyed Armin Vakil-Ghahani, Manos KapritsosOSDI 2024 · 被引用 4 次
- Equivalent Mutants in the Wild: Identifying and Efficiently Suppressing Equivalent Mutants for Java ProgramsBenjamin Kushigian, Samuel J. Kaufman, Ryan Featherman, Hannah Potter 等ISSTA 2024 · 被引用 3 次
相关 Paper
- Transforming Test Suites into CroissantsYang Chen, Alperen Yildiz, Darko Marinov, Reyhaneh JabbarvandISSTA 2023 · 被引用 5 次
- : A Mutation Testing Pipeline for Deep Reinforcement Learning Based on Real FaultsDeepak-George Thomas, Matteo Biagiola, Nargiz Humbatova, Mohammad Wardat 等ICSE 2025 · 被引用 4 次
- On the unusual effectiveness of type-aware operator mutations for testing SMT solversDominik Winterer, Chengyu Zhang, Zhendong SuOOPSLA 2020 · 被引用 55 次
- Testing Dafny (experience paper)Ahmed Irfan, Sorawee Porncharoenwase, Zvonimir Rakamaric, Neha Rungta 等ISSTA 2022 · 被引用 15 次
- Metamorph: Synthesizing Large Objects from Dafny SpecificationsAleksandr Fedchin, Alexander Y. Bai, Jeffrey S. FosterOOPSLA 2025
