Master

Shipping a compiler that is bounded

The end state is a compiler where every limit is written and every claim has a run that produced it. The shape is the same shape as every other shippable system in this site.

What you will see

One line with both numbers and a date. That line is the record of the decision.

About 1 min of reading

Try It

Write the limits and prove a refusal

1

Write the limits file

printf 'source_bytes 65536\ntree_depth 64\nrewrite_rounds 20\nslots 256\n' > /tmp/lim.txt; wc -l < /tmp/lim.txt

Before you run it, say out loud what it will print. Then open the answer.

What it prints
4. Four lines is the whole contract of the compiler.
2

Attempt a run that breaches one

printf 'depth 90\n' | awk '{print ($1>64) ? "refuse" : "run"}'

Before you run it, say out loud what it will print. Then open the answer.

What it prints
refuse. The refusal came from the file, not from a person reading it.
3

Name the breached limit

printf 'refuse limit=tree_depth used=90 max=64 date=2026-10-10\n' >> /tmp/stops.txt; tail -1 /tmp/stops.txt

Before you run it, say out loud what it will print. Then open the answer.

What it prints
One line with both numbers and a date. That line is the record of the decision.

Data Flow

A compiler to a shippable claim
1 The limits file is written
↓
2 The suite gates every change
↓
3 A breach refuses and names the limit
↓
4 The record is written with a date
Why this works
Why the limits live in the compiler

The compiler is the component that acts. A limit in a note is a limit that will be exceeded, and exceeded means unbounded.

The end state of this subject

A compiler that refuses with a number. That is the state where every claim is written, and written is the word that ends the subject.

Examples

The limits are one file

Source size, tokens, tree depth, rewrite rounds, slots. One file, and the file is the contract of the compiler.

The artefacts are the same four

Input contract, suite, last scores, open cases. The shape of a shippable system does not change with the language.

The refusal names the limit

A deep program refuses with the depth and the number. The name and the number are the record, and the record is the claim.

Words this lesson uses

Each one is defined here on this site. Open the entry for the full definition and the other words it points at.

← Debugging a compiler that is wrong
Previous Lesson
Debugging a compiler that is wrong