Agents

Bend Language Uses Proofs to Prevent AI Coding Errors

The new Bend programming language combines Python-like syntax with mathematical proofs to prevent AI agents from introducing bugs into software while maintaining high-speed performance.

Hacker News2 days agoAgents
Illustration generated for this story

Developers have introduced Bend, a new programming language designed to prevent AI-generated coding errors through mathematical verification. Featuring a Python-like syntax, Bend compiles directly to native code and runs on both CPUs and GPUs. The language aims to solve a growing problem in the AI era: ensuring that code generated by automated agents is safe and correct, even when humans are no longer reading or writing it themselves.

On a single CPU core, Bend performs nearly as fast as C. However, its compiler can automatically scale execution across 16 cores or onto a GPU, achieving speeds up to 100 times faster than a single core without requiring developers to write threads, locks, or custom GPU kernels. During demonstrations, the language successfully distributed workloads across 4,096 GPU cores by automatically splitting and joining tasks.

Unlike traditional languages, Bend integrates a type checker that functions as a rapid proof checker, drawing inspiration from systems like Lean and Rocq. While those older systems can take minutes to verify a mid-sized codebase, Bend completes its checks in under a second. This rapid feedback loop allows AI agents to verify their work after every single code modification. Developers can declare strict rules in a dedicated file called LAWS.bend, making it mathematically impossible for an AI to ship code that violates those parameters.

The language is built on two core academic foundations: BendTT, an affine dependent type theory that serves as its core, and BendRT, a parallel runtime virtual machine for CPUs and GPUs. Currently, Bend is in its early stages of evolution and works best for back-end development on Linux and macOS operating systems.

This is our own summary of reporting by Hacker News

More in Agents