II13 / COMPILER

I13 COMPILER OBSERVATORY · KNOWN-GOOD EXECUTABLE SLICE

Source to execution.

A visual record of the compiler that turns .i13 source into validated IVM-13, executes it on the explicit-frame reference VM, lowers the same execution authority into real WebAssembly, and now uses I13 itself for executable compiler-law probes wherever the language can honestly express them.

VM = WASM · KNOWN-GOOD SURFACE I13 BOOTSTRAP v0.1 · PASS TAGGED VALUES FROZEN DEBUGGER v0.1 FROZEN 8M STEPS = RUNTIME POLICY

AUTHORITY CHAIN

The compiler spine.

Static introspection can reveal every major layer, but authority remains fixed: SPEC defines the language, HIR defines meaning, and IVM defines execution.

SOURCE.i13 + spans
TOKENSlexer
ASTwhat was written
HIRsemantic authority
VALIDATEsemantic + IVM gates
IVM-13execution authority
REFERENCE VMexplicit I13 frames · tagged values
WEBASSEMBLYvalidated IVM → real .wasm
VM(program) == WASM(program)
SPEC · language authority HIR · semantic authority IVM-13 · execution authority DUMP / TRACE / DEBUG / BOOTSTRAP · observers + executable witnesses

COMPILER TOOLING

Known-good components.

Each component is deliberately downstream of compiler authority. They make the machine inspectable and testable without quietly becoming new semantics.

v0.1 · FROZEN

Diagnostics

Stable E-codes, phase/category, source excerpts, exact spans and one renderer for check/run/build.

CONTRACT →
v0.1 · 11/11

Conformance

Executable contract for accepted results, compile errors, runtime traps and canonical resource behavior.

MANIFEST LAW →
v0.1 · FROZEN

Introspection

Deterministic read-only dumps of tokens, AST, HIR and validated IVM with symbolic operands.

DUMP LAW →
v0.1 · FROZEN

Trace

Streaming pre-instruction observation of the real VM loop: PC, frames, stack effects, bindings and spans.

TRACE LAW →
v0.1 · FROZEN

Debugger

Step, next, continue, source breakpoints and immutable binding/frame/stack inspection on the same VM.

DEBUG LAW →
v0.1 · VM/WASM PASS

I13 Bootstrap

The compiler's executable law mirror is written in I13: opcode effects, frame admission, tagged operation gates and Answer modes.

SELF-USE LAW →

I13-BOOTSTRAP-0.1

Use I13 wherever I13 is enough.

This phase deliberately moves executable compiler-law logic into examples/compiler_bootstrap.i13 without pretending the language can already parse its own source. The host orchestrates; I13 computes and self-tests.

Host boundary

RUST / HOSTread source · lex · parse · lower · VM · Wasm encoder
COMPILEcurrent authority chain

Text, collections, filesystem access and compiler construction still require the host because those capabilities do not exist in frozen I13 v0.1.

I13 boundary

.i13 LAW KERNELeffects · kinds · frame gate · Answer modes
VM / WASMsame proof outputs

I13 now computes its bootstrap witness itself. The host only checks the exported results; it does not implement those bootstrap decisions for the test.

15

Opcode effects mirrored

Every frozen IVM opcode has its stack need/net law represented in I13, including variable Call(argc).

15638

Law checksum

A recursive I13 witness covers all fifteen effect signatures at fixed bootstrap arity 3.

4095→1

Legal call admission

With 4095 active frames, one more I13 frame is admitted to reach the canonical ceiling.

4096→0

Frame veto

At the ceiling, another Call is rejected by the I13 bootstrap mirror.

17 / -16

Call(16) effect

The I13 law kernel computes need 17 and net -16 instead of relying on one hard-coded arity.

10/10

Wasm proof globals

Generated Wasm matched every exported bootstrap proof global and repeated deterministically.

SELF-USE · real I13 code executes real compiler-law probes NOT SELF-HOSTING · lexer/parser still require text + collections + I/O NEXT FRONTIER · smallest bounded text/collection capability that unlocks more compiler code in I13

REPRESENTATION LAW

Value identity survives lowering.

The first Wasm torture break came from flattening function handles into numeric payloads. The frozen repair carries kind, payload and binding state as separate facts.

Stored I13 value

kindpayloadbound

NUMBER uses kind 0 with an f64 payload. FUNCTION uses kind 1 with a function/table identity payload. Binding state remains independent.

Operation gates

Bin / Cmp / Ifrequire NUMBER
Callrequires FUNCTION

Ask, Answer, arguments, returns, globals and locals preserve the tagged pair. A backend may change representation; it may not erase value identity.

RESOURCE BOUNDARIES

Language law vs runtime policy.

The compiler deliberately distinguishes a canonical I13 execution limit from an implementation safety fuse.

4096

Active I13 frames

Canonical language execution law. Root/main counts as frame 1. Reference VM and generated Wasm must enforce the same ceiling.

I13-EXEC-LIMIT-001 · CONFORMANCE INCLUDED
8,000,000

Reference VM steps

Deterministic runtime safety fuse. One executed IVM instruction equals one VM step, but the 8M default is not language validity and Wasm need not copy it.

I13-RUNTIME-POLICY-001 · CONFORMANCE EXCLUDED

HARDENING EVIDENCE

Attack → understand → lock.

Torture discovers, policy tests characterize, conformance freezes accepted behavior, and bootstrap proves how much of the law can be exercised by I13 itself.

29

Differential attacks

Arithmetic, control, tagged function flow, arity, binding edges and recursion through the canonical frame fence.

4094

Last legal recursive count

VM and Wasm both complete. 4095 and 4096 produce matched canonical frame rejection/trap.

11/11

Conformance v0.1

Whole CLI paths, stable diagnostics, execution results, runtime traps and the I13 frame law remain gated.

8/8

Tagged-value regression

Function identity survives globals, arguments, returns and comparisons without falling back into numeric payloads.

1 VM

Trace + debugger

Run, trace and debug share the same execution loop. Observers cannot write execution state.

1/1

I13 bootstrap

The I13-coded law kernel passes reference VM and generated Wasm parity, including deterministic rerun.

19

explode(19) policy probe

Reference VM hits the 8M safety fuse while Wasm completes. Classified as runtime-policy divergence, not semantic defect.

DEBUGGER v0.1

Introspection over time.

The terminal below is a visual guide to the frozen debugger vocabulary. It is not a browser execution engine and does not redefine compiler authority.

i13 check file.i13
i13 run file.i13
i13 build file.i13 -o file.wasm
i13 dump file.i13 --tokens|--ast|--hir|--ivm
i13 trace file.i13
i13 debug file.i13
debugger proof gate · PASS

Debugger commands: step · next · continue · break · delete · bindings · print · stack · frames · where · quit

I13 DEBUGGER v0.1 · VISUAL GUIDE

CANONICAL RECORD

Compiler documents.

These records separate construction history, accepted law and measured evidence.