Skip to content
CAI
Software that uses CAICheck a score

HigherOrderCO/Bend

46.9

Weak · 14 November 2026

25.3k

lines of production code

TypeScript

with C, JavaScript

7

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Features

Added ten new formal verification evals across five difficulty tiers

The evals directory now includes ten new proof-size evaluation files, with two added to each of the easy, firm, and hard tiers (cake, easy, firm, hard). These new tests cover diverse verification scenarios including memory allocation (arena carving), UI theme mirroring, queue prefix trimming, inventory tree pruning, streaming bytecode bijection, stack splitting and merging, timeline phase splicing, looper cue cancellation, pomodoro tallying, and tic-tac-toe undo/redo logic. Each file defines a specific property or law alongside a constructive solution, expanding the benchmark's coverage of formal reasoning capabilities.

evals · high confidence

Introduce Bend 2 formatting language server

A new formatting-only language server (\bend2-fmt-lsp\) is added for the Bend 2 language, supporting full-document formatting over stdio for files with the \bend\ or \bend2\ language ID. The server normalizes indentation and safe token spacing while intentionally preserving line breaks, blank lines, comments, literal spelling, mixed line endings, and the final-newline state. It specifically maintains column-sensitive layouts, such as keeping nested match arms with their match block and preserving inline body alignment after operators, semicolons, and tuple commas. Editor integration is provided for Neovim (via \nvim-lspconfig\), Helix, and Emacs (via Eglot).

tools/bend-fmt-lsp · high confidence

Introduce bend-lint static analysis tool

Adds the bend-lint tool, a new static analysis utility for Bend source files. The implementation includes the core linting engine (lint.ts) which integrates with the bend2 compiler via a patching layer (seam.ts) to extract type and usage facts, and a comprehensive test suite (lint.test.ts) to validate rule behavior and integration.

tools/bend-lint/src · high confidence

Introduce bend-lint tool with file-length and formatting rules

The \bend-lint\ tool is added to the repository, providing a new static analysis capability for Bend source files. This location introduces the core rule implementations and their tests, specifically a \style/file-length\ rule that warns when a file exceeds a configurable line count (defaulting to 500 lines) and a \format/layout\ rule that enforces consistent indentation, spacing, and line wrapping. The implementation includes shared utilities for line counting and source root detection, along with comprehensive test coverage for the new linting logic.

tools/bend-lint/rules · high confidence

Introduce bend-lint tool with rule API and sample rule

Adds the bend-lint tool, providing a new linting framework for Bend programs. This includes a rule contract defined in \lint.bend\ that allows rules to inspect sources, options, and AST facts (terms, nodes, types) via IO effects, and report diagnostics with fixes. The JavaScript implementation in \effects.js\ bridges the Bend runtime to the host linter, handling data serialization and host communication. A sample rule (\sample.bend\) is included to demonstrate usage.

tools/bend-lint/src/bend · high confidence

New gate infrastructure for automated testing and verification

The repository introduces a new automated testing and verification system consisting of four distinct gates: \repo\ (structure and token limits), \test\ (functional correctness across C, JS, and interpreter lanes), \perf\ (performance benchmarks against hardware-specific pins), and \ping\ (installer, launcher, and hub integration). This system is orchestrated by \\_run.ts\, which executes the gates in parallel with a strict 30-second cap, and relies on \\_lib.ts\ for shared utilities including SSH-based cluster execution, job pooling across 48 mini-computers, and robust session management. Also in this area: 1 commit (0 fixes) modifying gates; Refuse publishing files outside the entry directory and handle native memory faults; Performance gate adopts precise timing and multi-run pinning.

gates · medium confidence · unverified

Removals

Removal of the legacy file loader module

The \src/loader/mod.rs\ module, which previously handled reading files and parsing them into a definition book using the \ariadne\ library for error reporting, has been removed from the codebase. This change eliminates the specific file-loading and error-display logic that was previously implemented in this location.

src/loader · high confidence

Removal of the legacy hvm-lang parser and lexer

The \src/parser\ directory, which previously contained the \lexer.rs\, \parser.rs\, and \mod.rs\ files for the hvm-lang language, has been completely removed. This deletes the custom implementation that used the \logos\ and \chumsky\ crates to tokenize and parse hvm-lang source code into an AST. Users relying on this specific parser module for hvm-lang syntax will no longer have access to it in this location, as the code has been stripped from the repository.

src/parser · high confidence

Removed legacy src/main.rs entry point

The original \src/main.rs\ file, which served as the initial CLI entry point for loading and printing AST books, has been deleted. This removal reflects the project's transition to a more comprehensive CLI structure (managed in other parts of the codebase) that supports multiple commands, modes, and configuration options, replacing the simple single-file argument parser with a more robust implementation.

src · high confidence

Removed stub hvm-core compilation function

The \src/to\_core/mod.rs\ file, which previously contained a stub \book\_to\_hvm\_core\ function, has been removed. This eliminates the placeholder implementation for converting the AST definition book to the hvm-core format, reflecting the ongoing reorganization and migration to the new hvm repository structure.

_src/to\core · high confidence

Behavioural changes

1 commit (0 fixes) modifying tools/bend-cache

