paper-with-me

Papers

PyVeritas: On Verifying Python via LLM-Based Transpilation and Bounded Model Checking for C

2025-08-11 · Pedro Orvalho, Marta Kwiatkowska 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.

📄 PDF Abstract BibTeX arXiv:2508.08171

Code (0)

등록된 구현이 없습니다.

Tasks

Fault Diagnosis

Similar Papers 제목 키워드 기반

CodePivot: Bootstrapping Multilingual Transpilation in LLMs via Reinforcement Learning without Parallel Corpora

2026-04-20 · Shangyu Li, Juyong Jiang, Meibo Ren, Sizhe Zhong 외 arxiv

Transpilation, or code translation, aims to convert source code from one programming language (PL) to another. It is beneficial for many downstream applications, from modernizing large legacy codebases to augmenting data…

Reinforcement LearningCode Translation

Lifted Model Checking for Relational MDPs

2021-06-22 · Wen-Chi Yang, Jean-François Raskin, Luc De Raedt

Probabilistic model checking has been developed for verifying systems that have stochastic and nondeterministic behavior. Given a probabilistic system, a probabilistic model checker takes a property and checks whether or…

modelModel-based Reinforcement Learningreinforcement-learningReinforcement Learning (RL)

LTL Verification of Memoryful Neural Agents

2025-03-04 · Mehran Hosseini, Alessio Lomuscio, Nicola Paoletti

We present a framework for verifying Memoryful Neural Multi-Agent Systems (MN-MAS) against full Linear Temporal Logic (LTL) specifications. In MN-MAS, agents interact with a non-deterministic, partially observable enviro…

State Space Models

SEMBridge: Tagless-Final Program Semantics with Weakest-Precondition and Bounded-Checking Interpretations

2026-05-29 · Eric Liang arxiv

Formal methods provide rigorous accounts of program behavior, but practical software engineering often works through executable libraries, tests, and incremental design. This paper presents SEMBridge, a small tagless-fin…

Tensor Probabilistic Model Checking of Finite-Horizon Markov Chains (Extended Version)

2026-08-01 · Jianlin Li, Nick Guo, Peter Ye, Yizhou Zhang arxiv

We reexamine the problem of verifying Markov chains with respect to step-bounded reachability probabilities. Prevailing approaches rely on encoding the state-transition matrix using either explicit or symbolic representa…