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

Selfhosting

Definition

For this project, true selfhosting means the compiler is capable of compiling its own Semantic source into the next compiler executable.

The intended proof is:

Stage 1 compiler
    ↓ compiles
msplc-selfhost.se
    ↓
Stage 2 compiler
    ↓ compiles the same source
msplc-selfhost.se
    ↓
Stage 3 compiler

A strong bootstrap check compares Stage 2 and Stage 3 behavior/artifacts under a deterministic build contract.

What does not count

The following may be useful during bootstrap engineering, but they are not the final selfhosting proof:

  • embedding a previously compiled EXE into .se comments or data;
  • extracting/replaying a seed executable;
  • invoking Go/C/C++ as the hidden implementation of the Semantic compiler;
  • replacing unsupported semantics with silent stubs.

Bootstrap stages

flowchart TD S0[Bootstrap implementation] --> S1[Stage 1 MSPLC] SRC[Semantic compiler source] --> S1 S1 -->|compile SRC| S2[Stage 2 MSPLC] SRC --> S2 S2 -->|compile SRC| S3[Stage 3 MSPLC] S2 --> V{Behavior / deterministic artifact check} S3 --> V

Why object-first debugging helps

The compiler is too large to treat every failure as a monolithic “EXE build failed”. COFF staging gives a finer-grained milestone:

  1. parse/index Semantic compiler modules;
  2. lower individual compiler units;
  3. emit valid object artifacts;
  4. resolve cross-unit symbols;
  5. link the compiler executable;
  6. use that executable for the next bootstrap stage.

Current status

The project has moved beyond a seed-only demonstration: real compiler .se units are being lowered into native objects. Full Stage 2 → Stage 3 selfhosting is still a work in progress and should not be claimed until the same Semantic compiler source can produce the next compiler end-to-end.