arXiv:2610.23241cs.SEOct 2026

Manuscript Offprint

arXiv:2610.23241

Towards Agentic Proof Harness Engineering

Rohith Kumar Shanmuganathan, Cedric Richter, Heike Wehrheim

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original. This text is shared under the same licence.

Rohith Kumar Shanmuganathan 1^{1}, Cedric Richter 2^{2}, and Heike Wehrheim 1^{1}

1^{1} Carl von Ossietzky Universität Oldenburg, Oldenburg, Germany

2^{2} Humboldt-Universität zu Berlin, Berlin, Germany

{rohith.shanmuganathan, heike.wehrheim}@uol.de

cedric.richter@hu-berlin.de

Artifact: https://doi.org/10.5281/zenodo.23378668

Abstract. Formal verification of real-world projects requires substantial manual effort, from specifying correctness properties to constructing the infrastructure needed to check them. We envision verification agents that assist developers throughout this process. Among the many tasks involved, one stands out as both foundational and amenable to automation: proof-harness engineering. A proof harness defines an isolated verification environment for a program unit, such as a function or module, by providing symbolic inputs, initialization code, and models of its dependencies. Today, proof-harness engineering remains largely a manual task performed by verification engineers. To explore the potential of coding agents for this task, we propose an agentic proof-harness engineer that automatically constructs verifier-ready harnesses from a software project and a designated verification target. We combine the agent with formal soundness and precision guards to validate generated abstractions and guide their refinement. We evaluate the feasibility of our approach in an exploratory case study on CURL and LIBUV, using three historical assertion violations already embedded in the source code as verification properties. Our results show that the agent successfully constructs proof harnesses that enable CBMC to detect all three violations. We further demonstrate the potential for reusing these harnesses with other verification tools.

1 Introduction

Automatic software verification has become a mature field, with numerous tools (verifiers) supporting program verification. The annual Competition on Software Verification (SV-COMP) [4] provides a large and diverse benchmark suite on which the effectiveness and efficiency of verifiers are evaluated. Despite significant progress in recent years, applying software verification tools to real-world software projects remains challenging. Verifiers typically operate on well-defined verification tasks, whereas real-world projects consist of multiple source files, depend on project-specific build configurations and external libraries, and require suitable initialization and environment models. Developers must therefore bridge the gap between a software project and a verifier-ready verification task.

R.K. Shanmuganathan, C. Richter, H. Wehrheim

In this paper, we envision coding agents assisting developers in this process and focus on the task of proof-harness engineering. A proof harness defines an isolated verification environment for a program unit, such as a function, by providing symbolic inputs, initialization code, and abstractions of its dependencies. Our goal is an autonomous verification-harness agent that constructs complete proof harnesses for C projects given the project source code, its build instructions, and a unit to be verified. The agent constructs the harness by recovering and abstracting information already present in the project, such as how the target is initialized, used, and interacts with its dependencies. The resulting harness should over-approximate the target's possible executions without excluding relevant program behaviors. Importantly, the agent does not invent the specification; the properties to be verified remain under the control of the developer. Such properties are frequently expressed in program code through assertions and sanity checks [8].

Constructing a proof harness requires substantial project-specific knowledge. Recent work on HARNESSFORGE [2] automates the extraction of self-contained verification tasks from C projects, but requires manually provided harness code, including symbolic inputs, initialization, and models of external dependencies. We investigate whether a coding agent can autonomously construct the complete proof harness from the project itself, without requiring developers to provide any harness code. To address the risk of unsound or imprecise abstractions, we introduce independent formal guardrails that check the soundness of dependency abstractions and guide their refinement using verifier feedback.

To evaluate the feasibility of agentic proof-harness engineering, we implement a prototype and conduct an exploratory case study on two real-world C projects, CURL and LIBUV. We use three historical assertion violations as verification targets. Our agent successfully constructs proof harnesses that enable CBMC to detect all three violations. We further investigate the reuse of these harnesses with other verification tools, demonstrating their potential beyond the verifier used during construction while also exposing limitations in cross-verifier compatibility.