Speak in meaning. Think beyond syntax. Built beyond language.

Semantic Programming Wiki

Semantic-first compilation, Universal AST, native x86-64 and the road to true selfhosting.

Status Target IR Formats

is the experimental native compiler path around the Semantic Programming representation used by Code Transpiler. The project is built around one core idea:

SemanticProgram = Universal AST = canonical IR

Source languages are lowered into a language-independent semantic program. Backends consume that semantic graph directly and either emit source, validate semantic contracts, or lower to native machine code and object/executable formats.

The big picture

flowchart LR A[Source language] --> B[Frontend] B --> C[SemanticProgram / UAST] C --> D1[Source emitter] C --> D2[Semantic runtime] C --> D3[Native x86-64 backend] D3 --> E[COFF .obj] E --> F[PE .exe] C --> G[.se / .sp / .spz]

What this wiki covers

  • how the Semantic formats relate to each other;
  • how the Universal AST is used as the canonical program representation;
  • how native Windows x86-64 compilation works;
  • how the current per-unit object build/debug pipeline works;
  • what true selfhosting means for ;
  • how to diagnose unresolved bindings, member layouts and backend gaps;
  • how to contribute without hiding unsupported semantics behind fallbacks.

Current selfhosting goal

The target is a real compiler bootstrap chain:

.exe -selfhost.se stage2.exe
stage2.exe -selfhost.se stage3.exe

The important requirement is that the compiler source is genuine Semantic source and the next compiler is produced by the compiler itself. Embedding or replaying a prebuilt executable is not considered selfhosting.

Start here

  1. Read Getting Started for the practical build flow.
  2. Read Architecture to understand the canonical IR.
  3. Read Semantic Formats for .se, .sp and .spz.
  4. Read Native Compilation for x86-64/COFF/PE.
  5. Read Selfhosting for the bootstrap definition and milestones.
  6. Read Object Build & Debugging when working on the current compiler bootstrap.

Design principles

  • One semantic truth. UAST is canonical; compatibility views are derived.
  • Fail closed. Unknown or unsupported semantics must produce an explicit error.
  • No fake success. A backend must not silently drop fields, facets or relations.
  • Deterministic transport. Semantic formats are intended to preserve the same program meaning.
  • Incremental native progress. Object artifacts are persisted as soon as a unit succeeds.
  • Selfhosting means selfhosting. No embedded seed executable in the final bootstrap proof.

Next: Getting Started →