Bend 0.1 release: Fast CPU/GPU language that blocks AI mistakes with formal proofs
TL;DR
Bend 0.1 launches as a fast, parallel‑ready language that lets AI agents write code while a built‑in proof system blocks any change that violates user‑defined laws.
What Bend claims to deliver
- C‑level performance: native binaries run on a single core at near‑C speed and achieve up to 124× speed‑up on a GPU.
- Proof‑driven safety: the type checker is also a proof checker. Users write laws in
LAWS.bend; any AI‑generated code must produce aPROOF.bendthat the compiler verifies before the change is accepted. - Zero‑effort parallelism: the runtime automatically distributes work across all available CPU cores or GPU threads; no explicit threading or kernel code is required.
- Tooling for agents: a short
AGENTS.mdsnippet tells LLM‑based agents how to invoke Bend (bend guide,bend PROOF.bend, etc.).
Performance numbers (Apple M4 Max)
| Benchmark | 1‑core Bend | 16‑core Bend | GPU Bend |
|---|---|---|---|
| Type‑checking (proof) | 0.38 s (vs. 19.2 s Lean, >5 min Isabelle) | — | — |
| Runtime (Game of Life) | 7.80 s (≈1× C) | 0.65 s (≈12×) | 0.06 s (≈124×) |
| Type‑checking speedup vs. Lean | ≈50× | — | — |
The site shows a single‑core time of 7.8 s, a 16‑core time of 0.65 s, and a GPU time of 0.06 s, demonstrating the claimed scaling.
How "laws" block AI mistakes
- Declare a law in
LAWS.bend(example below) that expresses an invariant the program must never violate. - The AI writes the implementation and a corresponding
PROOF.bend. - Bend’s proof checker validates the proof; if the proof fails, the change is rejected and the AI must retry.
# LAW: no move sequence leads to victory.
law you_cant_win:
for moves: List<Move>
board = replay(start(), moves)
is_won(board) == False{}
If an AI tries to add a rule that lets the player win, the compiler reports a broken law and refuses to merge the code. The process turns a potential bug into a theorem that must be proved before it can exist.
Community feedback – strengths and concerns
svachalek (HN comment) – "Ported a cron‑job; the system worked but required many low‑level arithmetic lemmas (e.g.,
U32.add_comm). Those lemmas are reusable across projects, but the current library lacks them, increasing proof effort."
RomanKornev – "Laws can be edited to fit new features, which defeats their purpose. Some laws must be frozen, otherwise the human remains the bottleneck."
jwpapi – "Unclear how Bend proves all possible move sequences. Large state spaces may be infeasible to exhaustively verify."
tintor – "Interesting business model: a paid agent that updates proofs faster than a human could."
plastic041 – "The repo shows 20 k stars but a single recent commit and very few issues/PRs, raising questions about transparency and long‑term maintenance."
mccoyb – "Bend appears to be a QTT with affine types for GPU‑friendly performance, but it may not match CUDA or Futhark on dense array kernels; its strength lies in balanced recursive ADT workloads."
shantnutiwari – "LLMs may simply ignore or work around laws, requiring robust enforcement mechanisms beyond static proof checking."
These comments highlight practical friction points: the need for a richer standard library of lemmas, governance around immutable laws, and skepticism about the scalability of proof generation for complex domains.
Frequently asked questions from the discussion
- Does the parallel runtime work on Apple‑silicon GPUs? The website advertises CUDA but shows Apple M4 Max numbers; users have asked for clarification.
- How are laws enforced at runtime? The proof is checked at compile‑time; the generated binary contains no runtime guard for the law itself.
- Is Bend compatible with existing ecosystems? Currently a standalone language; integration plans (e.g., Rust‑style macros) are still being discussed.
- What about infinite loops or non‑termination? The language enforces a soft recursion bound (≈2⁴⁸‑1) to guarantee termination, similar to bounded recursion in other proof‑oriented languages.
Getting started
curl -fsSL https://bend-lang.com/install.sh | sh
Add the following snippet to AGENTS.md so LLM agents know how to use Bend:
When using Bend:
- run `bend guide` to learn it
- use `LAWS.bend` to keep important rules
- run `bend PROOF.bend` before committing
- parallelize the code whenever possible
Then simply instruct your agent: "use Bend".
Where to learn more
- Guide – full language spec (
bend guideprints the GitHubGUIDE.md). - BendTT – paper on the affine dependent type theory at
paper/BendTT.pdf. - BendRT – paper describing the parallel runtime for CPUs and GPUs at
paper/BendRT.pdf. - GitHub repo – https://github.com/bendlang/bend (issues are the primary feedback channel).
Outlook
Bend 0.1 demonstrates that a language can combine native‑speed compilation, automatic CPU/GPU parallelism, and a proof‑based guard against AI‑generated bugs. The community’s early reactions praise the performance and novelty while flagging practical hurdles: a richer lemma library, transparent project governance, and robust enforcement when LLMs try to sidestep declared laws. As the project matures, its impact will hinge on how well it integrates with existing codebases and whether the proof workflow scales to real‑world, large‑state systems.
Sources
Related
- Dispatch
- Dispatch
- Project
- Project
- Dispatch