Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
136 changes: 69 additions & 67 deletions bootstrap/CONTRACT.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
# Bootstrap construction contract

[Whole-chain minimization](MINIMIZATION.md) owns the goal, architectural authority
and comparison policy. This contract defines what construction results mean.
The previous requirement for a single selected topology and formal correctness
certificates on every edge is superseded by that mandate. The Omega language's
ordinary proof checking and safety semantics are unchanged.
[Whole-chain minimization](MINIMIZATION.md) sets the goal, architecture rules,
and comparison policy. This document defines what construction results mean.
That mandate supersedes the earlier requirement for a single fixed pipeline and
formal correctness certificates at every step. Omega's ordinary proof checking
and safety rules remain unchanged.

<a id="selected-execution-chain"></a>

## Variant construction routes

Variants are peers, each with an explicit source route, seed, execution target,
resource profile and completion evidence. The original interpreted route uses the Delta compiler:
Variants are peers. Each variant specifies its source route, seed, execution
target, resource profile, and completion checks. The original interpreted route
uses the Delta compiler:

```text
Alpha VM + admitted Beta compiler tape
Expand All @@ -23,88 +24,89 @@ Alpha VM + admitted Beta compiler tape
-> Omega compiler recompiles its own source
```

Gamma evaluates the Delta compiler, whose output is Gamma source implementing
the Epsilon evaluator. That evaluator interprets the bootstrap compiler. An alternative
runs the Delta-written Epsilon evaluator directly with the Gamma-written
[Delta interpreter](delta/interpreter/), bypassing Gamma emission for this
Delta program. The Epsilon program itself still runs in the Epsilon evaluator. Its Alpha
serialization belongs to the Omega target. Alternative variants may compile
intermediate languages, change stages or use other execution targets.
Gamma evaluates the Delta compiler, which emits Gamma source for the Epsilon
evaluator. That evaluator runs the bootstrap compiler. Another route runs the
Delta-written Epsilon evaluator directly in the Gamma-written
[Delta interpreter](delta/interpreter/), skipping Gamma code generation for
that Delta program. The Epsilon program still runs in the Epsilon evaluator;
Alpha serialization belongs to the Omega target. Other variants may compile
intermediate languages, change stages, or use different execution targets.

The existing Alpha backend is a responsibility of the bootstrap compiler and the
Omega compiler; a Rust Alpha backend is not a prerequisite. Rust may remain a
development comparator and report a selected Alpha operation as unimplemented.
Native compilation must still handle an inactive Alpha Build binding according
to ordinary target-selection rules.
The bootstrap compiler and the Omega compiler own the Alpha backend; a Rust
Alpha backend is not required. Rust may remain a development comparator and
report a selected Alpha operation as unimplemented. Native compilation must
still handle an inactive Alpha Build binding under ordinary target-selection
rules.

## Source subjects

The bootstrap compiler implements enough Omega to compile the actual Omega
compiler closure. Every supported facility preserves its specified meaning;
unsupported cases fail explicitly. This does not permit weakening the product
Omega language, accepting invalid programs, or recognizing only particular source
files/AST shapes. Conservative authoring and a documented coverage subset are
permitted; two complete independent Omega implementations are not required.
The bootstrap compiler implements enough of Omega to compile the Omega compiler
source closure. Every supported feature keeps its specified meaning, and
unsupported features fail explicitly. Do not weaken the product Omega language,
accept invalid programs, or match only specific files or AST shapes.
Conservative authoring and a documented subset are allowed; two full,
independent Omega implementations are not required.

Each variant names its exact sources and dependencies. The existing interpreted
languages retain their declared ASCII source envelopes and manifest semantics
until that variant deliberately revises them and validates its consumers. Source
or manifest changes invalidate evidence about the old bytes.
Each variant names its exact sources and dependencies. The interpreted
languages keep their ASCII source rules and manifest formats until a variant
deliberately updates them and validates every consumer. Changing a source file
or manifest invalidates earlier evidence for the old bytes.

The [compiler request](../wiki/spec/build/compiler_request.md) owns the product
compilation boundary. A diagnostic single-source route is not evidence of complete
package/Build admission. [Terminal Psi](../wiki/spec/terminal-psi/product.md)
remains a product boundary, not a mandatory extra bootstrap language.
The [compiler request](../wiki/spec/build/compiler_request.md) defines the
product compilation boundary. A diagnostic single-source run does not prove
complete package or Build checking. [Terminal Psi](../wiki/spec/terminal-psi/product.md)
remains a product IR, not a required extra bootstrap language.

