Dea/L0 2.0.0
Dea/L0 2.0.0 is a major release focused on checked pointer safety, safer native compiler execution, cross-stage
correctness, and shared editor support. It completes the transition to wildcard-only case defaults and reorganizes
short compiler options around a coordinated, extensible CLI contract.
Language and source contract
casedefaults now use_ =>exclusively. The deprecatedcase ... elseform from 1.1.0 has been removed from both
compiler stages; a strayelsearm is rejected withPAR-0123.matchvalidation now rejects nested or wrong-owner patterns before binding them and computes exhaustiveness and
wildcard reachability from validated enum variants.- Definite-liveness analysis now isolates
if,match, andcasealternatives, ignores unreachable alternatives when
joining ownership state, and preserves the correct state after fallthrough. - Self-hosted name resolution now distinguishes exact binding identities across declaration order, active scope chains,
pattern payloads, and cleanup guards.
Command-line interface
- Short options now use stable namespaces.
--genmoves from-gto-Gc;--logfrom-lto-Vl;
--project-root/--sys-rootfrom-P/-Sto-Rp/-Rs;--c-compiler/--c-optionsfrom-c/-Cto
-Cc/-Co; and--runtime-include/--runtime-libfrom-I/-Lto-Ri/-Rl. The corresponding long
options are unchanged. -Vnow selects--version;-Gkselects--keep-c;-Va/-Vmselect ARC and memory tracing; and-Sb/-Su
select the new basic and unchecked runtime modes.-c/--compileand ordered-I/--interface-pathvalues establish the shared separate-compilation surface.
They remain reserved in L0 2.0.0: compile mode reportsL0C-9510without analyzing source or producing artifacts, and
its interface paths are not searched.- Conventional
-g,-S,-L, and-lspellings are reserved for debug information, assembly output, library search
paths, and library selection. L0 recognizes complete uses but reports that these capabilities are not yet implemented. - Repeatable
-Cs/--c-sourcevalues add intact C source inputs to--buildand--runafter the generated C input
and before output and runtime-library options. - System roots now take precedence over project roots during module lookup; declaration order remains stable within each
root group.
Checked runtime and ownership safety
- Fully checked builds now track allocation families and validate generated pointer reads, writes, and drops for live
provenance, extent, alignment, access direction, and read-only storage. Freed user allocations remain in a bounded
quarantine so stale accesses can fail deterministically with allocation and release context. --check-basickeeps exact-base validation, quarantine, null and alignment checks, generation caches, and
invalid-drop diagnostics while compiling out interior-pointer containment checks.--uncheckedexplicitly compiles
out pointer tracking, validation, and quarantine for release-oriented builds; both options are valid with--build,
--run, and--genand are incompatible with trace modes as documented.sys.memoryaddsrt_register_foreignandrt_unregister_foreign, allowing checked L0 code to describe the extent
and mutability of externally owned storage without transferring ownership.- Raw allocations,
newallocations, ARC storage, static data, and registered foreign storage now retain distinct
release contracts. Cross-familydrop,rt_free, andrt_reallocoperations fail in checked builds. - Allocation tracking now purges tombstones and contracts after live occupancy falls, uses cache-oriented hot records,
and supports configurable quarantine byte and record limits. Repository-built Stage 2 compiler binaries default to
basic checking with a 256-record quarantine; programs produced by the compiler remain fully checked unless their own
options select another mode.
Compiler correctness and portability
- Parenthesized casts preserve borrowed ARC identity, and non-niche nullable place wraps retain exactly once across both
L0 stages. - Expression-analysis replay now reuses cached semantics without duplicating ownership, while native analysis safely
replaces owned result types and local callee copies. - Stage 2 now contextually checks top-level
letinitializers and lowers supported static nullable literals and
intrinsics. Staticordcalls lower to portable enum-tag constants instead of invalid C99 initializers. - Generated C escapes every historical trigraph spelling without changing runtime string bytes or filenames, and
anonymous Stage 1 C output is reserved and written through an exclusive file descriptor before host compilation. - Lexer recovery retains signed-literal expression context across invalid-token wrappers, preventing recovery from
reclassifying later operators or literals. - Normative Stage 1 diagnostics and CLI failures now go directly to standard error, independent of optional rich-log
formatting; operational logs and raw host-compiler replay keep their intended presentation. - Native Stage 2 build and run commands use exclusively reserved private workspaces under a validated temporary parent,
keep generated C, compiler captures, executables, and intermediate files inside that boundary, and clean up without
following links outside it.
Standard library and runtime boundaries
- Vector accessors now check logical length rather than reserved capacity, including typed, string, and token access.
Empty character buffers convert to""without reading a reserved but unused slot. - Filesystem operations reject empty paths before calling host metadata or deletion APIs.
- Whole-file writes now report failure when closing the output stream fails, including after an otherwise successful or
empty write. - Checked-runtime allocation-table contraction and host-alignment probing remain portable across supported C99 compilers
and 32-bit layouts.
Editor support
- The repository now includes distinct Dea/L0 and Dea/L1 syntax support for VS Code/TextMate, Vim, Emacs, and Universal
Ctags, with extension-aware language identities and incomplete-buffer coverage. - A self-contained
tree-sitter-deapackage provides the generated parser, L0/L1 fixtures, highlights, indentation,
locals, tags, corpus tests, and bindings for C, Go, Node.js, Python, Rust, and Swift. - Editor integrations are structural rather than semantic: the compiler remains authoritative, and this release does not
add an LSP, completion, hover, rename, or refactoring provider.
Documentation and developer workflow
- Compiler, ownership, runtime, architecture, backend, standard-library, diagnostic, installation, and project-status
documentation now reflects the checked runtime and the coordinated L0 2.0.0 CLI surface. - The monorepo now records shared and L0 architectural decisions in indexed ADRs and validates plan decision impact and
closure evidence in contributor workflows. make testruns normal L0 validation without the dedicated broad Stage 2 trace sweep;make test-alladds that
sweep. Runtime-sensitive work can still runmake test-stage2-tracedirectly.- Trace capture and analysis now stream large logs with bounded memory, while traced runtimes use selectable block
buffering with explicit process-boundary flushes. This removes trace I/O amplification without reducing full trace
coverage. - Vendored m.css documentation generation now accepts validated Doxygen 1.18 anonymous-compound names while retaining
strict rejection of malformed names, and documentation CI records the Doxygen version used. make bench-runtimeprovides an informational runtime allocation benchmark matrix, and the randomized production
source selector supports bounded deep source reviews. Unified and editor CI cover the corresponding shared workflows.
Compatibility and migration
- Replace every
case ... elsedefault with_ =>. The 1.1.0 deprecation period has ended, andPAR-0242plus the
former dangling-elsediagnostics have been retired. - Update scripts that use old short compiler options to the new namespaced spellings listed above, or use their
unchanged long forms. In particular,-cno longer selects the host C compiler,-Ino longer selects runtime
headers, and-Lno longer selects the runtime library directory. - Review projects that intentionally shadowed system modules with project-root modules: system roots are now searched
first. - Use
--c-sourcefor additional C translation units instead of smuggling source paths through compiler-option text. - Register externally owned buffers before checked generated code dereferences them, then unregister them before the
external lifetime ends. Use--check-basicor--uncheckedonly when the documented reduction in validation is
acceptable. - Do not index a vector between its logical length and capacity. Such access is now rejected even when backing storage
has already been reserved. - Tools that parse Stage 1 diagnostics should continue reading standard error, but must not depend on rich-log prefixes
around normative diagnostics.
Public-surface summary
L0 2.0.0 removes the deprecated case ... else spelling, replaces the legacy short CLI aliases, adds checked-runtime
selection and structured C-source options, and adds two foreign-memory lifetime functions to sys.memory. No public L0
types were added or removed, and compile-only/interface consumption remains reserved rather than implemented in this
release.
See the
full comparison between l0-v1.1.0 and l0-v2.0.0.
Release archives and generated API documentation are attached to this release. Use SHA256SUMS to verify downloaded
assets.