$ailang run--caps IO,FSprocess.ailOnly IO and FS granted at runtime. Attempting Net or DB → immediate rejection.
Neurosymbolic
AI writes the code. Z3 proves it.
AILANG — Contracts
-- ✓ This one verifiesexport funccalculateTax(income: int) -> int! {}requires { income >= 0 }
ensures { result >= 0 }
{ income / 5 }
-- ✗ Subtle bug: what if price < discount?export funcapplyDiscount(price: int, discount: int) -> int! {}requires { price >= 0, discount >= 0 }
ensures { result >= 0 }
{ price - discount }
$ailang verify--verbosebilling.ail
VERIFIED calculateTax 6ms
VIOLATION applyDiscount
Counterexample:
price: Int = 0
discount: Int = 1 -- 0 - 1 = -1, violates ensures { result >= 0 }
Neural
LLM writes AILANG with requires / ensures
Symbolic
Z3 SMT solver proves the contract for all inputs
Fix
Counterexample tells the AI exactly what to repair
This is neurosymbolic programming — coupled, on purpose. The neural side writes the code. The symbolic side proves it. No tests, no sampling — the solver reasons about every possible execution and hands back a concrete counterexample when it can't.
Code the AI Can Hold in One Context
No loops. Only pattern matching. Every branch is on screen — no mutable loop state to remember.
Python
total = 0for item in items:
if item.active:
total += item.value
AILANG
pure functotal(xs: List[Item]) -> int {
match xs {
[] => 0,
::(x, rest) =>
if x.active then x.value + total(rest)
else total(rest)
}
}
Every branch is local. The model doesn't have to track an accumulator across loop iterations or wonder if it terminates. Compiler-checked exhaustiveness means fewer tokens spent on reasoning about state — and a one-turn fix when a branch is missing.
What's in Scope Is What's on Screen
The same line of code — two very different mental loads on the AI.
One line. What's in scope?Python
importrequests
what the AI must reason about
requests.getrequests.posturllib3.*charset_normalizeridnacertifi.*sslsockethttp.clientjsonos.environloggingwarningsio.BytesIO… and more, transitively
2 named ·
12+ reachable through the package
The model spends tokens guessing what else is in scope. Sometimes it hallucinates symbols that don't exist; sometimes it uses ones that do but it shouldn't.
One line. What's in scope?AILANG
importstd/net (get, post)
what the AI must reason about
getpost
2 named ·
2 reachable
The file is the inventory. Nothing arrives transitively. Whatever the AI cannot name, it cannot call.
Complexity Is in the Eye of the Beholder
Every AILANG choice has two readers. Same code — two very different reactions.