UT6: a six-symbol 2-tag system

A very small universal 2-tag system. This page explains it and runs its proven compiler.

Program inputs

Syntax

Declare registers and labelled blocks. The first label is the entry. A block can have several inc and dec actions, followed by a goto, a zero or positive branch with a fallback goto, or halt. Each action takes a separate machine step. At joins with overlapping incoming edges, the compiler records which edge was taken in a history register, which can make the queue grow quickly.

Syntax

Declare initial values with reg Y = 0. Each if X == 0: Y += 1 line occupies 24 sweeps. Separate multiple updates with commas. # starts a comment. The assembler reserves a zero-valued register when it needs a guard that always fires.

Use I, D, z, e, a, b. Whitespace is ignored.

Program execution

Steps
Sweeps
Queue length