aver check
Static checks
Types, descriptions, module intent, effect propagation and diagnostics.
A programming language for code written with AI.
Source language · Bytecode VM · Rust · WebAssembly GC · Lean 4.34
Function descriptions, effect sets, verify blocks, architecture decisions and certificate obligations are part of the language. The wasm-gc backend can emit behavioral certificates, which a standalone verifier checks.
Agent referencellms.txt ↗
? intent! effectsverifyartifact cert01 / SOURCE
A complete pure module with a public API, function descriptions, concrete cases and one law checked over nine input pairs.
module Cart ="Cart operations and the total they preserve." [cartTotal, combine] [] fn cartTotal(items: List<Int>) -> Int? "Sum the prices in a cart."match items[] -> 0[price, ..rest] -> price + cartTotal(rest) fn combine(a: List<Int>, b: List<Int>) -> List<Int>? "Put cart b's items after cart a."match a[] -> b[x, ..rest] -> List.prepend(x, combine(rest, b)) verify combinecombine([], [1, 2]) => [1, 2]combine([3, 4], [1, 2]) => [3, 4, 1, 2] verify cartTotal law combinePreservesTotalgiven a: List<Int> = [[], [5], [3, 4]]given b: List<Int> = [[], [10], [1, 2]]cartTotal(combine(a, b)) => cartTotal(a) + cartTotal(b)intent says what the module is for. exposes lists the public API. effects [] means the module is pure.
Both functions have a ? description and cover every list shape with explicit patterns.
A plain verify block pins what combine does with an empty and a non-empty list.
Three values per input give nine pairs, and combinePreservesTotal is checked on each.
Read the source Open cart.av ↗
Give it to an agent Read llms.txt ↗
02 / DESIGN POSITION
Aver leaves these constructs out. Each one has an explicit replacement.
null
Option<T> with explicit Some and None.
Result<T, E>. Errors show up in signatures and values.
if / else
Exhaustive match. The compiler reports a missing case.
A value never changes behind the reader’s back.
Top-level functions. Every input is passed in where you can see it.
Parallel work is written as independent products. There is no hidden scheduling syntax.
Recursion and pattern matching, with tail-call optimization.
No decorators, no reflection, no implicit behavior.
03 / TOOLCHAIN
The main commands for analysing and building source, in the order you run them.
aver check
Types, descriptions, module intent, effect propagation and diagnostics.
aver verify
Examples and laws written next to the code run as regression checks.
aver proof
The Lean backend takes selected laws past example checking.
aver compile
Deploy through Rust or WebAssembly. Supported wasm-gc artifacts can also be certified.
effect-violation ‘charge’ calls ‘Http.post’ but does not declare it.
hint / add ! [Http.post] to the function contract
Open example ↗
04 / ABC
A certificate states what selected exports of one WebAssembly module compute. Verification ties each accepted claim to the supplied bytes and to a statement schema that the checker owns.
BEHAVIORAL PROOF / FAIL CLOSED
aver-cert validates the .wasm file it is given, hashes it and encodes it for Lean.
The statement schema, soundness wall, toolchain and fresh witness all belong to the checker.
Unsupported exports are declined explicitly. The certificate makes no claim about them.
aver compile app.av --target wasm-gc --certify -o out/aver-cert verify out/app.wasm out/certPrecise limit: this is a behavioral proof. It is not a signature and not a reproducible-build attestation.
05 / BUILD LEDGER
Eight browser programs, compiled straight from Aver source.
Size bars are relative to the largest artifact in this set. You need a recent browser with WebAssembly GC.
06 / PROJECT NOTE
“Aver is optimized for AI to generate code that humans can inspect, constrain, test and ship. Typing it by hand all day is not the goal.”
— Aver README
07 / INSTALL
Install the released compiler from crates.io, then run and verify the example that ships with it.
--features wasm turns on WebAssembly GC output and ABC production. To check an ABC independently you need aver-cert, plus Elan for its pinned Lean 4.34 toolchain.
cargo install aver-lang --features wasmcargo install aver-certaver run examples/core/hello.avaver verify examples/core/hello.av