PyVeritas: On Verifying Python via LLM-Based Transpilation and Bounded Model Checking for C
Not on the map. Why?
Abstract (arXiv)
Python has become the dominant language for general-purpose programming, yet it lacks robust tools for formal verification. In contrast, programmers working in languages such as C benefit from mature model checkers, for example CBMC, which enable exhaustive symbolic reasoning and fault localisation. The inherent complexity of Python, coupled with the verbosity and low-level nature of existing transpilers (e.g., Cython), have historically limited the applicability of formal verification to Python programs. In this paper, we propose PyVeritas, a novel framework that leverages Large Language Models (LLMs) for high-level transpilation from Python to C, followed by bounded model checking and MaxSAT-based fault localisation in the generated C code. PyVeritas enables verification and bug localisation for Python code using existing model checking tools for C. Our empirical evaluation on two Python benchmarks demonstrates that LLM-based transpilation can achieve a high degree of accuracy, up to 80--90% for some LLMs, enabling effective development environment that supports assertion-based verification and interpretable fault diagnosis for small yet non-trivial Python programs.
Key facts. Cited by 4 papers in the map (data through 14 Oct 2026). Builds on 7 of its 40 references that are in the map. First posted on arXiv 11 Aug 2025.
Builds on
7 of 40 references.
References · 7
- 2024LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Codecited by 2,004
- 2024DeepSeek-Coder-V2: Breaking the Barrier of Closed-Source Models in Code Intelligencecited by 331
- 2024Granite Code Models: A Family of Open Foundation Models for Code Intelligencecited by 117
- 2022Repair Is Nearly Generation: Multilingual Program Repair with LLMscited by 68
- 2024What can Large Language Models Capture about Code Functional Equivalence?cited by 14
- 2024ESBMC-Python: A Bounded Model Checker for Python Programscited by 4
- 2023Automatically Testing Functional Properties of Code Translation Modelscited by 3
Built on by
Citing papers per year: 2025: 1; 2026: 3.
4 papers.
- 2026MaxSAT-Based Feedback for Guiding Vision-Language Models in Sudokucited by 1
- 2025Model-Based Diagnosis with Multiple Observations: A Unified Approach for C Software and Boolean Circuitscited by 0
- 2026Why3-py: A Tool for Formal Verification of Hypothesis Testing and Meta-Analysis in Pythoncited by 0
- 2026T-LLM Compiler: Trusted LLM-based Code Optimization and Verification Frameworkcited by 0
- 2026T-LLM Compiler: Trusted LLM-based Code Optimization and Verification Framework15 Aug 2026
- 2026MaxSAT-Based Feedback for Guiding Vision-Language Models in Sudoku14 Jul 2026
- 2026Why3-py: A Tool for Formal Verification of Hypothesis Testing and Meta-Analysis in Python4 Jul 2026
- 2025Model-Based Diagnosis with Multiple Observations: A Unified Approach for C Software and Boolean Circuits2 Dec 2025
Similar, not cited
Close in wording, no citation either way
- 2025Can Large Language Models Reason About Complex Execution Paths? An Empirical Study on Python
- 2026Can LLMs Reason About Runtime Behavior? A Repository-Level Dynamic Benchmark
- 2026LLM vs. Human Unit Tests: Fault Detection on Real Python Bugs
- 2025Towards Repository-Level Program Verification with Large Language Models
- 2026Teaching LLMs Program Semantics via Symbolic Execution Traces
- 2026LLMs versus the Halting Problem: Characterizing Program Termination Reasoning
- 2026Consistency Meets Verification: Enhancing Test Generation Quality in Large Language Models Without Ground-Truth Solutions
- 2025Understanding Formal Reasoning Failures in LLMs as Abstract Interpreters