A change to existing behaviour in tools/bend-cache — 1 commit, 4 files: “feat(tools): bend-cache, a proof cache for --check-only outside bend (\#2045)” (refs \#2045).

tools/bend-cache · medium confidence · unverified

10 commits (5 fixes) modifying demos/app\_slash\_boss\_3d

A change to existing behaviour in demos/app\_slash\_boss\_3d — 10 commits (5 fixs), 6 files: “feat(window): emit native text input events (\#1441)”; “An operator takes its type from the ( .. : T) around its own expression, and from nothing else”; “Pointer events: one Press for the mouse, a finger or a pen (\#1867)”; and 7 more (refs \#1441, \#1867, \#2039, \#2101, \#2100, …).

_demos/app\_slash\_boss\3d · medium confidence · unverified

102 commits (41 fixes) modifying bend2/effs

A change to existing behaviour in bend2/effs — 102 commits (41 fixs), 65 files: “Process.run runs a program with literal arguments, bounded output and a timeout (\#1030)”; “feat(window): emit native text input events (\#1441)”; “fix(io): an interrupted File.read\_line no longer reads a byte before its buffer (\#1918)”; and 99 more (refs \#1030, \#1441, \#1918, \#1900, \#1054, …).

bend2/effs · medium confidence · unverified

3 commits (0 fixes) modifying demos/app\_pong\_game\_2d, demos/app\_ray\_tracer\_3d

A change to existing behaviour in demos/app\_pong\_game\_2d, demos/app\_ray\_tracer\_3d — 3 commits, 6 files: “Pong, Triangle and Fly demos get general laws with real proofs”; “Simplify the three app demos to their canonical programs with 2-3 general laws each”; “Three app demos renamed and given laws with proofs: demos/pong\_game -\> demos/app\_pong\_game\_2d, demos/hello\_triangle -\> demos/app\_triangle\_2d, demos/ray\_tracer -\> demos/app\_ray\_tracer\_3d; each main.bend keeps its program (only the run line in its header names the new path) and gains a LAWS.bend (imports and law blocks only) and a PROOF.bend that fills every law, checked with \bun bend2/main.ts demos/\<name\>/PROOF.bend\ -\> All terms check. Every claim closes by evaluation: U32 is Base's Word(32n) model, so the checker computes the games' words; the claims about an arbitrary state open the record with a match first. app\_pong\_game\_2d (5 laws): quits (for any state, Pong.key on Esc down and Pong.event on Close give None); paddle\_field (Pong.clamp of a wrapped position is 0 for any y; the left paddle at 0 with W held stays 0, at 416 with S held stays 416, and with no key stays 208); bounce (Pong.bounce off a miss keeps any v; on a hit 3 becomes 4294967293 and a second hit restores 3); ball\_orange (for any paddle tests, a cell touching the ball is code 1n and paints 16763904); first\_step (Pong.step(Pong.init()) is Pong{208, 208, 0, 255, 255, 3, 3}). app\_triangle\_2d (4 laws): click\_inside (a mouse-down at the centroid (256, 320) gives n + 1 for any n); click\_outside (a mouse event at (0, 0) with any down flag, and a mouse-up at any point, give n); quits (Key{27, down} and Close give None for any n); code\_off\_strip (for any strip tests, a cell inside is 1n, beyond an edge 0n, neither 3n). app\_ray\_tracer\_3d (4 laws): quits (Fly.key on Esc down and Fly.event on Close give None for any state); held\_word (pressing W on 0 sets bit 1; pressing and releasing W on 64 restores 64; Esc has no mask); fps\_counter (for any position, angles and held word, Fly.clock at 999 ms adds a frame and keeps the count, at 1000 ms makes 7 frames the count 8, restarts at 0 and moves t0); fps\_digits (for any d the blank glyph is 0; 7 shows blank, blank, 7; 123 shows 1, 2, 3). Every main.bend still emits C (-o /tmp/\<name\>.c). ttok: pong LAWS 665, PROOF 198, main 2398; triangle LAWS 549, PROOF 183, main 1509; ray LAWS 803, PROOF 225, main 4478”.

_demos/app\_pong\_game\_2d, demos/app\_ray\_tracer\3d · medium confidence · unverified

3 commits (0 fixes) modifying demos/pure\_hvm5\_mini

A change to existing behaviour in demos/pure\_hvm5\_mini — 3 commits, 3 files: “Three demos renamed and put under laws: winning\_is\_impossible -\> app\_win\_is\_bug\_2d, slash\_bros\_3d -\> app\_slash\_bros\_3d, hvm5\_interp -\> pure\_hvm5\_mini”; “docs(demos): the sort and printer law comments state only what their laws prove (\#1321)”; “Echo, HVM5 and Slash Bros demos get general laws with real proofs” (refs \#1321).

_demos/pure\_hvm5\mini · medium confidence · unverified

3 commits (1 fix) modifying demos/proof\_typed\_eval

A change to existing behaviour in demos/proof\_typed\_eval — 3 commits (1 fix), 3 files: “Simplify the three proof demos to their canonical programs and 2-5 general laws”; “Typed eval and insertion sort demos get completeness, idempotence, fixed-point and minimum laws”; “New proof demo demos/proof\_typed\_eval: an intrinsically-typed expression language whose evaluator cannot go wrong, with a constant folder proven to keep the meaning of every program. main.bend: Ty (TNum, TBool) is the object language's types; Val(t) their meaning (Nat, Bool) by recursion; Expr\<-t: Ty\> the well-typed programs by the Ford trick (Num, Bit, Add and IsZero carry an equation {TNum{}/TBool{} == t : Ty}; If's branches share the index t); cast(s, u, eq, v) moves a Val(s) to Val(u), matching both types so the agreeing arms compute to v and only the two clash arms transport along their impossible equation; eval.go(-t, e, +u, +w) is the worker (the index t is erased so the recursion is structural on e alone, since the descent check reads live columns left to right and If's condition evaluates at TBool from any t; u is a live copy of t and w : {t == u} ties them, Equal.trans joins w with the Ford field for cast); eval(t, e) is eval.go(t, e, t, {==}); pick is the meaning of If; fold\_add, fold\_zero and fold\_if fold a node whose subterms are literals and rebuild it otherwise (variable-pattern rows); opt folds every subterm then the node above it (its Add and IsZero arms rewrite the goal index by the Ford field). sample() is if iszero (0 + 0) then 10 else 20, plus 3; main prints eval(TNum{}, sample()) = 13n. LAWS.bend (imports, comments and law blocks only): opt\_sound, for every object type t and program e of it, eval(t, opt(t, e)) == eval(t, e) at Val(t); opt\_folds\_add, for every x y, opt of Add{Num{x}, Num{y}} is Num{x + y}; opt\_picks\_then, for every t and branches a b, opt of If{Bit{True}, a, b} is opt(a); sample\_value, eval(TNum{}, sample()) == 13n. PROOF.bend fills all four: the closed and shape laws by conversion; opt\_sound by induction on e, where the literal cases close by conversion, the Add and IsZero cases first rewrite the Ford equation and its index to a literal type and {==} through the J form %E@eq : P (so opt and eval compute), then rewrite the induction hypotheses of the subterms into the goal and end on a folder lemma; the If case rewrites the three hypotheses under pick and ends on fold\_if\_sound. The folder lemmas (fold\_add\_sound, fold\_zero\_sound, fold\_if\_sound) open the folded subterm exhaustively: the literal arm computes on both sides and every other arm rebuilds the node, so each leaf is {==} (9, 5 and 6 leaves). No @unsafe, no ?TODO, no axioms. Verified: PROOF.bend prints All terms check.; LAWS.bend prints 4 TODOs found.; main.bend prints 13n and emits C (-o /tmp/proof\_typed\_eval.c); grep for def/type/@ at the top level of LAWS.bend is empty. ttok: main 1490, LAWS 394, PROOF 1420 (caps 30000)”.

_demos/proof\_typed\eval · medium confidence · unverified

3 commits (1 fix) modifying demos/pure\_par\_sort

A change to existing behaviour in demos/pure\_par\_sort — 3 commits (1 fix), 4 files: “docs(demos): the sort and printer law comments state only what their laws prove (\#1321)”; “fix(demos): keep the sort and sum specs outside the editable programs (\#1932)”; “Simplify the two pure parallel demos” (refs \#1321, \#1932).

_demos/pure\_par\sort · medium confidence · unverified

4 commits (1 fix) modifying demos/pure\_par\_sum

A change to existing behaviour in demos/pure\_par\_sum — 4 commits (1 fix), 4 files: “Two pure parallel demos with laws and proofs: demos/pure\_par\_sum and demos/pure\_par\_queens. pure\_par\_sum is the smallest fork/join program: sum(d, i) adds the 2^d numbers from i as a balanced tree (a leaf is its number; a node forks its halves with the parallel let and adds them); main is sum!(16n, 0) = 2147450880. Its laws: sum\_leaf (for +i, sum(0n, i) == i), sum\_split (for +d, +i: sum(1n+d, i) == sum(d, i) + sum(d, i + 2^d), the fork/join equals its halves added) and sum\_span (sum(4n, 0) == 120 and sum(3n, 5) == 5 + 6 + .. + 12), each closed by evaluation. pure\_par\_queens counts N-queens in two phases: fork spreads the 2^(k\*w) prefix indices (k = min(n, 4) rows of w bits each, k by saturating Nat.sub) as a balanced fork tree; prefix decodes a leaf's index one row at a time, a column beyond the board or under attack ends the leaf with 0; solve is the bitmask backtracker (cols, ld, rd attack words; free = full & \~(cols \| ld \| rd); peel b = cand & -cand, descend on the child words, go on with cand - b), one def with a Nat fuel (left + 1)^2 ahead of every self-call since the sibling word is no structure the checker sees; every decision Bool is computed by the caller (a match takes only a parameter) and the shrinking column comes first (the descent judgment reads the columns left to right). main is queens!(8n, 3n) = 92; compiled, queens!(12n, 4n) = 14200, queens!(14n, 4n) = 365596, queens!(15n, 4n) = 2279184 (0.86 s on one core, 0.10 s on 16 with --gpu off). Its laws: fork\_split (for any d, i, k, w, left, full: fork(1n+d, ..) == fork(d, i, ..) + fork(d, i + 2^d, ..)), solve\_ends (a row with no free column keeps acc; a board with no row left gives acc + 1, for any words and flag), counts (the boards 1..6 give 1, 0, 0, 2, 10, 4) and width (queens(4n, 3n) == queens(4n, 2n): a wider fork space counts the same), each closed by evaluation. Both mains call with \!\: the compiled runtime runs a program with no bang on one thread (io\_loop's seq = !BANGS; measured 1.48 s at 1 and at 16 threads on a 1.6G-step tree), while a bang spreads over the GPU or, with --gpu off, every core (0.135 s, 11x); the headers give the run lines (./x for the GPU or every core, ./x --gpu off for every core, --threads 1 for one core). Verified: both PROOF.bend print All terms check (queens in 13 s: the 4096-leaf boards cost the checker \~4 s each), LAWS.bend print 3 and 4 TODOs found, the interpreter and the --gpu off binaries agree (2147450880 in 13.4 s / 0.02 s; 92 in 7.2 s / 0.02 s). ttok: sum main 365, LAWS 407, PROOF 124; queens main 1735, LAWS 757, PROOF 186 (caps 30000)”; “fix(demos): keep the sort and sum specs outside the editable programs (\#1932)”; “Simplify the two pure parallel demos”; and 1 more (refs \#1932).

_demos/pure\_par\sum · medium confidence · unverified

4 commits (2 fixes) modifying demos/proof\_insertion\_sort

A change to existing behaviour in demos/proof\_insertion\_sort — 4 commits (2 fixs), 4 files: “Simplify the three proof demos to their canonical programs and 2-5 general laws”; “Typed eval and insertion sort demos get completeness, idempotence, fixed-point and minimum laws”; “fix(demos): keep the sort and sum specs outside the editable programs (\#1932)”; and 1 more (refs \#1932).

_demos/proof\_insertion\sort · medium confidence · unverified

5 commits (0 fixes) modifying demos/proof\_numerics

A change to existing behaviour in demos/proof\_numerics — 5 commits, 3 files: “Simplify the three proof demos to their canonical programs and 2-5 general laws”; “An operator takes its type from the ( .. : T) around its own expression, and from nothing else”; “Two proof demos, each split into main.bend, LAWS.bend and PROOF.bend. demos/nat\_proofs moves to demos/proof\_numerics: main.bend keeps the definitions (copy2, add, mul, pred, discr, le) as plain defs and prints mul(6n, 7n) = 42n; LAWS.bend states 13 laws about them under the alias Num: add\_zero (a + 0 = a), add\_succ (1 + (a + b) = a + (1 + b)), add\_assoc, add\_comm, mul\zero (a \ 0 = 0), mul\one (a \ 1 = a), mul\_succ (a + a\b = a\(1+b)), mul\_comm, mul\_dist ((a\*c) + (b\*c) = (a+b)\*c), mul\_assoc, succ\_neq\_zero, succ\_inj and le\_diff (a \<= b gives a c with a + c = b); PROOF.bend fills each as def Laws.\<name\>, keeping the CPS copy scaffolding (copy2\_spec, eqcopy2, mul\_unfold, add\_swap, mul\_succ.go, mul\_comm.go, le\_diff.con) as helper law+def pairs, with the header's affine rules. demos/proof\_insertion\_sort is new (after Mathlib's List.sorted\_insertionSort and List.perm\_insertionSort): main.bend is insertion sort on List\<&2, Nat\> with an evidence-returning comparison (le\_case: LEOr, dec), Sorted (a computed type over a lower bound), count (via eq and bump) and length, and prints sort(\[3n, 1n, 2n\]) = \[1n, 2n, 3n\]; LAWS.bend states sort\_sorted (Sorted(sort(xs))), sort\_perm (count(x, sort(xs)) = count(x, xs), a permutation by counts) and sort\_length (length(sort(xs)) = length(xs)); PROOF.bend proves them by list induction with one insert lemma each (sorted\_ins, count\_ins, len\_ins), each replaying insert's dispatch through a .fin helper on the verdict, plus bump\_swap. Verified: both PROOF.bend print "All terms check.", LAWS.bend alone print "13 TODOs found." and "3 TODOs found.", the mains print 42n and \[1n, 2n, 3n\]. ttok: proof\_numerics 720/849/5743, proof\_insertion\_sort 1009/264/1763 (main/LAWS/PROOF)”; and 2 more.

_demos/proof\numerics · medium confidence · unverified

5 commits (1 fix) modifying demos/app\_triangle\_2d

A change to existing behaviour in demos/app\_triangle\_2d — 5 commits (1 fix), 4 files: “Pointer events: one Press for the mouse, a finger or a pen (\#1867)”; “Pong, Triangle and Fly demos get general laws with real proofs”; “Simplify the three app demos to their canonical programs with 2-3 general laws each”; and 2 more (refs \#1867, \#1982).

_demos/app\_triangle\2d · medium confidence · unverified

5 commits (1 fix) modifying demos/io\_rollback\_netcode

A change to existing behaviour in demos/io\_rollback\netcode — 5 commits (1 fix), 5 files: “Bend 2.0.32: the issue triage, root fixes, one verdict everywhere”; “Launch cleanup: one check law, honest telemetry, fair twins, Slash Boss”; “Every channel and socket wait has a try\ twin with a limit ms, answering Poll (\#1259)”; and 2 more (refs \#1259).

_demos/io\_rollback\netcode · medium confidence · unverified

6 commits (1 fix) modifying demos/app\_win\_is\_bug\_2d/web

A change to existing behaviour in demos/app\_win\_is\_bug\_2d/web — 6 commits (1 fix), 3 files: “Three demos renamed and put under laws: winning\_is\_impossible -\> app\_win\_is\_bug\_2d, slash\_bros\_3d -\> app\_slash\_bros\_3d, hvm5\_interp -\> pure\_hvm5\_mini”; “A Nat crosses to a JS host as a plain number (\#1506)”; “Pre-launch: the film points at bend-lang.com, the repo is bend, and the README, site, help and installer are trimmed. render.js's end card prints bend-lang.com (was github.com/HigherOrderCO/bend4); media/intro.mp4 and intro.gif are rendered again from it on cluster-9d (Menlo, static ffmpeg; 14.4 MB, 8.05 MB). README.md: the title and headers say Bend; the disclaimer is "BEND IS YOUNG. EXPECT BUGS AND REPORT THEM" linking the issues page; Install is \curl -fsSL https://bend-lang.com/install.sh \| sh\; step 4 is "Ask your AI to use Bend" in one sentence; Read the Guide and Formalization fold into References (Guide, Paper: BendTT + the Lean core, Paper: BendRT). front/install.sh clones HigherOrderCO/bend (or pulls) into \~/.bend/bend, installs Bun if missing, links bend2/main.ts to \~/.bun/bin/bend, warns on a missing C compiler or PATH entry; hub.ts's deploy line and AGENTS.md name it, gates/repo.ts allows it (600). front/index.html: header icons github, discord (discord.higherorderco.com), x (x.com/VictorTaelin) before guide and install; the demo button reads "DEMO: edit the game, try to win"; Install shows the one-liner; every repo link is HigherOrderCO/bend, as in pkg.html (text nav with discord, x), guide/GUIDE.md and the win-is-bug demo page. bend2/main.ts: the help's paragraph on mains, -o and --publish is one line, "READ THE GUIDE (bend guide) BEFORE YOU WRITE ANY BEND. IT IS NOT OPTIONAL", and env lists BEND\_HUB alone. BEND\_STORE is BEND\_LIB (bend.ts, default \~/.bend/lib; front/build.ts's define); lab.js rebuilt. Repo gate: the same 22 pre-existing failures as main”; and 3 more (refs \#1506, \#2029).

_demos/app\_win\_is\_bug\2d/web · medium confidence · unverified

7 commits (1 fix) modifying demos/app\_win\_is\_bug\_2d

A change to existing behaviour in demos/app\_win\_is\_bug\_2d — 7 commits (1 fix), 5 files: “The live demo opens again, and the flag law is the page's own”; “Three demos renamed and put under laws: winning\_is\_impossible -\> app\_win\_is\_bug\_2d, slash\_bros\_3d -\> app\_slash\_bros\_3d, hvm5\_interp -\> pure\_hvm5\_mini”; “Keep the flag law outside the editable game (\#1915)”; and 4 more (refs \#1915, \#2029).

_demos/app\_win\_is\_bug\2d · medium confidence · unverified

7 commits (2 fixes) modifying demos/io\_http\_fetch

A change to existing behaviour in demos/io\_http\_fetch — 7 commits (2 fixs), 6 files: “Simplify the four IO demos to their canonical programs”; “Four IO demos take laws and proofs: http\_client moves to demos/io\_http\_fetch, http\_server to demos/io\_http\_server, echo\_server to demos/io\_tcp\_echos (echo.c, load.c and bench.sh move with it; bench.sh's three paths follow), and demos/io\_hello\_world is new (the smallest IO program: greeting() is "Hello, world!", main prints it). Each demo gets a LAWS.bend (imports, comments and law blocks only, each law under a \# LAW: line) and a PROOF.bend that fills every law; every header comment carries a run line at the new path. io\_http\_fetch's laws pin http\_body, its pure part: a response with a blank line after its headers gives the text after it ("body"); a text with no blank line has no body; once the window has matched, http\_body.go(s, True{}, w) is s for every s and w; and the body is a suffix of the text (for every s, some p has p ++ http\_body(s) == s). The closed laws close by evaluation, body\_rest by opening s, body\_suffix by suffix\_go, an induction over the text at every window state whose step (suffix\_step, its own def since a match cannot open a computed value) grows the prefix by the consumed character through Equal.cong. io\_http\_server's main.bend factors its response into http\_page() (the hello page) and http\_response() (the status line, the headers and the page; http\_reply sends it, same bytes as before) and adds http\_length (a character count, used by the laws only); its laws: the response starts with "HTTP/1.1 200 OK\\r\\n"; it ends with "Content-Length: 22\\r\\n\\r\\n" and then the page; the page has 22 characters. Each is proven by its witness and evaluation. io\_tcp\_echos' main.bend factors the reading of a recv result out of echo\_back into echo\_data (Done{d} is d, Fail{e} is ""), and the act on it into echo\_send (an empty text closes the socket, a non-empty one is sent back and the handler recurses), so echo\_back is echo\_send(s, echo\_data(r), next): the same behaviour, one match on a parameter instead of a nested match on the result; its laws: a failed recv reads as a closed peer (echo\_data(Fail{e}) == "" for every e) and the data of a good recv is echoed as it came (echo\_data(Done{s}) == s for every s), both by evaluation. io\_hello\_world's laws: the greeting is "Hello, world!", it starts with 'H' (some rest follows) and ends with '!' (some start precedes), by witness and evaluation; Base has no String.length, so no character-count law. Verified: every PROOF.bend prints "All terms check." (io\_hello\_world, io\_http\_fetch) or the unsafe line for the accept loops that already existed (io\_http\_server 1 term, io\_tcp\_echos 2 terms); every LAWS.bend prints N TODOs found with N its law count (3, 4, 3, 2); the three IO mains emit C; io\_hello\_world's main prints Hello, world! on the interpreter and as a binary. ttok: io\_hello\_world main 65, LAWS 168, PROOF 90; io\_http\_fetch main 786, LAWS 293, PROOF 572; io\_http\_server main 753, LAWS 234, PROOF 146; io\_tcp\_echos main 804, LAWS 149, PROOF 72 (caps 30000)”; “Bend 2.0.32: the issue triage, root fixes, one verdict everywhere”; and 4 more (refs \#1259, \#1340, \#1765).

_demos/io\_http\fetch · medium confidence · unverified

711 commits (143 fixes) modifying bend2

A change to existing behaviour in bend2 — 711 commits (143 fixs), 6 files: “The compiler says the same in 658 fewer tokens, with the same output and compile time (\#1235)”; “fix(gates): separate proof failures from infrastructure errors (\#1408)”; “fix(import): the path error says each name starts with a letter or \_ (\#1964)”; and 707 more (refs \#1235, \#1408, \#1964, \#1563, \#1131, …).

bend2 · medium confidence · unverified

8 commits (2 fixes) modifying demos/io\_http\_server

A change to existing behaviour in demos/io\_http\_server — 8 commits (2 fixs), 3 files: “Simplify the four IO demos to their canonical programs”; “Four IO demos take laws and proofs: http\_client moves to demos/io\_http\_fetch, http\_server to demos/io\_http\_server, echo\_server to demos/io\_tcp\_echos (echo.c, load.c and bench.sh move with it; bench.sh's three paths follow), and demos/io\_hello\_world is new (the smallest IO program: greeting() is "Hello, world!", main prints it). Each demo gets a LAWS.bend (imports, comments and law blocks only, each law under a \# LAW: line) and a PROOF.bend that fills every law; every header comment carries a run line at the new path. io\_http\_fetch's laws pin http\_body, its pure part: a response with a blank line after its headers gives the text after it ("body"); a text with no blank line has no body; once the window has matched, http\_body.go(s, True{}, w) is s for every s and w; and the body is a suffix of the text (for every s, some p has p ++ http\_body(s) == s). The closed laws close by evaluation, body\_rest by opening s, body\_suffix by suffix\_go, an induction over the text at every window state whose step (suffix\_step, its own def since a match cannot open a computed value) grows the prefix by the consumed character through Equal.cong. io\_http\_server's main.bend factors its response into http\_page() (the hello page) and http\_response() (the status line, the headers and the page; http\_reply sends it, same bytes as before) and adds http\_length (a character count, used by the laws only); its laws: the response starts with "HTTP/1.1 200 OK\\r\\n"; it ends with "Content-Length: 22\\r\\n\\r\\n" and then the page; the page has 22 characters. Each is proven by its witness and evaluation. io\_tcp\_echos' main.bend factors the reading of a recv result out of echo\_back into echo\_data (Done{d} is d, Fail{e} is ""), and the act on it into echo\_send (an empty text closes the socket, a non-empty one is sent back and the handler recurses), so echo\_back is echo\_send(s, echo\_data(r), next): the same behaviour, one match on a parameter instead of a nested match on the result; its laws: a failed recv reads as a closed peer (echo\_data(Fail{e}) == "" for every e) and the data of a good recv is echoed as it came (echo\_data(Done{s}) == s for every s), both by evaluation. io\_hello\_world's laws: the greeting is "Hello, world!", it starts with 'H' (some rest follows) and ends with '!' (some start precedes), by witness and evaluation; Base has no String.length, so no character-count law. Verified: every PROOF.bend prints "All terms check." (io\_hello\_world, io\_http\_fetch) or the unsafe line for the accept loops that already existed (io\_http\_server 1 term, io\_tcp\_echos 2 terms); every LAWS.bend prints N TODOs found with N its law count (3, 4, 3, 2); the three IO mains emit C; io\_hello\_world's main prints Hello, world! on the interpreter and as a binary. ttok: io\_hello\_world main 65, LAWS 168, PROOF 90; io\_http\_fetch main 786, LAWS 293, PROOF 572; io\_http\_server main 753, LAWS 234, PROOF 146; io\_tcp\_echos main 804, LAWS 149, PROOF 72 (caps 30000)”; “Bend 2.0.32: the issue triage, root fixes, one verdict everywhere”; and 5 more (refs \#1259, \#1990, \#1765).

_demos/io\_http\server · medium confidence · unverified

8 commits (2 fixes) modifying demos/io\_tcp\_echos

A change to existing behaviour in demos/io\_tcp\_echos — 8 commits (2 fixs), 3 files: “Simplify the four IO demos to their canonical programs”; “Four IO demos take laws and proofs: http\_client moves to demos/io\_http\_fetch, http\_server to demos/io\_http\_server, echo\_server to demos/io\_tcp\_echos (echo.c, load.c and bench.sh move with it; bench.sh's three paths follow), and demos/io\_hello\_world is new (the smallest IO program: greeting() is "Hello, world!", main prints it). Each demo gets a LAWS.bend (imports, comments and law blocks only, each law under a \# LAW: line) and a PROOF.bend that fills every law; every header comment carries a run line at the new path. io\_http\_fetch's laws pin http\_body, its pure part: a response with a blank line after its headers gives the text after it ("body"); a text with no blank line has no body; once the window has matched, http\_body.go(s, True{}, w) is s for every s and w; and the body is a suffix of the text (for every s, some p has p ++ http\_body(s) == s). The closed laws close by evaluation, body\_rest by opening s, body\_suffix by suffix\_go, an induction over the text at every window state whose step (suffix\_step, its own def since a match cannot open a computed value) grows the prefix by the consumed character through Equal.cong. io\_http\_server's main.bend factors its response into http\_page() (the hello page) and http\_response() (the status line, the headers and the page; http\_reply sends it, same bytes as before) and adds http\_length (a character count, used by the laws only); its laws: the response starts with "HTTP/1.1 200 OK\\r\\n"; it ends with "Content-Length: 22\\r\\n\\r\\n" and then the page; the page has 22 characters. Each is proven by its witness and evaluation. io\_tcp\_echos' main.bend factors the reading of a recv result out of echo\_back into echo\_data (Done{d} is d, Fail{e} is ""), and the act on it into echo\_send (an empty text closes the socket, a non-empty one is sent back and the handler recurses), so echo\_back is echo\_send(s, echo\_data(r), next): the same behaviour, one match on a parameter instead of a nested match on the result; its laws: a failed recv reads as a closed peer (echo\_data(Fail{e}) == "" for every e) and the data of a good recv is echoed as it came (echo\_data(Done{s}) == s for every s), both by evaluation. io\_hello\_world's laws: the greeting is "Hello, world!", it starts with 'H' (some rest follows) and ends with '!' (some start precedes), by witness and evaluation; Base has no String.length, so no character-count law. Verified: every PROOF.bend prints "All terms check." (io\_hello\_world, io\_http\_fetch) or the unsafe line for the accept loops that already existed (io\_http\_server 1 term, io\_tcp\_echos 2 terms); every LAWS.bend prints N TODOs found with N its law count (3, 4, 3, 2); the three IO mains emit C; io\_hello\_world's main prints Hello, world! on the interpreter and as a binary. ttok: io\_hello\_world main 65, LAWS 168, PROOF 90; io\_http\_fetch main 786, LAWS 293, PROOF 572; io\_http\_server main 753, LAWS 234, PROOF 146; io\_tcp\_echos main 804, LAWS 149, PROOF 72 (caps 30000)”; “Bend 2.0.32: the issue triage, root fixes, one verdict everywhere”; and 5 more (refs \#1259, \#1990, \#1765).

_demos/io\_tcp\echos · medium confidence · unverified

Bend is now licensed under Apache 2.0

The repository now includes a LICENSE file adopting the Apache License, Version 2.0, replacing the previous licensing terms. This change clarifies the permissions, conditions, and limitations for using, modifying, and distributing the Bend language and its associated tools.

(repo-wide) · high confidence

Removal of legacy AST module definitions

The \src/ast/mod.rs\ file has been deleted, removing the previous definitions for the Abstract Syntax Tree, including \DefinitionBook\, \Definition\, \Rule\, \Pattern\, \Term\, \Name\, \Number\, and \NumOper\. This change indicates that the AST structure has been refactored or replaced by other modules (such as \hvmc::LBook\ or new type definitions in other files), meaning users relying on these specific types or the previous AST representation will need to adapt to the new structure.

src/ast · high confidence

Runtime benchmarks and performance pins updated for Apple M4 hardware

The \bench/runtime\ directory now contains a standardized structure with one subdirectory per benchmark (e.g., \bfs\, \editdist\, \gameoflife\), each including the source \main.bend\ file and its native twins in C, Lean, and TypeScript. New performance pin files (\apple\_m4.txt\ and \apple\_m4\_max.txt\) have been added to record baseline execution times and memory usage for sequential CPU, parallel CPU, and parallel GPU modes on Apple M4 hardware, providing a reference for future performance regression checks.

bench/runtime · high confidence

Updated checker benchmark pins for Apple M4 and M4 Max

New performance baseline files have been committed for the checker benchmarks on Apple M4 and M4 Max hardware. These pin files record execution times for five verification tools (Isabelle, Agda, Lean, Rocq, and Bend) across four test suites (defs\_12800, generics\_3200, proofs\_3200, and trees\_400), providing a reference for measuring regression or improvement in type-checking and proof-checking performance.

bench/checker · high confidence

Test coverage

143 commits adding/updating tests in tests/io; 15 commits adding/updating tests in tests/gfx; 23 commits adding/updating tests in tests/import; Add regression tests for borrow inference and array memory safety; Added compile tests for alias definitions, array operations, and erasure semantics; Added comprehensive test coverage for compile-time template features; Added evaluation tests for array literals, do-notation, and value printing; Added printer round-trip tests for literals and offload marks; Added proof tests for Ackermann, addition commutativity, and boolean algebra; Added stuck-reduction tests for the interpreter; Added tests for error pages and error messages; Added tests for flatten module edge cases and error handling; Added tests for the left-to-right structural descent law; Expanded test coverage for array operations, F32 parsing, and compiler correctness; Expanded test coverage for base library functions; Ported check tests from bend3 to Bend; Tests for parse/parse location updates.

Dependencies

Add formatting-only language server and lint tool; remove legacy Rust crate

The repository introduces two new JavaScript/TypeScript tools: a formatting-only language server (bend2-fmt-lsp) built on vscode-languageserver, and a linting tool (bend-lint) for diagnostics outside the core language. Concurrently, the legacy Rust crate hvm-lang and its Cargo.lock are removed from the repository.

(dependencies) · high confidence

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 47 → 47 (-0.1)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.4) — scores are not directly comparable.

Lenses

  • Code Health 44 → 45 (+1.0)
  • Architecture 100 → 100 (-0.0)
  • Maturity 67 → 68 (+0.3)
  • Readiness 35 → 35 (+0.1)
  • Security 89 → 78 (-11.1)
  • Performance 60 → 60 (+0.0)

Resolved (13)

  • Off-boarding risk: anonymized user #1
  • TodoComment (bend2/main.ts)
  • comp.anf::go (cognitive 16) (bend2/comp.ts)
  • comp.anf::go (cyclomatic 16) (bend2/comp.ts)
  • comp.compile_book (cognitive 29) (bend2/comp.ts)
  • comp.compile_book (cyclomatic 21) (bend2/comp.ts)
  • comp.emit_ctr (cyclomatic 16) (bend2/comp.ts)
  • comp.js_call (cognitive 17) (bend2/comp.ts)
  • comp.mat_lits (cognitive 21) (bend2/comp.ts)
  • comp.show_main::node (cognitive 28) (bend2/comp.ts)
  • comp.show_main::node (cyclomatic 19) (bend2/comp.ts)
  • safe.let_term (cognitive 18) (bend2/safe.ts)
  • safe.swi (cognitive 18) (bend2/safe.ts)

New (26)

  • Hotspot: tests/io/bundle_inline.js (tests/io/bundle_inline.js)
  • Hotspot: tests/io/output_input_links.js (tests/io/output_input_links.js)
  • Off-boarding risk: anonymized user #1
  • Repeated repair: bend2/effs/process_run.js (bend2/effs/process_run.js)
  • TodoComment (tools/bend-cache/src/cache.ts)
  • cache.load (cognitive 19) (tools/bend-cache/src/cache.ts)
  • cache.trace_valid (cognitive 25) (tools/bend-cache/src/cache.ts)
  • cache.trace_valid (cyclomatic 22) (tools/bend-cache/src/cache.ts)
  • comp.anf (cognitive 39) (bend2/comp.ts)
  • comp.anf (cyclomatic 33) (bend2/comp.ts)
  • comp.arm_self::go (cognitive 29) (bend2/comp.ts)
  • comp.arm_self::go (cyclomatic 19) (bend2/comp.ts)
  • comp.effect_src (cognitive 16) (bend2/comp.ts)
  • comp.js_func (cyclomatic 16) (bend2/comp.ts)
  • comp.js_match (cognitive 17) (bend2/comp.ts)
  • comp.main_pure (cognitive 44) (bend2/comp.ts)
  • comp.main_pure::show (cyclomatic 16) (bend2/comp.ts)
  • comp.row_val (cognitive 21) (bend2/comp.ts)
  • comp.term_kids (cognitive 18) (bend2/comp.ts)
  • comp.term_same (cognitive 16) (bend2/comp.ts)
  • …and 6 more

Changes since last survey

  • 154 commits — 78 feature/other, 76 fixes

By area

  • bend2/comp.ts — 34 commits
  • tests/io — 28 commits
  • bend2/bend.ts — 14 commits
  • bend2/effs — 12 commits
  • bend2/base.bend — 10 commits
  • bend2/main.ts — 7 commits
  • bend2/safe.ts — 6 commits
  • tests/check — 6 commits
  • demos/app_slash_boss_3d — 4 commits
  • tools/bend-fmt-lsp — 4 commits
  • (root) — 3 commits
  • tests/gfx — 3 commits
  • tests/import — 3 commits
  • tests/parse — 3 commits
  • bend2/bendtt.lean — 2 commits
  • demos/app_win_is_bug_2d — 2 commits
  • tests/proof — 2 commits
  • demos/app_triangle_2d — 1 commit
  • demos/io_http_server — 1 commit
  • demos/proof_insertion_sort — 1 commit

Notable commits

  • fix: fix(array): the depth-wall error and Array.new say d is a depth (#1963)
  • fix: fix(base): convert Nat to F32 without narrowing to U32 (#1610)
  • fix: fix(bundle): encode virtual module names for quoted HTML filenames (#1977)
  • fix: fix(check): a call missing arguments says so (#1632) (#2008)
  • fix: fix(check): a constructor's fields grow as a list, without copying (#1966)
  • fix: fix(check): a false {==} names its sides as written (#1632) (#2002)
  • fix: fix(check): a match missing cases says so, without the internal \{} (#1632) (#2000)
  • fix: fix(check): a pair where Data is expected names the spelling that is (#1632) (#2007)
  • fix: fix(check): a self-call that doesn't shrink shows what it received (#1632) (#2006)
  • fix: fix(check): an LE compare meets a share cell's class too, and tests for #1984 (#2052)
  • fix: fix(check): pmap_set builds each new node once, and closing an unused binder writes nothing (#2013)
  • fix: fix(check): say a def given <...> is a def, and how a do block opens (#1865)
  • fix: fix(cli): only a stack overflow prints the stack overflow message (#2122)
  • fix: fix(cli): print valid aliases for hyphenated published files (#1849)
  • fix: fix(cli): reject colliding output requests before writing (#2010)
  • fix: fix(cli): say when a ! program builds for the CPU because no CUDA toolkit was found (#1888)
  • fix: fix(comp): C comments keep Unicode separators (#1972)
  • fix: fix(comp): a bit-trie level runs arm_self only on a row it keeps (#2076) (#2107)
  • fix: fix(comp): a fold reads an argument's liveness by its position (#2054)
  • fix: fix(comp): a fork's join opens on the fork path's holds (#1953) (#2042)
  • …and 134 more

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

HigherOrderCO/Bend was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 14 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 38103b3d46425026eff2d16bef93684967bee992 — the exact code this score is about.
  • Scored under rubric-2026.11.4 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.65+preprod-36d4cd83012f.