Verified But Wrong
Philip Nilsson
Submitted to The Secure Program Synthesis Hackathon. Sprint projects are early-stage work by participants, not Apart Research publications.
Verified But Wrong studies a target-validity failure mode in vericoding: formally verified code can satisfy a supplied specification while violating the natural-language intent that specification was meant to capture. We audit a public Dafny vericoding benchmark, validate 11 externally sourced demonstrations including 3 direct-Dafny cases, and show in a controlled benchmark that incomplete specs can select wrong implementations. The core recommendation is simple: before using a formal spec as a candidate-selection target, vericoding pipelines should audit whether the spec is actually the right target.
Reviews
Aligning natural language with formal specifications is a challenging but important task. This work introduces an additional step to identify discrepancies between the natural language instructions and the generated specifications. However, the methodology for detecting these gaps and ensuring the reliability of this check is insufficiently explained. The verification process appears to rely heavily on model-based evaluation; incorporating a simple, deterministic symbolic check would significantly enhance the system's reliability.
Cite this project
@misc{nilsson2026verified,
title = {{Verified But Wrong}},
author = {Philip Nilsson},
year = {2026},
month = may,
note = {Submitted to The Secure Program Synthesis Hackathon, an Apart Research Sprint},
howpublished = {\url{https://apartresearch.com/sprints/projects/verified-but-wrong-izy3}},
url = {https://apartresearch.com/sprints/projects/verified-but-wrong-izy3}
}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, …