# Verified Software Toolchain (Verifiable C)

> Prove in the Rocq proof assistant that a C program meets its specification; compiled with CompCert, the proof carries down to the assembly code.

- Kind: toolchain
- Verifies: C (Programs in the Verifiable C subset of CompCert Clight; clightgen -normalize first moves side effects and memory loads out of expressions.)
- Effort: Interactive — You write proofs step by step in a proof assistant.
- Stage: 1 (Usable)
- Trust: Checker strong, Semantics strong, Frontend strong, Binary gap strong, Escape hatches partial
- Licence: open-source, BSD-2-Clause (VST itself; the CompCert clightgen front end it needs is under the INRIA non-commercial license)
- Latest release: 2.17 (2026-09-22) https://github.com/PrincetonUniversity/VST/releases/tag/v2.17
- Links: [homepage](https://vst.cs.princeton.edu/), [repo](https://github.com/PrincetonUniversity/VST), [docs](https://github.com/PrincetonUniversity/VST/blob/master/doc/VC.pdf), [paper](https://www.cs.princeton.edu/~appel/papers/vst.pdf), [tutorial](https://softwarefoundations.cis.upenn.edu/vc-current/index.html)

## Use it if
- You need the strongest guarantee available for a C program, carried down to assembly by CompCert, and can invest in interactive proofs in Rocq.
- Your code is self-contained C such as a cryptographic primitive or a data-structure library, written in (or easy to adapt to) the subset VST supports.

## Look elsewhere if
- Your code casts between pointers and integers, uses bit-fields, goto, struct assignment, or defines variadic functions; VST rejects these.
- You want push-button checking; every function needs a hand-written proof in Rocq.
- You use it commercially and cannot get a CompCert license: the clightgen tool that turns C into Rocq is not open source.

## How it works (pipeline)

| Step | Component | Assurance | Note |
|---|---|---|---|
| frontend | CompCert clightgen | trusted | Translates a .c file into a Rocq file holding its Clight syntax tree. It is CompCert's own front end: the parser is verified, but preprocessing (an external C preprocessor) and elaboration are not (CompCert manual, section 1.3). |
| semantics | CompCert Clight semantics (`compcert-c`) | verified | VST's program logic is proved sound against this semantics, and CompCert is proved correct against the same semantics, so when you compile with CompCert it is an internal interface rather than an assumption. |
| translation | Verifiable C program logic and Floyd proof automation | verified | A higher-order separation logic for Clight, proved sound in Rocq. Floyd is the set of Rocq tactics that users run to build proofs. |
| checker | Rocq kernel (`rocq`) | trusted |  |
| compiler | CompCert (or GCC / Clang) | verified | CompCert's correctness proof covers compilation to assembly; the assembler and linker are outside it. Compiling with GCC or Clang is possible, but then the compiler must be trusted. |

## Trust

| Axis | Level | Summary | Note |
|---|---|---|---|
| Checker | Strong (green) | Every proof is checked by the Rocq kernel. |  |
| Semantics | Strong (green) | CompCert's C semantics; with CompCert it is a proved interface, not an assumption. | The VST and CompCert proofs meet at the same Clight semantics, so a program compiled with CompCert does not depend on that semantics matching ISO C. With GCC or Clang, the semantics becomes an assumption about what those compilers do. [source](https://www.cs.princeton.edu/~appel/papers/verified-hmac-drbg.pdf) |
| Frontend | Strong (green) | CompCert's own front end; its parser is verified, its elaboration is not. | clightgen uses the same front end as the CompCert compiler. Preprocessing is done by an external tool and elaboration to CompCert C is not verified (CompCert manual, section 1.3). If you compile with GCC or Clang instead, treat this axis as amber. [source](https://compcert.org/man/manual001.html) |
| Binary gap | Strong (green) | With CompCert the proof carries down to assembly; assembler and linker not covered. | Published VST proofs compose with CompCert's correctness theorem in Rocq. The CompCert manual says assembling and linking are not verified. Compiling with GCC or Clang instead puts the compiler back in the trusted base. [source](https://www.cs.princeton.edu/~appel/papers/verified-hmac-drbg.pdf) |
| Escape hatches | Partial (amber) | Rocq Admitted and Axiom exist; Print Assumptions lists them. | Library specifications imported from floyd.library (malloc, free, exit and others) are assumed. The manual says so and suggests not importing them if you do not trust them. [source](https://github.com/PrincetonUniversity/VST/blob/master/doc/VC.pdf) |

## What it can prove

| Property | Support |
|---|---|
| No undefined behavior | Supported — A proved function never crashes or hits undefined behavior in CompCert C, given its precondition. Signed integer overflow must be proved absent. ([source](https://github.com/PrincetonUniversity/VST/blob/master/doc/VC.pdf)) |
| Functional correctness | Supported — The main use: functions are proved against specifications written in Rocq. ([source](https://github.com/PrincetonUniversity/VST/blob/master/doc/VC.pdf)) |
| Equivalence | Not supported — No built-in way to compare two programs. You can prove that both meet the same specification. |
| Information flow | Not supported — The program logic has no rules for secrecy or timing. Published VST work proves cryptographic security by composing functional correctness with separate Rocq proofs, not information-flow properties of the C code. ([source](https://www.cs.princeton.edu/~appel/papers/verified-hmac-drbg.pdf)) |
| Concurrency | Partial — Supports threads synchronized with locks and with sequentially consistent atomics, using Iris-style reasoning. Weaker (relaxed) atomics are not supported. CompCert's proof is for sequential code; extending it to concurrent programs is a separate research result. ([source](https://github.com/PrincetonUniversity/VST/blob/master/doc/concurrency.pdf)) |
| Termination and liveness | Not supported — Partial correctness only: a proof says the code does not crash and, if it terminates, ends in a state satisfying the postcondition. ([source](https://github.com/PrincetonUniversity/VST/blob/master/doc/VC.pdf)) |

## Common features

| Feature | Support |
|---|---|
| Machine integers | Supported — Signed and unsigned machine integers; signed overflow must be proved absent. ([source](https://github.com/PrincetonUniversity/VST/blob/master/doc/VC.pdf)) |
| Floating point | Supported — Uses CompCert's IEEE 754 model. The LAProof work verified a floating-point sparse matrix-vector multiply in C with VST, including accuracy bounds. ([source](https://www.cs.princeton.edu/~appel/papers/LAProof.pdf)) |
| Heap and pointers | Supported — Separation logic for pointer data structures; malloc and free have (assumed) specifications. ([source](https://github.com/PrincetonUniversity/VST/blob/master/doc/VC.pdf)) |
| Arrays and buffers | Supported ([source](https://github.com/PrincetonUniversity/VST/blob/master/doc/VC.pdf)) |
| Loops | Supported — Loops are verified with user-written loop invariants. ([source](https://github.com/PrincetonUniversity/VST/blob/master/doc/VC.pdf)) |
| Recursion | Supported ([source](https://github.com/PrincetonUniversity/VST/blob/master/doc/VC.pdf)) |
| Higher-order code | Supported — Function pointers are supported; the manual shows object-oriented C with function pointers (progs/verif_object.v, progs/verif_message.v). ([source](https://github.com/PrincetonUniversity/VST/blob/master/doc/VC.pdf)) |
| Threads and shared memory | Partial — Locks and sequentially consistent atomics only; no relaxed atomics. ([source](https://github.com/PrincetonUniversity/VST/blob/master/doc/concurrency.pdf)) |
| I/O and system calls | Partial — Calls to external functions (system calls, I/O) are given specifications that are assumed, not proved. ([source](https://github.com/PrincetonUniversity/VST/blob/master/doc/VC.pdf)) |
| Standard library | Partial — Ships assumed specifications for malloc, free, exit and a few others; the manual says their implementations are not proved against them. Other library functions need your own specifications. ([source](https://github.com/PrincetonUniversity/VST/blob/master/doc/VC.pdf)) |

## C-specific features

| Feature | Support |
|---|---|
| Pointer casts and provenance | Not supported — The manual lists "no casting between integers and pointers" as a restriction of Verifiable C. ([source](https://github.com/PrincetonUniversity/VST/blob/master/doc/VC.pdf)) |
| Unions and type punning | Partial — Unions are supported. Reading a different member than the one written works only in special cases: same representation, or numeric members of the same size (manual chapter on union casting). ([source](https://github.com/PrincetonUniversity/VST/blob/master/doc/VC.pdf)) |
| Bit-fields | Not supported — The manual lists "no bitfields in structs" as a restriction, even though CompCert itself supports them. ([source](https://github.com/PrincetonUniversity/VST/blob/master/doc/VC.pdf)) |
| Variadic functions | Partial — Variadic functions cannot be verified. There is limited, undocumented support for calling printf and fprintf. ([source](https://github.com/PrincetonUniversity/VST/blob/master/doc/VC.pdf)) |
| setjmp / longjmp | Not supported — CompCert, whose semantics VST uses, treats setjmp and longjmp as ordinary functions and advises against using them. ([source](https://compcert.org/man/manual005.html)) |
| volatile and MMIO | Unknown — The manual does not describe how volatile accesses are verified. |
| Inline assembly | Not supported — No documented support in VST. CompCert turns asm statements off by default and warns that they can break its guarantees. ([source](https://compcert.org/man/manual006.html)) |

## Stage

**Stage 1: Usable.**

| Stage | Criterion | Met | Evidence / note |
|---|---|---|---|
| 0 | Publicly available | yes | [evidence](https://github.com/PrincetonUniversity/VST) |
| 0 | At least one published verification uses it | yes | [evidence](https://www.usenix.org/conference/usenixsecurity15/technical-sessions/presentation/beringer) Verified correctness and security of OpenSSL HMAC (USENIX Security 2015), among others. |
| 1 | Released or updated in the last 12 months | yes | [evidence](https://github.com/PrincetonUniversity/VST/releases/tag/v2.17) Latest release: 2.17, 2026-09-22. |
| 1 | Installs and runs on current platforms | yes | [evidence](https://github.com/PrincetonUniversity/VST/releases/tag/v2.17) Release 2.17 (2026-09) works with Rocq 9.1 to 9.3 and CompCert 3.18. |
| 1 | User documentation or tutorial | yes | [evidence](https://softwarefoundations.cis.upenn.edu/vc-current/index.html) Reference manual plus Software Foundations Volume 5 (Verifiable C) as a tutorial. |
| 1 | Used by a group other than its authors | yes | [evidence](https://eprint.iacr.org/2021/428) Radboud University used VST to prove X25519 in TweetNaCl correct (CSF 2021). |
| 2 | Verified code in production at two or more independent organizations | no | None recorded. |
| 2 | Checker axis is not red | yes |  |
| 2 | Semantics axis is not red | yes |  |
| 2 | Public channel for soundness bugs | yes | [evidence](https://github.com/PrincetonUniversity/VST/issues) Public GitHub issue tracker. |

Missing for Stage 2: Verified code in production at two or more independent organizations.

## Projects
- [SHA-256 from OpenSSL](https://www.cs.princeton.edu/~appel/papers/verif-sha-2.pdf)
- [OpenSSL HMAC (USENIX Security 2015)](https://www.usenix.org/conference/usenixsecurity15/technical-sessions/presentation/beringer)
- [mbedTLS HMAC-DRBG (CCS 2017)](https://www.cs.princeton.edu/~appel/papers/verified-hmac-drbg.pdf)
- [X25519 in TweetNaCl (CSF 2021)](https://eprint.iacr.org/2021/428)
- [LAProof floating-point sparse matrix-vector multiply](https://www.cs.princeton.edu/~appel/papers/LAProof.pdf)

## Sources
- [VST repository and README](https://github.com/PrincetonUniversity/VST)
- [Verifiable C reference manual](https://github.com/PrincetonUniversity/VST/blob/master/doc/VC.pdf)
- [Verifying Concurrent Programs with VST (Mansky)](https://github.com/PrincetonUniversity/VST/blob/master/doc/concurrency.pdf)
- [VST 2.17 release notes](https://github.com/PrincetonUniversity/VST/releases/tag/v2.17)
- [VST license](https://github.com/PrincetonUniversity/VST/blob/master/LICENSE)
- [Note on the clightgen license](https://github.com/PrincetonUniversity/VST/blob/master/CLIGHTGEN-LICENSE)
- [VST home page](https://vst.cs.princeton.edu/)
- [Verified Correctness and Security of mbedTLS HMAC-DRBG (CCS 2017), trusted base discussion](https://www.cs.princeton.edu/~appel/papers/verified-hmac-drbg.pdf)
- [Compiler Correctness for Concurrency (Princeton TR-014-19, 2020)](https://www.cs.princeton.edu/~appel/papers/ccc.pdf)
- [CompCert manual, structure and verified parts](https://compcert.org/man/manual001.html)

---
Last checked 2026-11-26. Data: [JSON](/toolchains/vst.json) · Page: [HTML](/toolchains/vst/) · Methodology v0.1: [/methodology/](/methodology/) · Corrections: [/contribute/](/contribute/)
