VX
Vexel Architecture Ownership, passes, residualization, emission

Role: Architecture

The frontend decides semantics; backends decide realization.

Vexel architecture is strict about ownership. Semantic decisions are resolved before backend emission. Backends receive an analyzed/residual contract and focus on target strategy.

Language law is resolved before emission strategy begins.

Ownership Model

Frontend owns

Parsing, resolution, typing, monomorphization, CTE, DCE, analysis facts, and concrete type-use validation.

Backend owns

Code emission strategy, ABI realization details, and target-specific implementation choices over analyzed input.

Canonical Stage Order

  1. Module load
  2. Name/scope resolution
  3. Type checking
  4. Monomorphization
  5. Lowering
  6. Optimization fact collection
  7. Analysis passes (effects, mutability, reentrancy, usage, variants)
  8. Type-use validation
  9. Live declaration pruning
  10. Backend emission

Residualization and Emission Concept

The frontend resolves and executes what can be proven at compile time, then residualizes only behavior that must remain runtime-visible. Backends should not re-interpret language semantics; they should emit target code from this residual contract.

typed AST -> lowered analyzed graph
        -> CTE + DCE + analysis facts
        -> residual program contract
        -> backend-specific emission

Invariants and Release Gates

Invariants are guarded by tests, pass checks, and architecture-focused suites.

make test
make ci
make frontend-test
make backend-conformance-test
make docs-check

Extension Points

  • Backends: backends/<name>/ and backends/ext/<name>/
  • Registry contract: frontend/src/support/backend_registry.h
  • Driver entry: driver/src/vexel_main.cpp
  • Discovery/build wiring: Makefile, driver/Makefile

Related Routes