AI in Industry
Oct 29, 2026

Provably Correct AI Code Translation: How Code Metal Does It

Code Metal president Ryan Aytay on why AI-generated code isn't safe enough for mission-critical hardware, and how formal methods prove translated code works.

Code Metal makes AI-translated code provably correct by checking it with formal methods, meaning mathematical proofs, test generation and fuzzing, before it runs on real hardware. That was the pitch from Ryan Aytay, president and COO of Code Metal, on Episode 48 of Built This Week. Ryan joined Code Metal about five and a half months before the episode, after running Tableau as CEO and spending roughly fifteen years at Salesforce.

What does Code Metal do with formal methods?

Sam described Code Metal as a company that translates code from one language to another in a way large institutions can trust. Ryan Aytay put it as lowering the barrier "from code to metal," from software to hardware. That is where the name comes from. The goal is to take code from any source and run it on any hardware, while proving it has the same intent and behavior and is optimized for the new target.

Ryan says "provably correct" are the two words he likes to use, because for Code Metal's customers it has to work. He pointed out that almost everything we depend on runs on code: the military, cars, aerospace, the power grid, medical devices like MRI machines. A lot of that code is legacy, written years ago and hard to change. Translating old code safely to new production systems is slow, costly and still has to be tested on the hardware it will run on. You can learn more at codemetal.ai.

Watch this part at 2:39

Ryan Aytay, president and COO of Code Metal, on Built This Week episode 48
Ryan Aytay explains how Code Metal uses formal methods to make sure translated code keeps the same intent on any hardware.
Watch Ryan Aytay on why AI code isn

Watch Ryan Aytay on why AI code isn't safe for mission-critical systems in Episode 48 (starts at 5:49) · Episode 48 notes and transcript

Why isn't AI-generated code safe enough for mission-critical systems?

Ryan says Code Metal does "the work of consequence," where failure is catastrophic. His example was the CrowdStrike incident, which took down a lot of air traffic control and many flights. He described it as one line of code that broke, and not even a hard problem, just a mistake.

He is a fan of code generation tools. He named Claude Code and Codex and said "we love them all." Vibe coding a time and expense app is great, and fast. The line he draws is at the edge, meaning the hardware side of things.

But the reality is, like, in a production world, AI generated code actually isn't quite safe enough and really never will be for what we'll call a mission critical system at the edge.

— Ryan Aytay, Episode 48

We covered a related problem from the security side in Episode 28, on why you can't pen test an airplane. More on that sector is on our AI in aviation page.

Watch this part at 5:49

How does Code Metal verify that translated code will work?

The gap, Ryan says, is that AI-generated code is mostly correct. You can ask an AI platform whether it did the job accurately and the answer is "pretty much." For a mission-critical system it must be perfect. It has to cover every requirement, test every possible issue, security scenario and hardware assumption, and then be physically tested.

So Code Metal does three things: it translates, verifies and optimizes. Ryan briefly showed an unreleased view of the company's own platform, code in and code out, along with its test generation suite. The formal methods work includes testing and fuzzing, with the aim of looking back at the intent, behavior and origin of the original code and proving the new version matches it and will run on the target hardware. He compared it to changing the electrical system of a city without the lights going out.

So we have this belief, right, where, generating code actually, the price is going down. It doesn't really cost anything, but if you get it wrong, it's pretty substantial.

— Ryan Aytay, Episode 48

Jordan said he has spent his career building web SaaS and mobile apps partly to stay away from software where human life is on the line. He added that many legacy systems are written in languages few engineers know anymore, and without AI they probably would never be rewritten.

Watch this part at 7:20

Code Metal slide: translate, verify and optimize production-ready code, shown on Built This Week episode 48
Ryan Aytay explains why Code Metal translates, verifies and optimizes code instead of only generating it.

How does Code Metal support military modeling and simulation?

Ryan was careful about details, but said Code Metal is trusted by the Air Force. In defense there are data silos built up over years, old data and new data. For modeling and simulation, essentially war gaming what happens if one scenario follows another, that data has to be brought together.

Code Metal worked closely with the military to build a platform that pulls those data silos together, applies its code translation, modernization and integration, and runs a simulation engine on top. Ryan says the same idea applies outside defense, to logistics or even an F1 team, but none of it works well unless the data is translated and brought into one experience. Our AI in government page collects other episodes on public sector work.

Watch this part at 11:16

Can Code Metal translate C++ to Rust for defense hardware?

The second use case is modernization for defense companies. Ryan described companies that make software defined radios, surveillance equipment or critical communications gear for the field. Much of it is built on legacy C++ that is not memory safe, could be exposed to bad actors, and may not run at the performance customers want.

Ryan says Code Metal can modernize a million lines of C++ to Rust quickly and efficiently, and guarantee it will work on the device that needs it. Some translations are harder than others: he called C++ to Rust slightly easier than something like MATLAB to VHDL. To back the guarantee, Code Metal has built a research team in formal methods, verification and validation, with people from places like NASA, Stanford and AWS. He sums up the company's focus as safety and trust.

Watch this part at 13:46

Ryan Aytay, Code Metal president and former Tableau CEO, on Built This Week episode 48
Ryan Aytay describes modernizing legacy C++ in defense equipment to memory-safe Rust with a guarantee it runs on the device.

How was Code Metal founded?

CEO and founder Peter Morales started his career at MIT Lincoln Lab and worked on the F-35 and simulation environments, among other roles. His original thesis was how to make hardware as programmable as software. He formed Code Metal about two years before the episode with cofounder Alex.

Ryan says the need goes beyond war gaming to automotive, medical devices and financial systems, where a lot of systems have become fragile over time. You can't just hand them to an AI platform and assume it will fix them, because these tools sometimes hallucinate. Jordan said he was impressed by how much progress the company has made in industries that historically move slowly.

Watch this part at 16:19

Are Meta's cheaper smart glasses a better bet than Snap's?

In the news segment Sam compared Meta's new glasses, which appear to cost $200 to $300, with Snap's, which he said are very thick and about $2,000. Ryan owned an early pair of Meta Ray-Bans and likes not having to look down at his phone, though he acknowledged privacy concerns and welcomed more competition. Jordan still finds the camera a little creepy, but pointed to Meta giving glasses to veterans with vision problems and to uses like reading a menu. Sam also raised Meta's prediction market plans, a topic we built around in Episode 26.

Watch this part at 19:12

Watch the full episode

Ryan walks through Code Metal's slides and the test generation suite on camera. Watch Episode 48 of Built This Week, where the full transcript is also on the page, or read more about Ryan Aytay.

New episode every week

Watch us build with AI, live.

Real builds, founder interviews and the AI news that matters. Join 43K+ builders on YouTube.

▶ Subscribe on YouTubeBrowse all episodes →

Related Blog