Bend is a new programming language designed to bridge the gap between human intent and AI-generated code through formal verification and high-performance execution. Utilizing an affine dependent type theory known as BendTT, the language integrates a type checker that functions as a proof checker, similar to Lean or Rocq, but optimized for speed to allow real-time verification by AI agents. Developers can define invariant constraints within "LAWS.bend" files, which the compiler uses to mathematically ensure that no code changes violate specified logic. To facilitate high-speed execution, Bend employs a parallel runtime called BendRT that targets both CPUs and GPUs. On a single core, the language achieves performance comparable to C, while its built-in parallelism allows code to scale across sixteen CPU cores or up to 4,096 GPU cores, potentially yielding speedups of up to 100x. The language abstracts away the complexities of manual concurrency, eliminating the need for developers to manage threads, locks, or custom CUDA kernels. Instead, Bend automatically splits and joins workloads across available hardware, making it an ideal tool for post-AGI workflows where AI agents require an unambiguous, verifiable framework to implement complex instructions without introducing logical regressions.

Read original