Video 18 of 53 · 5:25 · Execution, sharing and reuse
Small operator tokens and construction routes
In this video
Caption transcript
Show transcript
This overview explains how pair-aware compilation represents one live row variable and one live column variable with four bits.
Equal token outputs can arise through different construction routes with different costs and claims.
Take the two-input and function in true-first order.
Its four entries are one, zero, zero, zero.
These four bits describe all two-input behavior only because both the variable identities
and the input order have been declared.
For this illustrative encoding, put the first entry in bit zero.
The resulting integer is one.
A format that puts the first entry in the high bit would encode the
same ordered entries differently.
An integer alone is therefore not enough to interpret the operator; this example does not
prescribe an internal API format.
A compact pair representation can be reached through different construction routes.
Directly recognizing a small supported operator is different from evaluating or reducing a
larger expression first.
Equal final bits do not imply that the routes took equal work.
The current pair API represents one live row variable and one live column variable with four output bits.
Structural composition combines recognized small tables using supported rules.
Retabulation evaluates the four pair assignments when that route is allowed.
If no eligible pair representation can be built, fallback uses the ordinary evaluator.
For and, true-first A B order gives four outputs: one, zero, zero, zero.
Those are the pair result.
They do not by themselves say how much work the construction route performed.
Suppose the requested display also includes C, although the rule ignores C.
For A B one one, both values of C give one.
For each other A B pair, both values of C give zero.
Expanding the pair into that display repeats entries; it does not create new dependence.
The current pair API represents one live row variable and one live column variable with four output bits.
It distinguishes pure structural composition,
a hybrid that may retabulate a subtree, explicit whole-root retabulation, and ordinary fallback.
Take A AND NOT B with A on rows and B on columns.
In true-first order, the pattern is 0100.
Structural token compilation accounts for B's sign in the common A-B frame.
Under the pure-structural strategy it must construct a supported token without a truth-table fallback.
Under retabulation it explicitly evaluates all 4 cases.
Those routes can agree on bits while doing different work.
For the full four-input rule, fix C to zero and D to one.
The result is NOT of A AND B, pattern 0111 in true-first order.
The token-only artifact and a lifted dense output remain separate.
If the pair compiler returns no token, the array API uses its ordinary fallback.
Work a second complete case with A 1, B 1, C 1, D 0.
Keep this assignment fixed throughout the calculation.
Each symbol retains the meaning already introduced; a new value does not
create a new logical rule.
The A and B branch gives one.
The fixed C or D branch also gives one, so the final exclusive-or is zero.
Under this restriction the pair function is not and, but its complement.
Its true-true entry must therefore be zero in the small representation.
This case establishes a specific contrast.
Fixed values change the pair function.
The construction context must be preserved.
Keep the input, intermediate values, and conclusion together when comparing
it with the previous case.
The calculated answer belongs to this complete assignment under the stated rule.
Start from the four-input rule used earlier.
Fix C and D to zero.
This is an explicit restriction to a two-input slice, not a claim that the original rule
always ignores C and D.
The fixed or branch becomes zero.
Exclusive-or with zero preserves the other branch, leaving A and B.
The resulting two-input function can be described by the four and entries
in the declared order.
For C one and D zero, the or branch becomes one instead.
Exclusive-or with one complements A and B.
The two restrictions produce different pair functions, so the fixed values
belong to the construction context.
Unsupported structure must use an eligible fallback rather than being forced into an
unjustified small-token interpretation.
Report structural composition, retabulation, and fallback separately.
Keep the token artifact distinct from a lifted dense output.

