VeriPy Source-Preserving Verification and Compatibility Checking for Python Components

📅 2026-10-02
📈 Citations: 0
✨ Influential: 0
📄 PDF
🤖 AI Summary
This study addresses the challenges of aligning Python programs with formal specifications and verifying backward compatibility following component updates. To this end, this work proposes a source-preserving verification framework that expresses contracts through Python annotations and automatically generates proof artifacts in Dafny and Lean, thereby unifying development and functional verification at the source-code level. Furthermore, relational product techniques are introduced to check compatibility after component updates. The primary contribution is an end-to-end workflow bridging source-level proofs and compatibility verification, ensuring rigorous formal guarantees while preserving executable semantics. The associated codebase has been made publicly available.
📝 Abstract
Keeping a Python program and its formal guarantees aligned is a continuing maintenance problem. Specifications must describe the implementation that actually runs, and updates must preserve the behavior on which existing callers depend. VeriPy brings these obligations into a common workflow for annotated Python components. Developers and agents express contracts, invariants, and proof hooks as Python comments, then refine checked auxiliary lemmas using source-located diagnostics. Direct encoders produce Dafny or Lean artifacts while retaining admitted executable bodies and explicit models of their dependencies. A relational product checks whether an updated component still admits old inputs and preserves returned values and modeled exceptions. The resulting workflow connects source-level proof development with functional verification and backward compatibility, recording the assumptions under which each guarantee applies. The code is available at https://github.com/astrio-labs/veripy.
Problem

Research questions and friction points this paper is trying to address.

formal verification
backward compatibility
Python
specification alignment
component update
Innovation

Methods, ideas, or system contributions that make the work stand out.

source-preserving verification
backward compatibility
relational product
formal specification
Dafny
🔎 Similar Papers
No similar papers found.
💼 Related Jobs
No related jobs found.
N
Naing Oo Lwin
Astrio Labs