<a id="refinement-and-admission"></a>

## Construction and acceptance

For each executed step, identify the source, executing implementation, seed,
inputs, target, resource profile and resulting output. Distinguish malformed
source, unsupported coverage, authored runtime failures, exhausted resources and
implementation defects. Publish executable output only after successful
construction; stale output never establishes success of a failed invocation.
For every run, record the source, executing implementation, seed, inputs,
target, resource profile, and output. Distinguish malformed source, unsupported
features, program runtime failures, exhausted resources, and implementation
bugs. Publish executable output only after a build succeeds; stale output never
counts as success for a failed run.

A variant closes when its documented seed and repository sources construct the
Omega compiler, which rebuilds itself reproducibly under the same declared
source/target profile. Validate actual resulting compiler behavior, including
relevant rejection controls. The first compiled generation may emit different
bytes from its self-compiled successor; deterministic reconstruction within a
generation/profile remains required.
A variant is complete when its documented seed and repository sources build the
Omega compiler and that compiler rebuilds itself reproducibly under the same
source and target profile. Test the built compiler's actual behavior, including
rejection cases. The first generation may emit different bytes from its
self-compiled successor, but builds within the same generation and profile must
be deterministic.

Hashes bind identity, tests exercise behavior, and a source audit explains trust.
None alone is a formal compiler-correctness theorem. Report observations and
assumptions precisely. Comparisons with Rust or another variant are useful
independent diagnostics, not permission to replace the claimed construction.
Hashes identify exact bytes, tests check behavior, and source audits explain
why we trust an artifact. None of those alone is a formal correctness theorem.
Report observations and assumptions accurately. Comparisons with Rust or other
variants are useful cross-checks, not substitutes for the claimed build.

<a id="native-realization"></a>

## Acceleration and native execution

The [acceleration policy](MINIMIZATION.md#explicit-acceleration) permits explicit
jets and development compilers with reference validation and disclosed additional
trust. Their results must be labeled as accelerated. A host compiler that supplies
language meaning cannot be hidden as packing or invocation scaffolding. Retain
an executable reference route even when a complete cold run takes days.
The [acceleration policy](MINIMIZATION.md#explicit-acceleration) permits
explicit accelerators and development compilers when validated against a
reference route and documented with their extra trust assumptions. Label their
results as accelerated. Never disguise a host compiler that implements language
semantics as packing or launcher scripts. Keep a working reference route even
when a full cold run takes days.

Alpha seeds retain their written tape semantics, checks and platform-specific
implementation assumptions. Stamping a tape into its VM container does not
compile that program to native instructions. A native variant owns its instruction,
ABI and executable-format behavior and the added audit burden. Measured execution
on one host is not evidence of execution on a different host.
Alpha seeds keep their written tape semantics, checks, and platform
assumptions. Stamping a tape into a VM container does not compile that program
to native machine code. A native variant owns its instructions, ABI, executable
format, and the extra audit work they require. Running on one host does not
prove execution on another host.

<a id="non-lockstep-refinement"></a>

## Future proof research

The retained [Gamma checker](../tests/bootstrap/proofs/checker/README.md) checks finite ground
relations. Its Beta encoding theorem would establish exact encoding of one source
subject to one tape, not that the evaluator implements Gamma. Executing a checker
through an evaluator does not independently prove that evaluator correct.
The retained [Gamma checker](../tests/bootstrap/proofs/checker/README.md) checks
finite ground relations. Its Beta encoding theorem proves exact encoding of one
source into one tape, not that the evaluator implements Gamma. Running a checker
inside an evaluator does not independently prove that evaluator correct.

Formal source-to-execution refinement, proof certificates and translation
validation are future research, not current construction acceptance requirements.
Existing proof formats and rules still define any claim made using those tools;
removing the construction dependency does not make an unchecked certificate valid.
Do not add proof infrastructure merely to satisfy the former acceptance contract.
Formal source-to-execution refinement, proof certificates, and translation
validation are future research, not current construction requirements. Existing
proof formats and rules still govern any claim made with those tools; dropping
the construction requirement does not make an unchecked certificate valid. Do
not add proof code just to satisfy the retired acceptance rules.
Loading
Loading