Source-linked AI summary

ProofPulse: Interactive Proof Coverage Analysis for Dafny

Álvaro F. Silva, Ruben Martins, Alexandra Mendes

arXiv:2608.30818v1cs.SE

TL;DR

Deductive verification can succeed even when specifications leave code weakly constrained or proofs vacuous. ProofPulse analyzes proof dependencies with interactive three-valued coverage to distinguish essential, auxiliary, and irrelevant elements. Across 252 verified Dafny programs, it provides high-precision weakness signals; minimization achieves perfect precondition precision and reduces false positives, while attribution remains limited by Dafny-to-Boogie-to-Z3 source mapping.

  • Problem

    Successful verification does not ensure that a specification is adequately coupled to the code, allowing weak specifications and redundant invariants to create overconfidence.

  • Method

    ProofPulse builds proof dependency graphs and applies three-valued coverage to distinguish specification-essential, auxiliary, and irrelevant proof elements within interactive Dafny tooling.

  • Results

    ProofPulse provides a high-precision signal for unnecessary preconditions, vacuous proofs, and weak proof coupling; unsat-core minimization achieves perfect precondition precision and reduces false positives across evaluated categories.

  • Takeaways & Limitations

    Proof coverage is a practical complement to verification because it can reveal weak proof coupling in programs that otherwise verify successfully.

  • Takeaways & Limitations

    ProofPulse cannot fully capture semantic intent, and its attribution is limited by lossy Dafny-to-Boogie-to-Z3 source mapping.

Abstract

from arXiv · show

Deductive verification ensures that an implementation satisfies its specification, but successful verification does not guarantee the quality of the specification. As such, weak specifications and redundant invariants may create overconfidence in ``verified'' code. We present \proofpulse, a tool for Dafny that diagnoses specification quality using a three-valued proof coverage model. By analyzing proof dependencies, ProofPulse distinguishes between elements that contribute to specification intent, those used only for auxiliary checks, and those irrelevant to any proof obligation. Evaluated against an oracle of 252 programs from the dafny-synthesis benchmark, ProofPulse provides a high-precision signal for specification weaknesses, particularly unnecessary preconditions and vacuous proofs. With unsat-core minimization, ProofPulse achieves perfect precision for precondition classification and reduces false positives across all evaluated categories. These results show that proof coverage is a practical complement to verification. Although it cannot fully capture semantic intent, it can reveal weak proof coupling in programs that otherwise appear fully verified. Just as a pulse check distinguishes vitality from the mere absence of symptoms, ProofPulse exposes weaknesses in proofs that technically verify successfully but still suffer from inadequate or redundant code and specifications.

1 Introduction

Successful Dafny verification can leave specifications weakly coupled to code, creating confidence in programs that remain effectively unconstrained. ProofPulse addresses this gap with interactive, three-valued proof coverage and optional unsat-core minimization.

  • Successful verification checks only the given specification, so weak postconditions, redundant invariants, or unnecessary preconditions may leave substantial program behavior unconstrained.
  • Prior binary coverage exposed whether elements mattered to proofs but made it difficult to distinguish specification-defining elements from auxiliary checks.
  • ProofPulse provides an interactive VSCode and web tool for exploring proof dependencies in Dafny programs.
  • Its three-valued model distinguishes essential, auxiliary, and irrelevant proof elements.
  • Evaluation on 252 programs shows a high-precision signal for unnecessary preconditions, vacuous proofs, and weak proof coupling.

2 Proof Coverage

ProofPulse extends binary proof relevance by separating elements essential to the main specification from those supporting only auxiliary obligations or no proof obligation. Its coverage statuses are propagated through dependency graphs and refined according to element type.

  • ProofPulse retains the semantic notion of proof relevance while separating fully irrelevant elements from those relevant only to auxiliary obligations.
  • CovTest identifies elements used by verification but not essential to the primary proof objective.
  • Coverage computation builds a proof dependency graph, propagates internal statuses downward from top nodes, and assigns every node a status.
  • Type-aware refinement maps coverage differently for postconditions, preconditions, assertions, and code lines.
  • The precondition radius >= 0.0 is CovTest because a caller exercises it although it is unnecessary for proving the non-negative-square postcondition.

