Skip to content

l0-v2.0.0

Latest

Choose a tag to compare

@github-actions github-actions released this 28 Aug 14:04
Immutable release. Only release title and notes can be modified.

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

  • case defaults now use _ => exclusively. The deprecated case ... else form from 1.1.0 has been removed from both
    compiler stages; a stray else arm is rejected with PAR-0123.
  • match validation 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, and case alternatives, 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. --gen moves from -g to -Gc; --log from -l to -Vl;
    --project-root / --sys-root from -P / -S to -Rp / -Rs; --c-compiler / --c-options from -c / -C to
    -Cc / -Co; and --runtime-include / --runtime-lib from -I / -L to -Ri / -Rl. The corresponding long
    options are unchanged.
  • -V now selects --version; -Gk selects --keep-c; -Va / -Vm select ARC and memory tracing; and -Sb / -Su
    select the new basic and unchecked runtime modes.
  • -c / --compile and ordered -I / --interface-path values establish the shared separate-compilation surface.
    They remain reserved in L0 2.0.0: compile mode reports L0C-9510 without analyzing source or producing artifacts, and
    its interface paths are not searched.
  • Conventional -g, -S, -L, and -l spellings 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-source values add intact C source inputs to --build and --run after 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-basic keeps exact-base validation, quarantine, null and alignment checks, generation caches, and
    invalid-drop diagnostics while compiling out interior-pointer containment checks. --unchecked explicitly compiles
    out pointer tracking, validation, and quarantine for release-oriented builds; both options are valid with --build,
    --run, and --gen and are incompatible with trace modes as documented.
  • sys.memory adds rt_register_foreign and rt_unregister_foreign, allowing checked L0 code to describe the extent
    and mutability of externally owned storage without transferring ownership.
  • Raw allocations, new allocations, ARC storage, static data, and registered foreign storage now retain distinct
    release contracts. Cross-family drop, rt_free, and rt_realloc operations 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 let initializers and lowers supported static nullable literals and
    intrinsics. Static ord calls 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-dea package 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 test runs normal L0 validation without the dedicated broad Stage 2 trace sweep; make test-all adds that
    sweep. Runtime-sensitive work can still run make test-stage2-trace directly.
  • 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-runtime provides 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 ... else default with _ =>. The 1.1.0 deprecation period has ended, and PAR-0242 plus the
    former dangling-else diagnostics 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, -c no longer selects the host C compiler, -I no longer selects runtime
    headers, and -L no 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-source for 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-basic or --unchecked only 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.