Skip to content
How it works / Verification

Verification

Markdown

How Atracode checks every compiled program against its native toolchain, bit for bit in output and memory, and what happens when they disagree.

Every program Atracode compiles is built twice: once by Atracode and once by the program’s own native toolchain. Both versions run over a large sweep of inputs, and they must match bit for bit in output and memory. The program is then checked against published test vectors where they exist. Only a program that passes all of this gets verified and a RAVEN hash.

This is called differential verification. It means the claim “this graph does what your code does” is tested against the compiler you already trust.

How a compile is checked

  1. Lower to a SEG. The source is compiled to a Semantic Execution Graph.
  2. Build natively. The same source is built with its reference toolchain, for example rustc for Rust or GnuCOBOL for COBOL.
  3. Sweep inputs. Both versions run over a large set of inputs, often thousands of them.
  4. Compare everything. For each input, the output and the final memory state must be identical, bit for bit. A matching printout with a different value left in memory is a failure.
  5. Check test vectors. Where published test vectors exist, as they do for cryptographic primitives, the program must match them too.

Toolchains

Atracode tests against these native toolchains:

Clang, GCC, rustc, GHC, OCaml, JDK 21, .NET 8, GnuCOBOL, Free Pascal, Go, Zig, Swift, CPython, Node.js, SWI-Prolog and bash.

For SQL, CSS, data formats and hardware description languages, Atracode stands in for the engine itself, and the reference is a relational engine, style resolver, parser or simulator. The exact reference for each language is on its language page.

Results so far

These are the published sweep results for four languages:

Language and toolchainResult
Rust10,809 identity checks
OCaml 4.14.17,639 cases, zero disagreements
COBOL, GnuCOBOL 3.1.24,020 cases, zero disagreements
Pascal, Free Pascal212 fuzzed functions and 87 mutants, zero mismatches

The cryptographic primitives (SHA-256, SHA-512, HMAC-SHA256, AES-128, AES-256, AES-GCM, ChaCha20, Poly1305, X25519, Ed25519 and bignum arithmetic) are each written as ordinary source, compiled like any other program, and checked against both the native compiler and the official test vectors. The security page has the current figures.

What a disagreement means

If the Atracode version and the native version disagree on any input, in output or in memory, the compile fails. You get no hash and no build. A program can’t reach verified with a known difference.

There are two ways this shows up:

  • A refusal before the sweep. If the source depends on something that can’t be reproduced exactly, such as the clock or the network, the compiler refuses at the exact file, line and column. See Refusals.
  • A failed comparison. If the sweep finds an input where the results differ, the compile fails and reports that input with both results.

Either way, nothing approximate gets through. That fail-closed rule is what makes a RAVEN hash meaningful: it names a behavior that has been checked against the original toolchain.

Comparing two of your own programs

The same comparison works between two programs you wrote. atracode verify-equivalence compiles both, in the same language or different ones, and reports whether they are the same behavior. When they differ, you get an input on which they diverge and the output from each, so you can see exactly which case changed. Agents get the same result from the atracode_verify_equivalence MCP tool, as divergence: { input, output_a, output_b }.

Larger plans run more of this. Team & AI Studio includes exhaustive fuzz runs, and Enterprise Scale adds custom input vector generation and provable equivalence audit certificates. See Plans and billing.

Next steps

  • Refusals What the compiler refuses, and how to fix it
  • RAVEN hashes What a verified hash names
  • Languages The reference toolchain for each language
esc

Type to search titles, headings and text.