3 ProofPulse Architecture

ProofPulse connects Dafny verification logs to interactive coverage visualizations through a core library that constructs proof dependency graphs and computes three-valued coverage.

  • The pipeline invokes Dafny with coverage logging to produce a prover log containing proof dependencies.
  • The core library parses the prover log and constructs a proof dependency graph for coverage analysis.
  • The pipeline computes three-valued coverage and feeds the results to two visualization front-ends.
  • Table 1 compares Base and Min configurations using confusion-matrix counts plus precision, recall, and accuracy.

4 Evaluation

ProofPulse is evaluated as a practical proxy for specification quality against 252 manually labeled Dafny programs. It performs especially well for unnecessary preconditions and weak postconditions, while exposing vacuous proofs and attribution limits.

  • Evaluation setup: ProofPulse compares proof-coverage signals with semantic specification-quality labels from 252 verified dafny-synthesis programs.The oracle labels postcondition strength, precondition necessity, and loop-invariant strength.
  • Unsat-core minimization: Minimization reduces false positives across all categories while preserving recall, improving attribution precision for interactive use.For example, postcondition false positives decrease from 24 to 21.
  • Preconditions: Perfect precision and 0.96 accuracy for precondition classification closely match the oracle’s Optional label for uncovered preconditions.An uncovered precondition can be safely removed because it is unnecessary for verification.
  • Postconditions: Postcondition classification achieves 0.90 precision and 1.00 recall, although fully covered weak postconditions can still be mislabeled Strong.No truly strong postcondition was flagged as weak in the evaluation.
  • Invariants: Invariant classification behaves similarly to postcondition classification because loop invariants constrain behavior at different program points.Loop invariants serve as both preconditions and postconditions at different program points.
  • Vacuity and limitations: ProofPulse exposes vacuous proofs when contradictory assumptions alone discharge a postcondition, while quantifier encoding can falsely report necessary source lines as uncovered.The quantified-expression limitation arises because Boogie triggers do not appear in Z3 unsat cores.

5 Related Work

ProofPulse extends prior verification-coverage work with finer-grained proof relevance and interactive inspection. It complements existing proof, test, and vacuity analyses by identifying redundant specifications with fewer false positives.

  • Verification coverage: ProofPulse builds on unsatisfiable-core-based verification coverage while extending binary coverage with three-valued classification, dependency graphs, and interactive tooling.The extension targets Boogie/Dafny verification workflows.
  • Specification quality: Prior specification-quality approaches combine proof and test coverage, while smoke testing detects vacuity but produces many warnings and misses redundant specifications.ProofPulse is presented as providing finer-grained feedback with fewer false positives.

6 Conclusion and Future Work

ProofPulse delivers interactive Dafny proof-coverage analysis through dependency graphs and three-valued classification. Its evaluation supports precondition classification especially strongly, while future work targets finer attribution, user studies, broader language support, and quantifier handling.

  • Conclusion: ProofPulse combines a proof dependency graph with three-valued coverage to provide actionable specification-quality feedback in the developer’s IDE.Optional deletion-based unsat-core minimization reduces spurious dependencies and improves attribution precision.
  • Conclusion: Evaluation on 252 LLM-generated Dafny programs achieves perfect precondition precision, promising postcondition and invariant results, and fewer false positives with preserved recall.Remaining limitations are attributed largely to Boogie-to-Dafny attribution gaps.
  • Future work: Future work targets sub-expression attribution, studies of debugging time and specification understanding, additional verification-aware languages, and improved quantifier handling.
Loading 2608.30818v1…