# C

> The systems language behind operating systems, embedded firmware, cryptography and most language runtimes.

- Kind: language
- Versions: C99, C11, C17, C23

## Compiles to

| To | Via | Assurance | What is lost |
|---|---|---|---|
| LLVM IR | clang | trusted | Source-level types and specifications. The line between defined and undefined behavior: clang may already have relied on undefined behavior when it emitted the IR. |
| x86-64 | CompCert | verified | Specifications stay at the C level; the proof covers the CompCert C subset only. |
| AArch64 | CompCert | verified | Specifications stay at the C level; the proof covers the CompCert C subset only. |
| RISC-V | CompCert | verified | Specifications stay at the C level; the proof covers the CompCert C subset only. |

## Verify your code directly

| Toolchain | Stage | Effort | Via |
|---|---|---|---|
| [Verified Software Toolchain (Verifiable C)](/toolchains/vst.md) | 1 Usable | Interactive | — |
| [CBMC](/toolchains/cbmc.md) | 1 Usable | Push-button | — |
| [Frama-C WP](/toolchains/frama-c-wp.md) | 1 Usable | Auto-active | — |
| [CN](/toolchains/cn.md) | 0 Research | Auto-active | — |

## Verify the compiled code

| Toolchain | Stage | Effort | Via |
|---|---|---|---|
| [s2n-bignum](/toolchains/s2n-bignum.md) | 1 Usable | Interactive | C → x86-64 (CompCert, verified) |
| [Alive2](/toolchains/alive2.md) | 1 Usable | Push-button | C → LLVM IR (clang, trusted) |
| [Islaris](/toolchains/islaris.md) | 0 Research | Interactive | C → AArch64 (CompCert, verified) |
| [LNSym](/toolchains/lnsym.md) | 0 Research | Interactive | C → AArch64 (CompCert, verified) |

## Write new verified code that compiles to C

| Toolchain | Stage | Effort | Via |
|---|---|---|---|
| [F* with Low* (KaRaMeL to C)](/toolchains/fstar-lowstar.md) | 2 Production | Auto-active | F* (Low*) → C (KaRaMeL, trusted) |

## Formal semantics
- [Cerberus C semantics](/semantics/cerberus.md): An executable semantics of a large part of ISO C11 that explores all behaviors a small C program may have, including pointer provenance. CN is built on it.
- [CompCert C and Clight semantics](/semantics/compcert-c.md): The formal semantics of C, written in Rocq, that the CompCert compiler is proved correct against. VST proves programs against its Clight part.

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