Moving Beyond Specification Validation to Specification Refinement with Mutation Verification
Archie Licudi, Adam Jones · Team Imperial College Fun-don
Submitted to The Secure Program Synthesis Hackathon. Sprint projects are early-stage work by participants, not Apart Research publications.
For mutation verification of Dafny code, we evaluate the usage of constraint-solving based filtering of equivalent mutants and LLM analysis of legitimate alive mutants for automating the process of refining the specifications of verified Dafny code from mutations.
Reviews
This work presents an automated specification refiner that incorporates a mutation generator and a root cause analyzer. Notably, it leverages mutation verification not only to identify weak specifications but also to automatically refine them. The hybrid symbolic-and-LLM architecture is highly effective, utilizing inexpensive solver calls to filter false positives prior to engaging computationally expensive LLM reasoning. Future work could extend this pipeline by integrating other forms of lightweight testing alongside mutation testing.
Mutation analysis is a great way to find bugs in specs and code. This sprint starts from mutdafny and proposes a significant enhancement: remove the mutations that are not useful or are duplicates, and also propose spec refinements. This has the potential to vastly reduce the need for human intervention. Going forward, it would be interesting to see whether logic-based filtering methods can be used instead of using an LLM as a judge, which might increase the soundness (this is proposed in the report but I couldn't see an implementation yet). I imagine further benchmarking would also be needed before deployment, in particular are the spec refinements useful or do they lead to overfitting? But it is on an interesting trajectory.
Cite this project
@misc{licudi2026moving,
title = {{Moving Beyond Specification Validation to Specification Refinement with Mutation Verification}},
author = {Archie Licudi and Adam Jones},
year = {2026},
month = may,
note = {Submitted to The Secure Program Synthesis Hackathon, an Apart Research Sprint},
howpublished = {\url{https://apartresearch.com/sprints/projects/moving-beyond-specification-validation-to-specification-refinement-with-mutation-verification-vkxl}},
url = {https://apartresearch.com/sprints/projects/moving-beyond-specification-validation-to-specification-refinement-with-mutation-verification-vkxl}
}More from The Secure Program Synthesis Hackathon
- View project: Vibe-Coding Specs: Eliciting, Editing, and Verifying Specifications for AI Coding Agents
Vibe-Coding Specs: Eliciting, Editing, and Verifying Specifications for AI Coding Agents
Lida Safety
Specifications for real systems do not exist as one-shot artifacts: the user's intent emerges as they discover edge cases, rewrite drafts, and react to failing tests. We present an iterative pipeline that takes this …
- View project: AgentSpecGap
AgentSpecGap
solo-team
This prototype extracts rules from system prompts, tool descriptions, and runtime config. Rules are classified into one of interface validation, authorization check, workflow ordering validation, runtime validation, …
- View project: SpecGap Arena
SpecGap Arena
Obligation Cartographers
SpecGap Arena is a benchmark and framework that exposes how incomplete specifications let plausible but incorrect code pass public tests. It synthesizes missing semantic obligations (security boundaries, invariants, …