Simple for Users
Python/Java-like structure and reduced boilerplate let teams move fast without deep theorem-prover expertise.
Built on 4 Design Principles
ClearLang is intentionally simple for users, AI-friendly, provably correct, and crypto-focused, so high-assurance code is practical instead of niche.
Simple
Familiar syntax
AI-Friendly
Predictable tooling
Provably Correct
Compile-time proofs
Crypto-Focused
Deterministic safety
These principles define ClearLang's direction: approachable syntax, predictable AI workflows, proof-backed correctness, and contract-grade crypto guarantees.
Python/Java-like structure and reduced boilerplate let teams move fast without deep theorem-prover expertise.
Consistent syntax and stable diagnostics help AI generate and repair code with less ambiguity.
Refinement types plus `require`/`ensure` contracts enforce invariants before unsafe code can compile.
Deterministic runtime behavior, effect discipline, and resource ownership target smart-contract failure modes.
type Nat = Int where n >= 0
resource Token {
balance: Nat;
drop { }
}
mut function transfer(from: Token, to: Token, amount: Nat) -> Nat
require { amount <= token::balance(from) }
ensure { result == old(token::balance(from) + token::balance(to)) }
{
token::set_balance(from, token::balance(from) - amount);
token::set_balance(to, token::balance(to) + amount);
token::balance(from) + token::balance(to)
}
ClearLang is structured for instruction-to-code workflows where generated output still has to satisfy explicit correctness constraints.
Roadmap phases are largely complete with strong emphasis on diagnostics, strict policy gates, signing, and deterministic package/runtime behavior.
Compiler + typer + IR + Wasm pipeline
`clg build` / `clg run` / `clg verify`
Signed proof and assurance manifests
ClearLang supports packaging proof metadata into Wasm modules, signing canonical payloads, and verifying them offline.
clg build examples/contract.clear -o out.wasm --emit-vcs out.vc.json \
--sign --key keys/signing.json --key-id demo --scope both --sig-out out.sig.json
clg verify --module out.wasm --sig out.sig.json --pubkey keys/public.json --explain