Benoît

A programming language that understands itself.

68% fewer tokens. Inline test assertions. Automatic property discovery. Code that proves itself, discovers its own laws, and communicates without source code.

npm install benoit
92
tests passing
68%
token reduction
31
properties auto-discovered

Write less. Prove more.

add a,b -> a + b

-- The code proves itself
add(2, 3) == 5
add(-1, 1) == 0

-- Benoît discovers automatically:
-- commutative: add(a, b) == add(b, a)
-- associative: add(add(a, b), c) == add(a, add(b, c))
-- identity element: add(a, 0) == a

7 tokens in. 3 algebraic properties out. No human told it what to look for.

The Experiment

Two agents. Zero source code. Full verification.

Agent A writes code → discovers 9 properties → sends fingerprint
Agent B receives fingerprint → synthesizes code → verifies all

Functions synthesized: 3/3
Assertions verified: 8/8
Properties verified: 9/9
Source code transmitted: 0 chars

Run it yourself: node experiments/full_cycle.mjs

Features

Inline Test Assertions

Tests as first-class syntax. No framework. No separate files. Stripped in production, executed in test mode.

Property Inference

Discovers commutativity, associativity, identity elements, involutions, monotonicity, even/odd symmetry automatically.

Code Synthesis

Given only input/output examples, synthesizes working implementations. Fibonacci, clamp, arithmetic — from behavior alone.

Pattern Matching

Match expressions with guards, ranges, tagged values, and wildcards. Clean and expressive control flow.

Pipe Operator

Chain transformations: data |> parse |> validate |> save. Top to bottom. No nesting.

Zero Dependencies

The entire transpiler is a single file. Install it and it just works. Small enough for an AI to hold entirely in context.

Named after Benoît Fragnière, who loved science.

He would have loved that the code discovers its own truths.