Documentation

CslibFrontier.Algorithms.WordRAM.ThreeSum.Decision.Program

Canonical native ordinary 3SUM visitor #

The fixed program constructs each actual Chan–He node and calls the existing Convolution host before pushing its children. Calls follow the exact finite preorder and multiplicity; Boolean accumulation does not exit early. The host receives the runtime packed pointer and current allocation endpoint. Its return frame preserves every lower-prefix cell needed by pending work, while permitting arbitrary higher scratch writes.

The ordinary path neither publishes nor reads a packed-pointer table. After each node is consumed, one native copy releases its packed/residue/histogram tail before pushing the children. Persistent heavy-array allocation is monotone and retains the conservative old table-gap reservation. Heavy-buffer capacities and count cells remain allocated; the dead tail is reused. The separately computed polynomial value envelope bounds signed values and arithmetic width, rather than selecting a workspace address. No improved total-space or callee high-water bound is asserted. The existing register ABI, width threshold and charged cost envelope are retained.

Executable constructors accept only finite solver code. Execution and resource certificates are separate consumers, so evaluating the program does not evaluate proof-only time metadata. Inputs shorter than three positions return false directly; this verdict shortcut does not claim that their exact mathematical preprocessing instance lists are empty.

Main definitions #

These native control and layout choices are original. Consumer modules prove initialized execution, resources and the concrete ordinary 1.9992 endpoint.

@[reducible, inline]

Fixed register count for preprocessing, one Convolution host/callee and sixteen controls.

The complete original preprocessing bank.

A disjoint bank for the actual Convolution host and supplied finite callee.

Outer controls survive both preprocessing and every Convolution call.

@[reducible, inline]

Saved actual input length.

@[reducible, inline]

Base n+2 of the polynomial value bound.

@[reducible, inline]

Computed polynomial word envelope.

@[reducible, inline]

Remaining native multiplications.

@[reducible, inline]

Constant one.

@[reducible, inline]

Constant two.

@[reducible, inline]

Boundary-case threshold.

@[reducible, inline]

Accumulated raw Boolean.

@[reducible, inline]

Load-address temporary.

@[reducible, inline]

Constant zero.

Read only the ordinary raw length header and initialize the small-case verdict.

Every multiplication and loop decrement is an actual charged instruction.

Compute the fixed-exponent value bound by native iteration.

Copy actual current-node metadata into the disjoint Convolution host bank.

OR the actual solver return into the existing Boolean accumulator.

The existing complete caller-owned host consumes this node immediately.

Release the consumed packed/residue/histogram tail, retaining all live heavy arrays.

Construct, consume, release the dead packed tail and expand one actual live node.

Pop and apply the exact zero-fuel and three empty-column guards before a live visit.

Initialize the actual native stack, then consume one root in preorder.

Visit the actual frontend forest without publishing or loading a packed-pointer table.

Compute the input-global value envelope before entering the first actual node.

Reuse the actual scalar snapshot, prime bitmap and traversal-layout initialization.

Reuse native frontend/prime/layout initialization before the fused root forest.

One finite standard-code body per fixed input exponent and concrete finite callee.

The single final halt returns the raw accumulated Boolean.