Stated programming language | Stated

2 min read Original article ↗

Write controlled English. Compile deterministic code.

◆ Controlled source

English-shaped syntax with programming-language rules. Every accepted phrase comes from checked grammar and typed vocabulary.

  • No arbitrary-English interpretation
  • No hidden behavior from familiar names
  • One meaning or a compiler error

◆ Deterministic output

The compiler resolves the whole document into explicit operations, bindings, branches, and data movement before emitting code.

  • Stable lowering from the same source
  • Checked integer arithmetic
  • Explicit ownership and traversal order

◆ Inspect the translation

The generated Go is an artifact you can read, review, diff, and compile with ordinary tooling. No model participates in compilation.

  • Source locations preserved
  • Definitions structurally inlined
  • Unsupported semantics are rejected

Statements in. Deterministic Go out.

The generated code makes the selected traversal, condition, checked arithmetic, and append order explicit.

See the complete example →

Stated · filter.ce

The program accepts an integer sequence named input.
The program accepts an integer named threshold.
The program computes the following result.
Collect the input values in encounter order into a fresh sequence.
Retain each value only when it is greater than the threshold.
Replace each retained value with the doubled value of that value
before appending it.

Generated Go · abridged

result := make([]int64, 0)
for _, value := range input {
    if value > threshold {
        doubled, ok := checkedAdd(value, value)
        if !ok {
            return nil, overflowDiagnostic()
        }
        result = append(result, doubled)
    }
}
return result, nil

Inspect the compilation yourself.

Start with one small Stated program, emit its Go source, and compare every authored operation with the generated code.