NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

A Framework for Debugging Automated Program Verification Proofs via Proof Actions

Chanhee Cho, Yi Zhou, Jay Bosamiya, Bryan ParnoCAV 2024

Introduction

Formal verification is divided into two primary paradigms: Interactive Proof Assistants (e.g., Coq, Lean) and Automated Verifiers (e.g., Dafny, Verus). While automated verifiers leverage SMT solvers to handle complex proofs, they often leave developers in the dark when a proof fails. SMT solvers act as "black boxes," providing minimal feedback beyond a failure message. Debugging these failures typically involves a manual, expert-driven "dance"—splitting conjunctions, moving preconditions, and isolating logic—a process often described as an "arcane art" rather than standard engineering.

To address this, we present ProofPlumber, an extensible framework that brings the "tactic" experience of interactive theorem provers to automated, SMT-based verification. ProofPlumber allows developers to programmatically automate the tedious debugging of failed proofs by manipulating source-level assertions and lemmas. By capturing expert "wisdom" in small, reusable scripts, the framework transforms manual proof-rewriting into a systematic engineering process.

The ProofPlumber Framework

ProofPlumber is designed to automate manual debugging practices through "Proof Actions." It is implemented as an extension to rust-analyzer and follows the Language Server Protocol (LSP), allowing actions to be triggered directly from an IDE like VS Code with a simple click on a failing assertion.

Architecture of the ProofPlumber framework.

The framework relies on several key components:

  • Transformation-Oriented Syntax Tree (TOST): A simplified AST that ignores whitespace and formatting, facilitating programmatic edits to source code. This allows proof actions to focus on the logic of the program rather than the minutiae of text formatting.
  • Semantic Context: An API providing deep program information, such as variable types and symbol definitions, which are not readily available in raw source text. This context is crucial for actions that need to understand the relationship between different parts of the code.
  • Verifier API: Enables proof actions to "speculatively" run the verifier (e.g., Verus) on modified code to check for errors and guide further transformations based on real-time feedback.

By focusing on source-level manipulations rather than low-level SMT counterexamples, ProofPlumber captures expert "wisdom" in small, reusable scripts. This approach also reduces the Trusted Computing Base (TCB); since the core verifier still validates the final proof, the debugging tool itself does not need to be trusted for soundness.

Evaluation and Proof Actions

The framework's utility was evaluated by implementing 17 proof actions derived from the Dafny Debugging Guide and real-world Verus developer experiences. These actions automate common tasks like decomposing failing assertions or applying weakest precondition steps.

Summary of implemented proof actions and their characteristics.

Key findings from the evaluation include:

  • Expressivity: ProofPlumber successfully implemented 16 of the 29 suggested rewrites from the Dafny guide. The remaining rewrites were either inapplicable to the Verus environment or required human "guessing" that currently falls outside the scope of automated actions.
  • Conciseness: The implemented actions are remarkably lightweight, ranging from 29 to 177 lines of code. This demonstrates that the framework provides the right level of abstraction for proof engineering, allowing complex debugging logic to be expressed succinctly.
  • Practical Utility: Actions like Decompose Failing Assertion and Weakest Precondition Step directly automate the most time-consuming aspects of the verification workflow, significantly reducing the manual effort required to fix failing proofs.

Limitations and Future Work

Despite its successes, ProofPlumber faces challenges with quantifiers (exists and forall), where SMT solvers often fail to provide concrete witnesses, necessitating human intervention. Additionally, "proof instability"—where minor changes cause the solver to fluctuate between success and failure—remains a hurdle that often requires human judgment. Future work aims to explore more sophisticated search strategies for proof actions and better integration with counterexample generation tools to automate the "guessing" of witness values for quantifiers.

Summary updated

BibTeX
@inproceedings{cho2024framework,
  author = {Chanhee Cho and Yi Zhou and Jay Bosamiya and Bryan Parno},
  title = {{A Framework for Debugging Automated Program Verification Proofs via Proof Actions}},
  booktitle = {CAV},
  year = {2024},
  doi = {10.1007/978-3-031-65627-9\_17},
}
Figure