AdaCore: Build Software that Matters
I Stock 867200466 1
Nov 26, 2026

No One Should Trust AI to Write Their Code

That's why GNAT Foundry proves every line.

A steel box and a crane

In the 1950s, loading a cargo ship was slow, manual work. Longshoremen moved loose cargo by hand, piece by piece, into the hold. It cost about $5.86 per ton, and a work gang moved fewer than 2 tons per hour. Ships spent half their working lives idle in port, waiting on crews of 20 or more per hold.

Then Malcolm McLean and Keith Tantlinger rewrote the economics of global shipping.

They did not invent a new ship or a new engine. They paired two ordinary things, a steel box and a crane, and standardized them so every piece of the system fit every other piece. Loading cost fell from $5.86 per ton to roughly $0.16 per ton, a drop of more than 95%. Productivity rose to about 30 tons per hour. Ships turned around in hours instead of days, and a single crane operator replaced dozens of men wrestling cargo.

The crane alone did not do this. A crane swinging loose cargo is just a faster way to drop things. The box standard is what made speed safe.

Speed is not the problem. Trust is.

Let's be blunt: no organization building high-integrity software, whether in aerospace, defense, automotive, rail, medical devices, energy, or industrial control, is going to let AI write safety-critical code and ship it on faith. AI is fast, but it is not accountable. It hallucinates. It writes code that looks right, compiles cleanly, and fails at the edge case nobody tested. It cannot explain which requirement a line of code satisfies. And no certification authority will accept "the model wrote it" as evidence under DO-178C (avionics), ISO 26262 (automotive), EN 50128 (rail), IEC 62304 (medical), IEC 61508 (industrial), or any other safety or security standard.

So the question is not whether AI can write code faster. It can. The question is what makes its output trustworthy enough to deploy where failure is not an option. The answer is the same one McLean found: you do not trust the crane; you trust the standard. One box size and one corner-fitting force every crane to set the box correctly, and because every crane, ship, and truck is built to the same dimensions, speed and accuracy come together. GNAT Foundry does not ask anyone to trust AI. It forces correctness through mathematics and ties every line back to a requirement, so the AI never has the final word.

High-integrity software is still loading loose cargo

At human speed, people consume a large share of every high-integrity software budget, in every industry where a software failure can cost lives, money, or a mission. Specialized engineers still hand-code logic, write individual test harnesses one at a time, and spend hundreds of hours updating requirements traceability matrices to prove compliance for audits.

Much of that cost is not writing the software. It is the verification tax: the tests, the evidence of coverage, and the manual tracing needed to prove the software does what the requirements say. That tax is where the dockworkers are.

GNAT Foundry: AI synthesizes, math proves

GNAT Foundry is the standardized shipping container for high-integrity software. Like the box and the crane, it is not one new invention. It is a demonstration that combines two proven technologies into a single standard pipeline: AI for productivity and formal mathematical proof for accuracy.

The crane: AI synthesis

AI does the heavy lifting. It moves large amounts of logic in seconds and removes the manual labor of drafting code, contracts, and test scaffolding.

The steel box: SPARK and formal proof

AI, on its own, is unpredictable, so Foundry never lets it operate outside the box. Code is generated in SPARK, a mathematically analyzable subset of Ada. The GNATprove engine uses SMT solvers to prove that the code matches its contracts and is free of run-time errors before it is ever compiled. If the proof fails, the code does not move forward. Correctness is enforced, not assumed.

The pipeline, stage by stage

  1. Requirements. AI reads the High-Level Requirements and writes Low-Level Requirements.
  2. Coding. AI writes SPARK source code and tags every unit with its requirement trace IDs.
  3. Contracts. AI drafts formal SPARK contracts.
    • Math guardrail: GNATprove proves or rejects the AI's logic and forces automated repairs.
  4. Testing. AI drafts executable GNATtest harnesses.
    • Math guardrail: GNATcoverage measures object-level coverage, and the AI loops until 100% MC/DC is met.

The automated repair loop

Because the fit between AI and SPARK contracts is standardized, engineers do not have to manually fix the AI's mistakes. When a proof fails, or coverage falls short, Foundry sends the AI back to correct its own work, and it repeats until the math accepts it. The AI proposes. The math decides.

Human Accountability

There is still a very important task for the human engineer: reviewing the contracts. Not necessarily all of them, but the important ones. The ones that are important for safety, the ones that define the high-level behavior of the system. A human engineer reviews the high-level requirements, traces them, and reviews the contracts. The math then ensures that they are enforced; the enforcement itself does not need review. Reviewing contracts is significantly less laborious and more scalable than reviewing source code. The human engineer retains accountability for the software, much like the crane operator ensures that the containers are stacked correctly.

Every line traced to a requirement

Proof answers "is the code correct?" Traceability answers "correct against what?" Foundry forces both.

Every unit of generated code carries the trace ID of the requirement it implements, from the high-level requirement through the LLR to the source, the contract, the test, and the compiled binary. Code with no requirement behind it has no place in the pipeline. Foundry then automatically generates the Bidirectional Traceability Report and the MC/DC Coverage Report, so the evidence auditors ask for is produced with the code rather than reconstructed afterward.

No manual matrix updates. No orphan code. An unbroken chain an auditor can follow in either direction.

The result

  • AI eliminates the verification tax: test writing, coverage chasing, and manual tracing.
  • Math eliminates AI hallucinations: a strict compiler plus theorem proving reject anything that is not provably correct.
  • Code is automatically tied back to requirements: no manual matrix updates.

The container did not make shipping faster by trusting crane operators to be careful. It made the system rigid enough that speed became safe. GNAT Foundry does the same for high-integrity software, in every industry that depends on it. Organizations achieve AI productivity without ever having to trust it, because every line is proven correct and traced back to a requirement before it ships.

Explore our GNAT Foundry Page here.

FAQs

Not on trust alone. Standards such as DO-178C, ISO 26262, EN 50128, IEC 62304, and IEC 61508 require evidence that software meets its requirements, and "the model wrote it" is not evidence. GNAT Foundry explores a different approach: AI drafts the code, but formal proof, coverage analysis, and requirements traceability determine whether it moves forward. Certification still depends on the full development process and the relevant authority.

AI generates code in SPARK, a mathematically analyzable subset of Ada, along with formal contracts and test harnesses. GNATprove uses SMT solvers to check that the code matches its contracts and is free of run-time errors. GNATcoverage measures structural coverage, targeting 100% MC/DC. When a proof fails, or coverage falls short, the AI is sent back to revise its work until the checks pass.

Engineers remain accountable for the software. They review the high-level requirements and the contracts that define safety-relevant system behavior, and formal proof then checks that the code enforces those contracts. Reviewing contracts is typically less laborious than reviewing every line of generated source code, thereby making human oversight more scalable.

Author

David Voynow

Unnamed 2
Strategic Account Manager
Blog_

Latest Blog Posts