Diversifying to Verify: When Task-Equivalent Programs Differ in Verifiability

· Source: Artificial Intelligence · Field: Technology & Digital — Artificial Intelligence & Machine Learning, Software Development & Engineering · Depth: Expert, quick

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

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

Topics

Best for: Research Scientist, AI Scientist, Machine Learning Engineer, Software Engineer

Related on AIssential

Open in AIssential →

Editorial summary, takeaway, and curation by AIssential. Original article published by Artificial Intelligence.