Diversifying to Verify: When Task-Equivalent Programs Differ in Verifiability
Summary
The Diversify2Verify pipeline, an LLM-based system for Why3, addresses the challenge of program verification by exploring how implementation structure impacts automated verifiability. This system infers representation-specific contracts, generates and tests diverse recursive and imperative array/list implementations, and attempts verification with bounded verifier-guided annotation repair. Researchers constructed a benchmark of 73 tasks across integers, arrays, and lists, yielding 292 implementation variants. Diversify2Verify successfully verified 96 artifacts initially, improving to 154 after two repair passes, boosting artifact-level verification from 32.9% to 52.7%. At the task level, at least one variant verified for 49 of 73 tasks, achieving a 67.1% success rate. These findings demonstrate that task-equivalent implementations can differ significantly in verifiability, and implementation diversity helps identify verification-friendly artifacts.
Key takeaway
For software engineers focused on formal verification, you should consider generating diverse implementations for critical components. This research shows that even functionally identical code can have vastly different verifiability, with diverse variants significantly increasing the likelihood of achieving full verification. Integrate LLM-driven code generation and verifier-guided repair into your workflow to improve verification success rates.
Key insights
Task-equivalent program implementations vary significantly in automated verifiability, and diversity aids verification success.
Principles
- Implementation structure impacts program verifiability.
- Diverse implementations improve verification rates.
- Verifier-guided repair enhances artifact verification.
Method
Diversify2Verify uses an LLM pipeline to infer contracts, generate diverse recursive/imperative implementations, and apply bounded verifier-guided annotation repair for Why3 programs.
In practice
- Generate multiple program variants for verification.
- Employ LLMs for contract inference and code generation.
- Integrate verifier feedback for automated repair.
Topics
- Program Verification
- LLM Code Generation
- Software Correctness
- Why3
- Automated Repair
- Implementation Diversity
Best for: Research Scientist, AI Scientist, Machine Learning Engineer, Software Engineer
Related on AIssential
See Counsel's argued verdicts on the open AI decisions leaders are weighing →
Editorial summary, takeaway, and curation by AIssential. Original article published by Artificial Intelligence.