Bend
A functional programming language for parallel computing with dependent types and formal proofs.
A functional programming language for parallel computing with dependent types and formal proofs.
An independent study of Bend, a programming language developed by HigherOrderCO.
This study covers the language and its current ecosystem, particularly Bend 2. It assumes neither an adoption plan nor integration with another repository. Bend 1 and HVM are distinct technologies: according to the project’s README, Bend 1 programs are not compatible with Bend 2.
The repository presents Bend as a high-level language for massively parallel computation. It uses a functional, affine style and allows parallelism to be expressed by recursively decomposing tasks rather than explicitly managing threads and locks. The documentation announces C, Metal, CUDA, and JavaScript targets; the performance and actual coverage of each target remain to be independently evaluated.
The repository also describes a dependent type system and “laws” (law) accompanied by proofs checked by the compiler. These capabilities do not mean every component is formally verified: the README warns, among other things, that the current checker may contain bugs, that the --verdict proof kernel is verified but the analysis and translation feeding it are not fully verified, and that backends may diverge.
Bend is first and foremost a programming language: it is used to write programs, including parallel computations suited to CPUs or GPUs. It is neither an AI model nor, by itself, an agent framework. The guide also describes I/O, file, and network effects; the practical relevance of these uses depends on the maturity of libraries and targets.
The project’s stated positioning makes the connection to AI explicit: laws (law) and their proofs are proposed as a way to formalize invariants that a programming agent could follow and have checked. This is potential support for AI-assisted development, not a general guarantee that a program or agent is bug-free. Trust depends, among other things, on the checker, the translation to the proof kernel, and the backends; the limitations described above apply.
In practice, Bend seems most relevant to explore for tasks where parallelism or property verification is central and the limitations of a young language are acceptable. For general application development or building/orchestrating AI agents, the consulted repository does not establish that Bend is an appropriate choice.
This distinction is based on the official guide, consulted on November 9, 2026. The described use cases reflect the project’s positioning, not independent validation of its performance or guarantees.
Bend is worth examining for parallelism expressed at the language level and integration of proofs of properties. However, the project describes itself as young and lists significant limitations: a small standard library, lack of several common features, a checker and compiler that need auditing, sometimes slow native compilation, and limited debugging tools. Performance and safety claims should be treated as claims by the project until reproduced and the trust chain examined.
No installation, compilation, program execution, or benchmark reproduction was performed for this initial note.
The official README illustrates an arithmetic law stating that adding zero does not change a natural number, along with a proof by cases and induction:
import Base
law add_zero:
for x: Nat
{Nat.add(x, 0n) == x : Nat}
def add_zero(x):
match x:
case 0n:
{==}
case 1n+xp:
%add_zero(xp) : {1n+Nat.add(xp, 0n) == 1n+_ : Nat}
{==}
The law declaration states a universal property (for x: Nat). The function with the same name provides the proof: a base case for zero, then an inductive case that reuses the proof for xp and rewrites the expression. Here, the _ symbol denotes the part to be filled by rewriting, according to the syntax illustrated by the project. This example is reproduced from the documentation; it was not compiled for this study.
The official README illustrates a game in which the law requires that no sequence of moves leads to a win:
law you_cant_win:
for moves: List<Game.Move>
board = Game.replay(Game.start(), moves)
{Game.is_won(board) == False{} : Bool}
Scenario described by the project: an agent is asked to make the board wrap around its edges. It modifies the game and provides a proof for you_cant_win. If its modification really allows a win, proof of that law fails and verification blocks the change. This is the mechanism claimed by the project; the scenario and example were not independently run for this study.
The law proves only the stated property: it does not guarantee that the rule correctly represents product intent or that the program has no other defects. A poorly specified law can be proved without protecting the intended behavior.
A realistic scope for a prototype: a React shopping cart with the business rule “the billed total must never exceed the subtotal.” An agent could change the interface and discount logic; a Bend law could formalize this property over a pure cart model and calculation function, and its proof file could be checked in CI. React tests would continue to check the interface and interactions.
This is not a demonstrated, ready-to-use integration: the model and calculation would need to be written in Bend, then a way to connect them to the TypeScript code and CI established. The law would not automatically prove the React/TypeScript implementation itself. This possible architecture remains a hypothesis to prototype; the consulted sources do not document a turnkey React integration.
Add dated findings as evidence is gathered. Distinguish observed behavior from project claims and hypotheses.