Repository navigation
Lume 1.2.0 (Edition 2026)
Native Windows x64 toolchain. The whole toolchain is now built as PE executables by Lume itself, with results identical to Linux on the full test universe (145 test files, same exit codes and counts on both systems).
Downloads in this release
| Platform | Archive |
|---|---|
| Linux x86-64 | lume-v1.2.0-linux-x86_64.tar.gz |
| Windows x64 (native toolchain) | lume-v1.2.0-windows-x86_64.tar.gz |
Linux AArch64 / RISC-V 64 and macOS stay on v1.1.0; install.sh picks the right release for each platform.
curl -fsSL https://github.com/OmegaSoftDLL/lume/releases/latest/download/install.sh | bashirm https://github.com/OmegaSoftDLL/lume/releases/latest/download/install.ps1 | iexNative Windows toolchain (lumec --win64, lasm --pe, the Win64 runtime layer) with results identical to Linux on
the full test universe, and the requests of the first production application (LumeDesk).
Added
- Native Windows x86-64 toolchain: every tool built as a PE executable by Lume itself; Win64 layer with fd table,
lazy memory, VEH, real fork, Winsock, epoll and io_uring emulation, C FFI with the Win64 ABI, DLLs written by Lume
(lasm --pe --shared), a native installer. Test files and programs give the same results on Linux and Windows. - Runtime in Lume: strlen/streq, 31
fs_*/os_*/io_*builtins,read/readall, X25519 and Ed25519 point
math are Lume source (compiler/stage1/rt/*.src,lumec --rawwith register allocation and leaf routines). - Files:
fs_read_range(path, offset, n),fs_truncate(path, size),fs_rename_noreplace(from, to). - Processes (
use process):os_spawn_pipes,os_fd_read_some,os_wait_nohang,os_kill_tree,
os_run_capture_limit(bounded output, the tree killed at the deadline);os_run_capture_timeoutkills the whole
tree (a new process group on Linux, a Job Object created suspended on Windows). - Inventory (
use sysinfo):fs_statvfs(path)andnet_interfaces()(name, MAC, addresses with prefix). - Windows system (
use winsys): registry reads (reg_get_string,reg_get_dword,reg_key_exists,
reg_value_exists), sessions (wts_active_console_session,wts_sessions,wts_session_user,
process_session_id),services_running; service management and the service dispatcher (events through an
epoll-able descriptor), processes in a user's session (win_spawn_as_session), local named pipes (non-blocking,
epoll-able, SDDL DACL, client pid), input desktop and the capture-excluded privacy window. - Crypto (
use lcrypto_tls): AES-128/256 and AES-GCM, ECDSA P-256 (RFC 6979), X25519/Ed25519 over strs,
incrementallcs_sha256_init/update/finalandlcs_hmac_sha256_init/update/final. - Network: IPv4/IPv6 interfaces, socket local address, non-blocking
net_tcp_connect_start/result. map: HalfSipHash-2-4 keyed per map with splitting buckets (collision-resistant),map_keys,map_fold.lume fmt: long lines broken to the end of the expression (oneletper line,ifbranches indented),
lambdas,{r with ...}, contracts and match arms included; idempotent and compiler-checked.lume check --lex, record update{r with f: v}, module aliases and relative module resolution.
Changed
- Prover: bounded products (McCormick, bounds up to 2^62, from
requiresor from the path, insidelet/if),
booleans used as values proved as 1/0, laws that use the callee's provenensures. - Certificate kernel (
lcert): the four McCormick inequalities, linear-expression factors, division by a variable
with a positive lower bound, boolean equality, let/if lifted out of comparisons. - Checks:
[T2101]follows records through functions and both branches of anif;+with a list is[T0604]
with theseq_concatfix-it; reserved words are refused as names at the declaration. - Keychain error contract:
not_foundonly when the entry does not exist (access_denied,unavailable,
corrupt,not_private); the Win64 layer reportsENOTDIRlike Linux.
Added (Wave 14 -- clean-room verification, [C0011] constant-time crypto kernels, 2oo2D split envelope, cross-module synergy & qualification PASS)
-
OmniProof-v4& signed Tool Qualification DossierPASS(compiler/stage1/lqualify.src,compiler/stage1/lume_driver.src):
lume self-proveruns16self-hosted proof batteries discharging1,682formal obligations (0runtime-checked or
refuted),372unit tests,122sovereign evolution domains (#0..#121), and134verifiedMANIFEST.sha256
files.lume qualifyachievesPASSacross106/106diagnostic/adversarial probes,21/21end-to-end verification
gates, and10HLR +44/44LLR (VERIFIED), emittingdocs/certification/QUALIFICATION_DOSSIER.mdsigned with
Ed25519 and X.509v3 (docs/certification/QUALIFICATION_SIGNING_CERT.der, verified bylume qualify --verify) alongside
docs/RELATORIO_AUDITORIA_E_CERTIFICACAO_CLAUDE_PT_BR.md. -
Translation-validation hub, runtime helper verification & clean-room SMT checker (
compiler/stage1/ltv.src,compiler/stage1/ltv_rt.src,compiler/stage1/lsmt.src):
lume tvvalidates694functions from.srcdown to emitted x86-64 (0rejected,7,846native boundary vectors,
687/6871-to-1 AST-to-object branch correlation).lume tv-rt(tv_rt_gate/lume tv-rt-gate) symbolically
verifies all18/18integer runtime helpers across268paths /462obligations.lume smt-check
(smt_cert_gate/lume smt-cert-gate) checks100%of.smt2proof obligations with a self-contained clean-room
QF_LIA/QF_BVsolver in fullunsatagreement with externalz3(94certificates,3,820mutants rejected). -
Complete native MC/DC closure & static stack byte analyzer (
compiler/stage1/lmcdc.src,compiler/stage1/lstack.src):
lume mcdcreaches0/9,618uncovered MC/DC conditions on compiled native binaries across all four certified modules
(compiler/stage1/lstd.src0/980,examples/safety_envelope/critical_kernels.src0/112,
compiler/stage1/lchameleon.src0/2,392, andcompiler/stage1/lsentience.src0/6,134).lume stackstatically
bounds worst-case stack bytes on emitted x86-64 for@no_alloc[E0210]kernels (K0010..K0013diagnostics on frame
overflow, indirect calls, stack cycles, or dynamicrsp), paired with p99.99 jitter measurement in
tests/harness/realtime_gate.src. -
118[C0011]constant-time crypto kernels,Ed25519 X.509v3& NIST SP 800-90B OS entropy (compiler/stage1/lcrypto_tls.src,compiler/stage1/lx509.src):
118/118@secret @no_alloc[C0011]branch-free cryptographic kernels incompiler/stage1/lcrypto_tls.srcpass
transitive[C0010]machine-code constant-time validation andlstackstack bounding (max536 B), backed by a
24-targetdudectWelch$t$ -test harness (|t| <= 2.690 < 4.5).lume x509 verifyandlume x509 showenforce
Ed25519 X.509v3 DER/PEM path validation (6,000/6,000tampered certificate chains rejected) and X.509v3 TLS 1.3 peer
authentication;lume entropywraps OS CSPRNG reads behind NIST SP 800-90B repetition-count and adaptive-proportion
health checks. -
2oo2Dclean-room RV32IM Channel B & multi-board split bundle (compiler/stage1/lsafety_envelope.src,compiler/stage1/lrv32_lowered.src):
Channel B executes on a clean-room RV32IM image sharing0/3,169compiler functions in the gate bundle (87,224
injected faults ->0false negatives) and supports multi-board cross-architecture bundle generation, hash/signature
verification, and split frame execution (--split,--split-verify,--split-run, documented in
docs/41-safety-envelope-split-bundle.md). -
Cross-module synergy gate, scale gate & CLI parity (
tests/harness/synergy_gate.src,tests/harness/lcaas_scale_gate.src,tests/cli/driver_gate.src):
lume synergy-gate(synergy_gate) executes17/17chained cross-module stages on
examples/synergy/critical_pipeline.src(lcaas->lcert->lproof_cache->lumec --critical->ltv->
ltv_rt->lsmt->lstack->lmcdc->lx509+lcrypto_tls->lsafety_envelope->ltv_multiarch) and
rejects36/36cross-tamper scenarios (0undetected).lume lcaas-scale-gate(lcaas_scale_gate) verifies deep
lcaasscaling, andlume cli-parity(native_driver_gate) checks114dispatch-table rows (226command/alias
names) across9documentation and CLI surfaces with0mismatches.
Security (Wave 14 hostile audit, round 3 -- [C0011] precedence, interprocedural @secret taint, JSON brace escapes, source-tree hygiene & lcert integration)
R3-1([C0011]vs[C0009]precedence on@secret @no_allockernels): Bothcompiler/stage1/lume/06b_phase3.src
andcompiler/stage1/lcaas.srcdelegate@secret @no_allocfunctions directly toctk_chk_fnrather than running the
generic@secretbranch check first, ensuring secret-dependentif/match/&&/||inside constant-time
kernels deterministically emit[C0011](aligned withsynergy_gatetamper probesT-E2andT-E3).R3-2&R3-2b(interprocedural@secrettaint & branch-free primitives): Added cycle-guarded interprocedural
@secrettaint propagation ([C0009]) through unannotated helper callees incompiler/stage1/lume/06b_phase3.srcand
compiler/stage1/lcaas.src,secret_*/ct_*taint roots on@asmkernels incompiler/stage1/ltv.src,
branch-freebit_and/bit_xor/bit_orMBA helpers incompiler/stage1/protect.src, and promoted
ct_tag_xor_diffincompiler/stage1/lume_crypto_blockchain_engine.srcto a branch-free@secret @no_allockernel
validated byltv[C0010].R3-3..R3-5(JSON string-interpolation brace escapes & structural validation): Fixed depth-0"}}"brace
collapses intests/harness/safety_envelope_gate.src,compiler/stage1/lchameleon.src(lume chameleon --json),
compiler/stage1/lsentience.src(lume crypto-engine --json), andtests/cli/driver_gate.src(dg_mcp_call),
enforced end-to-end by tail-recursivejson_well_formedparsers incompiler/stage1/lqualify.src,
tests/harness/safety_envelope_gate.src, andtests/cli/driver_gate.src.R3-6(clean-tree invariant under--jsondomain commands):lume quantum-nexus --jsonwrites its temporary
pulse artifact to/tmp/lume_quantum_pulse.qbinrather than leaving untracked artifacts incompiler/stage1/.- Real
lcertkernel invocation & driver soundness:lume certifyinvokes the standalonecompiler/stage1/lcert.src
kernel for its"kernel_verified"verdict (never hardcoded),compiler/stage1/lcert.srcsupports disequality
splitting alongside06b_phase3.srcandlcaas.src,compiler/stage1/ltv.srcenforces mandatory JSON report fields,
bundle-cache digests hash transitive imports,lume testisolates concurrent temp binaries by PID, and
build/check/prove/certify/test/runnever write to$HOME.
Security (Wave 14 hostile audit, round 1 -- prover, termination, effects, @bound)
Each item is a reproducible unsound verdict of the released toolchain, with its reproducer among the fixed cases of
tests/harness/prover_fuzz.src (pf6_fixed_a / pf6_fixed_b, run by prover_fuzz_gate and claude_audit_gate) and in
bootstrap/lume0/tests/run_native.src (w14_*).
- The prover took every parameter for an integer.
fn cat(a, b) ensures result == b + a = a + bwasprovenand
its check elided;cat("x", "y")returned"xy".a + bconcatenates when an operand is a string,<orders two
strings, and a declared: intis not checked on a dynamically typed call path (f(hd(xs))). A name is now an
integer of the linear model only on EVIDENCE: an evaluated use that traps on every non-integer (- * / %, the
wrapping and bit operators, an ordering against an integer), on the path where that evaluation happened. Until then
it is a handle: it can be passed, projected, compared with itself and ORDERED against another handle (so
imax(a, b)is still proven, for strings too), and no arithmetic is built from it. A declaredintparameter is a
second attempt only, and the compiler then guards the parameter on entry (let _vty_ok = p - 0). total fnover untyped values.total fn lp(a, b) terminates (b - a) = if a < b then lp(a + 1, b) else 0was
accepted;lp("a", "b")never returns. Same rule as above, with the evidence of the path to each recursive call.total fnrecursing through its own contract.total fn f(n) requires f(n) > 0 = 1was "not recursive" and
overflowed the stack. A clause that reaches the function again is refused ([A0002]); a callee's clauses count as
part of that callee.simd_add4_i64/simd_sub4_i64were modelled as4 * (a + b)with no range. The lanes wrap:
requires a >= 0 ... ensures result >= 0was proven andf(2^61, 0)returned-2^63with exit status 0. The model
now needs-2^61 <= a + b < 2^61entailed.- Effects under
/ pure. (1) A callee defined ABOVE its caller's callee was invisible to the inference (the callee
body was inferred against the tail of the function list):fn w() = <effect>,fn k() = w(),
fn top() / pure = k()was accepted. (2) Nothing was seen more than 24 calls down. (3) A parameter orletnamed like
a pure program function hid an effectful closure (fn h(g, x) / pure = g(x)). (4)with handler panic { ... }
discharged the builtin effect ofos_exit. (5) 72 runtime builtins that act on the world carried no effect at all
(fs_write_hex_file,os_fork,os_monotonic_ns,printval,port_out8, ...). All five are fixed; a declared row is
now checked against the primitive effects of everything the function can reach. Consequence, stated plainly: the
compiler's own passes were declared/ pureand are not (lumec_checkreads the command line,lumec_expandreads
the files ofcomptime embed);07_driver.srcnow declares/ {io}and/ {io, fs}. @bound(cycles: N)did not count amatcharm or a record field. A 300000-step function passed
@bound(cycles: 20). (A call through a parameter was already charged 100000 cycles; that path is only made explicit.)- The compiler aborted with
integer overflowonrequires x - 9223372036854775807 - 1 >= 0(the prover negated
the minimum integer). - Lexer:
12abc,1e3,0x1G,0b12,1_lexed as a number followed by another token. Where that token was a
defined name or a digit the statement grammar accepted the pair (print 12abcprinted 12,print 0b12printed 1);
otherwise the program died on an unrelated name error.[L0003]now.
Security (Wave 14 hostile audit, round 2 -- operand keys, @secret, the sampling refuter)
Reproducers: pf6_fixed_c, pf6_kernel and pf6_wide_check in tests/harness/prover_fuzz.src; the compiler mutant
bv_key of claude_audit_gate.
- One prover variable named two different bit operations. The opaque term of
bit_and/bit_or/bit_xor
joined the keys of its operands with*, the separator of a product, sobit_and(a, b * c)and
bit_and(a * b, c)were both the variablebv_and(a*b*c):
fn g(a: int, b: int, c: int) -> int ensures result == bit_and(a * b, c) = bit_and(a, b * c)wasprovenby
lumec(check elided,g(1, 2, 3)returned 0 where the clause wants 2), bylcaas, and its proof term was
re-derived by thelcertkernel ("Lume Verified"). The operands are now separated by a comma in all three engines
(vbv_key,lk_bv_key). @secret fnreturned a promise.ois_asynctested bit 128 of the function flags, which is@secret;async fn
is bit 256.@secret fn f(a: int) -> int = aprinted<opaque>andf(1) + 1died with a type error, while an
async fnreturned its plain value. Behaviour change to note: the value of a call of anasync fnthat is not
awaited is now a promise (print s(3)prints<opaque>;block_on/.awaitare unchanged).- The sampling refuter built 16^n environments. A function of eight parameters bounded 0..100 took
lumec4.9 s
with noensuresand more than 100 s with one;lume proveran out of memory. Both engines now
keep the full product only up to 65536 environments and otherwise sample the diagonals (every parameter at its c-th
smallest / largest point, so the corners of a box of bounds are always tried) and a bounded sub-product. Measured
after the fix: 0.12 s for 8, 12 and 16 parameters; the false boundresult <= 100is still refuted with[V0001]
at the cornerp1 = ... = p8 = 100. The refuter only finds counterexamples: sampling less never proves anything. lcaasreportedprovenwherelumeckept the check, for a contract oversimd_add4_i64/simd_sub4_i64
without a range and for a callee whose name is a parameter: its second attempt proves the cleaned certificate term,
which reads the intrinsic as4 * (a + b)and inlines the program function of that name. Where a contract can reach
either, only the verdict of the compiler's engine counts now (cs_w14_unclean).vnia_split_starsplit an opaque key at a*inside its parentheses. Examined: that was incomplete, not unsound
(the two halves are unbalanced strings that no row mentions, so their lemmas constrain fresh variables only); it now
splits at depth 0.
Security (Red Team Round 4 — prover, certificate kernel and assembler soundness)
Each item below was a reproducible FALSE theorem reported as proven (the compiler elided the runtime check and the
program printed a wrong answer), found by an oracle-checked fuzzer and by adversarial review. Every fix ships a
regression in tests/harness/claude_audit_gate.src (cag_check_redteam_r4) and, where a guard was added, a compiler
mutant that the gate must kill (cag_check_compiler_mutants).
-
ensuresread a body-levelletthat shadowed a parameter (fn f(x, y) ensures result == x = let x = y in xwas
proven). Postconditions are now resolved in the parameter scope only; certificate terms rename body binders apart. -
requireswas no longer checked at run time onceensureswas proven. A proof ofrequires => ensures
discharges the postcondition check only; the precondition check stays (callers are not all verified). -
bit_shlwas modelled as multiplication without a range guard (it wraps at 64 bits) andbit_shrof a negative
constant was folded with truncation (it is an arithmetic shift:bit_shr(-9, 1) == -5); the sampler had the same bug. -
Quantifiers: the prover's internal symbol
_q<d>_<name>could be spelled by a parameter; anexists_range
witness was substituted under aforall_rangethat rebinds the witness's variable. Quantified symbols are now
unspellable and substitution is capture-avoiding and binder-aware (compiler and kernel). -
Name-based models: a program function called
clone,verify,dec_add, ... was verified as the builtin of that
name while the generated code called the user's function;old,forall_range,exists_rangecould be redefined
([R0201]now). The array / separation-logic theories apply only when the definitions present are the canonical model. -
lcaascarried a second, diverging copy of the decision procedure. Itsprovenverdict now comes from the
compiler's prover (use lumec), so there is one engine to audit. -
lcertkernel: accepted two false proof terms (witness capture, quantifier-symbol collision); fixed, with
regression tests incompiler/stage1/lcert.srcand in-process fuzzing of the kernel. -
Fourier–Motzkin now eliminates the cheapest variable first and drops trivially true / duplicate rows (sound: it only
weakens the system), which restores the bounded non-linear proofs ofself-prove. - New
tests/harness/prover_fuzz.src/prover_fuzz_gate.src: random expressions over a box, brute-force oracle, false
contracts one past the true extrema; lumec must keep the check, lcaas and the kernel must not prove. -
Kept
requireschecks found two real precondition violations in shipped code: the OpenTPU pipeline called
otpu_qact_dequant_subblockwith shift 4 (specified for 0..3; callers now saturate throughotpu_qact_da_sat), and
lumeputer_stack_pop_frame_sprejected the stack pointer its ownpushproduces (precondition restated as
sp_bytes + frame_words * 4 <= 32768). -
lasm(differential against GNU as,tests/harness/lasm_gate.src): five instructions were encoded with different
bytes than GNU as (movzbl %sil/%dil,testq/testbandxchgqwith a memory source,vmovdqufrom%ymm8-15to
%ymm0-7,int $3), and a large class of input was accepted and silently mis-assembled (operands on zero-operand
instructions,pushq $imm/pushq mem, unknown suffixes such asaddwencoded as 64-bit, immediates and displacements
that do not fit,%rspas index, invalid scales, hex/octal literals, unknown directives dropped with their data, ...).
All of it is now a hard[L0001]error with no output bytes. The gate generates 39,968 instruction lines in 21
families and compares them byte for byte with GNU as on every run, checks 1,467 documented alternate encodings by
disassembly, and requires 176 invalid lines to be rejected. Compiler output is byte-identical before and after. -
compiler/stage1/m1_prover_ok.src:bv_shift_scaleclaimedbv_shl(x, 3) == x * 8for everyx >= 0, which is false
past 2^60; it now carries the bound that makes it true.
Added (Wave 11 — certification tools, Domains #112..#115)
ltv(compiler/stage1/ltv.src,lume tv): translation validation of the x86-64 textlumecemits, per integer
function, against the lowered AST (trap equivalence, value in%rax, division / modulo / call effects, frame
discipline).tests/harness/tv_gate.srcmutates every instruction of a fixture and requires every
behaviour-changing mutant to be rejected.lmcdc(lume mcdc): decision and masking MC/DC obligations of the lowered AST, every witness run on the real
binary; obligations without a witness are reported as theorem-false, infeasible (proved by thelcertkernel) or
uncovered.lsafety_envelope(lume safety-envelope): 2oo2 lockstep of the native x86-64 channel against the LumePuter
RV32IM monitor under a cycle budget and a validltvcertificate; any other outcome latchesSAFE_STATE_TRIP.
examples/safety_envelope/critical_kernels.srcholds the kernels,safety_envelope_gatethe fault injections.soak_battle_gate(lume soak): collector stress, OS fault injection, concurrent determinism, and a
hash-chained telemetry ledger.lqualify(lume qualify): probes, module batteries and gates behind a bidirectional traceability matrix; writes
the TOR, TQP, RTM, evidence and dossier tobuild/certification/. It is developer evidence, not a qualification.
Added (Wave 12 — industrial tools, Domains #116..#121)
@no_alloc([E0210], transitive over the call graph),--keep-proven-checks/--critical, linear
channels ([E0305]) and lock-rank / wait-cycle checks ([E0306]) in06b_phase3.src;lconcurrency.srcand
tests/harness/concurrency_gate.src.- DWARF v4 from
lumec --dwarfandlasm(.debug_abbrev,.debug_info,.debug_line,.symtab,.strtab)
and the incremental proof cachelproof_cache.src([PC0001]..[PC0005]);dwarf_cache_gate. lcrypto_tls.src+stdlib/crypto.lume: SHA-256/512, HMAC, HKDF, ChaCha20-Poly1305, Ed25519, the TLS 1.3 key
schedule and record layer, checked against the official vectors bycrypto_tls_gate.- AArch64 / RV64 / RV32 kernel back ends (
larm64.src,lriscv.src,lkir.src) with their own translation
validator (ltv_multiarch.src);multi_arch_gatecompares encodings with LLVM's assembler and executions on
qemu-aarch64,qemu-riscv64and the LumePuter. - Neural cartridges (
lneural_cartridge.src,--target safetensors): a/ pureinteger function as RV32IM words
and integer SwiGLU weights in a.safetensorsfile;safetensors_gate.
Added (Wave 13 — closure audit)
- X25519 (RFC 7748) and the TLS 1.3 handshake state machine in
lcrypto_tls.src, with their vectors and
fail-closed negatives incrypto_tls_gate. lcert --check-source <file.src>(lume verify-cert --check-source): the certificate kernel reads the contracts
of the source itself and refuses a certificate whose obligations are not those of that file;
tests/harness/cert_source_gate.srcforges re-hashed certificates that the plain kernel accepts and the binding
check must refuse.[C0010]intv_gate: a branch-free@secretfunction is validated, the same+that is validated in a
public function is rejected in a secret one, and three injected leaks (branch, memory access, division) are each
rejected with their reason.lumecfront end before the multi-ISA lowering:ltargetreleases no AArch64 / RISC-V image for a kernel that
lumecrejects ([T0902];[T0903]whenlumeccannot be found);multi_arch_gatechecks it on three triples.tests/harness/realtime_gate.src:@no_allocand--keep-proven-checkshad no test. Seven[E0210]
rejections, zero allocations measured withheap_stats()over the accepted kernels, and the keptensurescheck.lqualify: seven more gates (G-DWARF-CACHE,G-CONC,G-CRYPTO,G-MARCH,G-SAFETENSORS,G-REALTIME,
G-CERTSRC; 16 gates, 70 probes, 31 low-level requirements in all),
their requirements and positive / negative probes, a ninth high-level requirement (traceability and binding of
records), a SHA-256 chain over the sections ofQUALIFICATION_EVIDENCE.json, a detached Ed25519 signature
(QUALIFICATION_EVIDENCE.sig.json, developer key outside the repository) and@verify <dir>to re-check a package.- Driver:
lume build --dwarf|-g,--keep-proven-checks|--critical,--target safetensors [--entry <fn>],
lume proof-cache,lume qualify --verify, and the Wave 12 gates as commands. The help text listed these options
before the driver implemented them. - Installer (
scripts/install.src): the Wave 11-12 binaries, their sources andstdlib/are installed and hashed
inMANIFEST.sha256. docs/certification/: the generated TOR, TQP, RTM and dossier of the qualification run, with the public signing key.
Fixed (Wave 13 — closure audit)
lsentience.srccalled seven Wave 12 domain kernels with the wrong number of arguments, solsentienceand
lume_driverno longer compiled ([R0202]).lcaas.srchad lost@mode bind-raw/bind-raw-source(lume adapt c --preprocess), soc_adapter_gatefailed;
restored.- Help and domain texts named
[E0300]/[E0301]for@no_alloc; the compiler emits[E0210]. lcaaseffect inference was exponential in call depth: it re-inferred the body of every callee without a
declared effect row at every call site.lume prove compiler/stage1/lcrypto_tls.srctook 180 s (past the driver's
120 s budget) against 3 s inlumec; with a per-program memo it takes 4 s. Output is byte-identical on eight
modules compared before and after.lcaascertificate terms could capture a variable: flatteninglet y = (let t = v in b1) in bmovedband
the postcondition under the callee's bindert, so a caller parameter calledtwas captured. The verdict was
never affected (the prover binds through environments,06b_phase3.srchas no such rewriting), but the term in
the certificate stated something about the wrong variable. The binder is now renamed;cert_source_gateand the
lqualifyprobesP-CAP-POS/P-CAP-NEGhold the regression.lcert --check-sourcereads the SIMD intrinsicssimd_add4_i64/simd_sub4_i64aslcaaslowers them, so
compiler/stage1/lstd.srcbinds 117 of 117 obligations.
Added
- Compact values. A value is one word: an integer of 63 bits and a string of at most 7 bytes live in it and never touch the heap, and
intkeeps its full 64-bit range through a 16-byte cell used only past 63 bits. A constructor without fields is one static cell, a string literal is a static cell,atandchrnever allocate. A constructor costs 8 bytes plus its fields (Conswent from 56 to 24), a record 8 bytes plus its values with one static shape (3 fields went from 88 to 32).matchcompares one word and field access compares interned keys. - Direct code. The code generator keeps the value in
%rax, loads literals and locals straight into registers, does tagged arithmetic inline with one overflow test, and turns a comparison insideifinto a compare-and-jump. - The compactor.
mem_pack/mem_unpack(LZ4 block format, bounds-checked decoder, corrupt input stops) andarena_freeze/arena_thaw: an arena is compressed page by page, its memory goes back to the OS, pointers stay valid and a frozen page returns on first touch.LUME_ARENA_COLD=<n>freezes an arena unused forncollections..lcapsand.lumbare stored packed when that is smaller,lume packandlume unpackwork on any file. @secret fnandarena_mark_secret: a secret never reaches the compactor, because decompression time depends on the bytes ([C0009], secret arenas stop at run time). The compactor also has no place under@bound([V0002]).tests/memory/atomic_compactor_ok.srcholds the cell sizes, the zero-allocation paths and the compactor to measured numbers.tests/memory/value_matrix_ok.srcruns every operation over the boundary values of the word and pins one digest per group to the answers of the cell representation.value_edges_ok.srcholds the cases where an earlier answer was wrong, andfreestanding_values_ok.srcrunsxs[i],s[i]andcounton the kernel runtime in QEMU.[R0201]covers the prefixes of the runtime (__rt_,__gc_,__lume_,__c_,__k_,__r_,__isr_,__cpu_,__krn_,__net_), and the runtime's internal labels are.Lrt_*, which no Lume name can spell. A probe with one function per runtime label found 396 of 450 labels free to be replaced by a user function, silently.[L0010]:lasmrejects a symbol defined twice. It used to keep one of them, which is how a stale routine could survive a merge.- Native memory reclamation. The hosted runtime now collects garbage: a non-moving mark-sweep collector with lazy sweeping that returns memory to the OS.
LUME_GC=on|off,LUME_GC_STRESS=<n>, andgc_collect()/gc_count()inuse arena. Limits are stated indocs/38-memory-management.md. [O0004]: aresource typevalue held by aletmust be consumed on every path.[O0013]: a move, mutable borrow, or use that conflicts with a borrow used later is rejected. Borrows end at their last use.lume: stack overflow (recursion too deep), exit 12, instead of a silent SIGSEGV. The stack limit is capped at 4 GiB.tests/harness/ownership_gate.src,runtime_sync_gate.srcandgc_gate.src, also run in CI. The ownership gate also holds every fail-closed fixture and everycompiler/stage1/*_ok.srcto the same verdict fromlumecandlcaas.lcaasruns the real compiler. It importslumec.srcand compiles every request in process, so the oracle can no longer accept whatlumecrejects. Its own parser only recovers an AST from a broken program. Over the 547 programs in the repository the two now agree on every verdict and every error code; before this change they disagreed on 115.ctfailand the runtime's own stops can be caught in process with__lume_try_begin(),__lume_try_end()and__lume_try_msg(), nested up to 16 deep, which is how a compile error becomes a diagnostic instead of ending the oracle.compiler/stage1/name_flow.src: name resolution shared bylumecandlcaas. The oracle lists every undefined name at once, and[R0201]rejects a function named after a runtime routine.lume agentresolvesuse. A program with imports is compiled as the bundle the build would use, while analyses and spans stay on your file. A module that cannot be found is[R0300], in JSON.- Integer overflow stops the program (
lume: integer overflow, exit 3) for+,-and*.+%,-%and*%wrap on request. This is what makes contract proofs over the integers hold on real machine integers. xs[i]in native code, on any value on the same line (f()[0],"s"[1],[1, 2][0]), for lists and strings. Past the end stops the program.- First-class functions: a named function can be passed, stored and returned as a value, in a list, a record or a constructor, and closures work at any arity. A call result can be called (
mk(1)(2)), an immediately called lambda works with no arguments, a higher-order function needs no closure elsewhere in the program, a top-levelletcan hold a function, and functions withownormutparameters can be used as values. Before, only arities 1 and 2 were dispatched, and any other answered 0. [R0202]covers builtins, soslice("abc", 1)is rejected instead of reading a garbage register.[R0203]rejects a call to an internal routine of the runtime, such asstrlen.[C0002]stops the build on a name with no storage, which used to read an arbitrary stack slot.- A program that passes
lume checklinks. A call that lowering left unresolved is rejected before code is generated: a routine from a module the program did not import ([R0200], naming theuseto add), a form of a compiler intrinsic that has no meaning, andf[i]on a function ([R0204]). These used to stop at link time. [R0205]rejects a call whose name is both a local and a builtin or intrinsic.fn f(get) = get(1)used to ignore its parameter and return 1.- Comparisons do not chain.
3 > 2 > 1compared a boolean with 1 and printed 0. It is now[P0002]. [R0202]coversConsandNil, in expressions and in patterns, unless the program declares its own. ACons(a)arm used to match nothing, silently.- Comptime arithmetic reports overflow as
[C1001], inlumecand in the oracle, includingmin / -1. It used to stop the compiler with no code. trueandfalseare values.print trueused to crash, andfn f() -> bool = trueprinted nothing.type Name = strnames a base type. It used to declare an enum with a variant calledstr.[R0202]rejects a call with the wrong number of arguments. It found three such calls inlcaas, each of which read garbage from a register.[D0002],[D0003]and[D0004]reject a name or a type defined twice in a bundle, which used to let one silently replace the other, and a record field given twice.[T1002]rejects amatchthat names variants of a declared enum, has no catch-all, and leaves one out.- Declared types are checked on every branch.
-> intis enforced on eachifandmatcharm, where one fitting branch used to excuse another, and a typed record literal has to give every field. [L0003]rejects an integer literal that does not fit in 64 bits, which used to wrap.tests/memory/:values_ok,list_index_ok,list_index_fail,list_index_type_fail,int_wrap_ok,type_error_fail,div_zero_fail,dyn_type_fail,closures_ok,closure_arity_fail,fn_values_ok.
Fixed
exists_rangeandforall_rangeending at the top ofintstepped past it, wrapped, and answered with the wrong value. They now stop at the last integer of the range.- Strings with a NUL byte compared as C strings:
<=and>=could both hold while==did not, and amatchon"a"took"a" + chr(0). Equality, order and patterns now compare the whole string, length included. - Five generators emitted JSON one closing brace short: the report of
lume economy, the registry errors,model_export_onnxand the traces of the EGM and NCM engines. Each closed an object opened by an earlier piece of a concatenation with}}, and a literal outside an open{reads that pair as one brace. They now write\}\}. chr(n)outside 0..255 kept the low byte. It now stops the program.bit_and,bit_or,bit_xor,bit_shl,bit_shr,bit_not,os_arg_at,fs_read_file,fs_read_dirandfs_path_existsread a value of the wrong kind as if it were the right one and answered anyway. They now stop with a type error.xs[i]andatcheck the kind of the value before the position, so a wrong kind reads the same whatever the index."abc"[3]printed nothing and went on.xs[i]on a string now stops past the end, as it does on a list, andat(s, i)keeps its""for scanners.toint("-42")was 0.tointnow reads a sign, and reaches the most negative integer.- An index or a position that is not an integer used to read the object as if it were one.
xs[i],at,slice,slicenandchrnow stop with a type error. - Value corruption through Perceus reuse:
let b = a in let c = f(own a) in bcould observe the cell overwritten in place. Reuse now requires every call site to pass a provably unique value, and otherwise allocates. - Ownership holes: moves now reach aliases, containers, parts and closures; moving out of a borrowed value is caught through aliases and match patterns; borrows can no longer escape through records, constructors or match results.
- Heap corruption with C code: the runtime no longer uses
brk, whichmallocshares. The same fix makes a Lume.sosafe to load next to another Lume runtime. cell[T]aliasing: cells lived in a 240-entry ring and silently overwrote each other. Each cell is now its own heap slot, and holds any value.- String interpolation overflow in the seed: an interpolated value longer than the literal wrote past its buffer.
fs_read_diroverflow: a directory growing between the two passes overran the listing buffer. The listing is now truncated to what was counted.lcaasnested patterns:Cons(a, Cons(b, t))produced a corrupted AST and reported success. The oracle now parses nested patterns and shares the ownership analysis withlumec.lume fmtcorrupted source files. Its own parser knows only part of the language: of 234 valid programs, 96 stopped compiling or changed meaning, and the file was rewritten with exit 0. A statement is now replaced only when the compiler's parser reads the same program from both texts and it holds no comment. Everything else stays as written.fn f(x: int) -> bool = x > 0compiled to an error. A comparison,and,orandnotnow have typebool, which is still accepted where anintis expected.{ r with a: 1 }on a value of unknown shape lost fields. The compiler guessed a record with that key, so{a, b, c}came back as{a, b}, or as{a}when it found none. The update now happens at run time and keeps every field.- Integer patterns past 32 bits matched the wrong value.
4294967297 => ...was truncated, so it matched1, and never matched itself. - A local now shadows a top-level function when called. The call used to go to the top-level function, so
fn g(f) = f(1)ignored its parameter whenever a functionfexisted. with handlerandwith allocbodies skipped lowering. Constants,xs[i], record updates, generics, closures and function values inside them read garbage or failed at link. They now go through every pass, and type checks reach handler bodies.slicentrusted its length argument and could read past the end of the string. The length now comes from the string.INT64_MIN / -1and% -1reportlume: integer overflow, and division by zero reportslume: division by zero. Neither depends on SIGFPE any more, so the oracle survives them.[T1002]no longer rejects amatchwhose tags are in two enums when it covers one of them.- Untyped code fails closed. These used to continue with a made-up value and now stop with a message and exit 3: a
matchwith no arm for the value (was 0), a missing record field (was 0), arithmetic or<on a non-integer (read the object's length), a condition that is not a boolean,tointpast 64 bits. - Field access on a non-record read the value's bytes as pointers, so
x.bon a string dereferenced its text. It now reports a missing field. printof a tag-4 list printed<opaque>after the closing bracket and crashed, on the seed path.- Records at compile time:
comptime({a: 1, b: 2} == {b: 2, a: 1})was false while the same expression is true at run time. lcaasresult: aprintthe evaluator could not compute was dropped silently, andstr()of a compound value or a record comparison could give a wrong line. A line it cannot compute now reads<runtime>.str()of a list, record or constructor returned a fragment of the value. It now gives the textprintshows.- Top-level
letwith a side effect ran at every use. It now runs once, in source order. Pure constants stay inlined. - String builtins given a non-string read the wrong object. They now stop with
lume: type error: this operation needs a string, exit 3. - Division by zero died with a bare SIGFPE. It now reports
lume: division by zero or integer overflow, exit 3. printof a string with a NUL byte stopped at the NUL.- Perceus uniqueness: exemptions in the use count let a value reach two owners. A use now counts exactly once on each path, with no exemptions.
Changed
-
Runtime source: the hosted runtime moved out of two diverging copies into
compiler/stage1/runtime_core.lume, one instruction per line. -
Arenas no longer pin the heap. Each is its own mapping and
arena_destroyreturns it to the OS. Theheap ceiling pinnederror is gone. - Perceus reuse narrowed: the compiler's own AST passes now allocate, because the parser's output is not provably unique.
-
Bootstrap and tool builds pay for the embedded compiler: every tool that imports
lcaasalso carrieslumec, so building them takes longer. Seedocs/PROJECT_STATE.mdfor the measured cost. -
lume agent checkon a.lumeStage-0 file used to answerok:truefrom a garbage parse. It now reports what the self-hosted front end sees, usually[R0300]foruse io. Uselume checkfor Stage-0 files. -
Seed: 64-byte values and a collected heap.
SEED_FREEZE.sha256updated; output onlumec.srcis byte-identical to the previous seed. -
lume: out of memory (heap exhausted)replaces thebrk failedwording. -
Stricter
.srcparsing (may reject code that previously compiled):letrequires=; aletbody on the same line requiresinor;(a new line still works); duplicate binders are rejected in function and lambda parameters, tuple/recordletand patterns;matcharms require a pattern (=> 1is[P0002]); decimal patterns are[P0002]in every arm position and in Stage-0; stray top-level tokens are[P0002]. -
[L0002]for unsupported string escapes:\q-style escapes no longer silently drop the backslash.\0is rejected natively because native strings are NUL-terminated.\band\fnow decode to the real control bytes (they previously became the lettersbandf). -
notprecedence:notbinds looser than comparison and tighter thanand, sonot 1 == 2is1, in both native and Stage-0. -
\$escape:"\${x}"is a literal$in front of a hole.${x}itself stays an alias of the hole{x}.
Added
- List literals in
.src:[],[a]and[a, b, c]lower toNil/Conschains;countmeasures aConschain. - Stage-0 parity: next-line function and branch bodies parse in
data_parser.lume(they silently evaluated to0before); unknown atoms are errors rather than0;data_asmgen.lumelowersforall_range/exists_rangeand preserves lexical shadowing forlet,matchand quantifier binders. - Gates:
semantic_ergonomics_native_ok,tests/conformance/stage1/fail_closed/<code>_*.src(each fixture must be rejected with<code>), anddocs/install.shinscripts/check-version-coherence.sh.
Fixed
- String braces: interpolation now scans the raw token, so
\{and\}can never open or close a hole ("{\{x}"is{{x},"{x\}"is{x}), and}}is an escape only outside an open literal{, so"{\"a\":{\"b\":1}}"keeps both braces. This also repairs JSON constants in the toolchain that were losing a closing brace. The[P0002]hole diagnostic prints the{{/}}escape correctly. - Structural equality (
==on constructors, records and lists) runs in constant native stack on any shape, in all three runtimes. ./lumefresh-clone bootstrap reports compiler errors and stops instead of exiting silently with an emptylume_driver.s.- Stale binaries after a compiler change: the
lume buildandlume testcaches are keyed on thelumec,lasmandltestbinary hashes as well as the source, so an upgraded compiler can no longer return a binary built by the previous one. - Protected builds are never served from the binary cache, so
--profile=releasealways emits its.lsymsidecar. .gitattributes: restored the Linguist and binary rules alongside the repo-wide LF default.docs/install.shdefaults tov1.1.0.