Named native streaming folds #
This module retains an explicit stream table assembled from named callback compilers. The framed initial state is copied directly from the input prefix, list elements are decoded one frame at a time, and the input list is never copied to work tapes. The construction records the exact callback-lifting, loop, finalization, cleanup and rewind bounds from the stream kernel.
No machine is selected from an existential computability certificate. The only supplied bounds
are sMax, for the peak lifted callback workspace, and lMax, for the encoded state and element
lengths along this particular fold. The per-round clock is the explicit construction formula.
Main definitions #
Turing.MultiTapeTM.Internal.NativeCompiler.frameValueReader: read the contents of one framed list element without retaining its framing.Turing.MultiTapeTM.Internal.NativeCompiler.streamFoldPairTable: the explicit stream assembly from named callback tables.Turing.MultiTapeTM.Internal.NativeCompiler.streamFoldPairRoundCost,.streamFoldPairTime,.streamFoldPairWorkspace: the construction-derived resource formulas.Turing.MultiTapeTM.Internal.NativeCompiler.streamFoldPair: retain the concrete single-pass stream table and its exact semantic and resource certificate for an initial state paired with an encoded list.
Read one standard framed value, emitting its contents and stopping after its closing marker.
The next-state callback followed by the retained framing transducer required by the explicit stream table.
The final callback preceded by the retained typed unframing transducer required by the explicit stream table.
Exact clock of a tidy callback lifted to emit from a selected work tape.
Construction-derived workspace bound for a tidy callback lifted to emit from a selected work
tape in a K-tape stream machine.
Exact clock of a tidy callback lifted to write its output between selected work tapes.
Construction-derived workspace bound for a tidy callback lifted to write its output between
selected work tapes in a K-tape stream machine.
The exact number of tapes in the retained pair-stream assembly.
Explicit stream-machine assembly #
The retained pair-stream program as one explicit, choice-free transition table.
Exact time charged to round j. Outside the list range it is zero; the stream machine uses
this function only over Finset.range input.2.length.
Construction-derived clock of the retained pair-stream machine.
Construction-derived workspace bound of the retained pair-stream machine.
Retain the concrete pair-prefix streaming fold. sMax bounds the sum of the two lifted
callback workspaces in each round; lMax bounds every encoded stream state and element.