Expand description
The activation runtime for for traversals (for_traversal.md §3.4,
§3.6, §5).
A TraversalStream dispenses one Activation per tuple of a
compiled traversal. An activation is a fresh state over the body’s
program, compiled once at parent compile time, with the tuple’s
elements and the parent’s cascaded wires bound and every over
cursor narrowed. Activation never compiles: the cost of the second
activation is the cost of the first minus nothing, because the first
did not compile either.
Cycles follow the rule in §3.4: a body with a cursor iterates its narrowest cursor extent, one cycle per ordinal, with the cursor’s ordinal written before each pull; a body without a cursor has one cycle per activation.
Structs§
- Activation
- One child scope of a traversal: the tuple it was activated for, a fresh kernel over the body’s program, and its cursor slice if the body declares a cursor.
- Cursor
Slice - The interval of ordinals an activation’s cursor iterates.
- Traversal
Stream - Dispenses activations for one traversal of a kernel.
Functions§
- open_
traversal - Open
traversalagainstparent’s current values, on any engine (engines.md §3.6): the cascaded wires and the wires the sources reference are snapshotted through theKerneltrait, and the comprehension is evaluated in the body’s scope, the body’s program with those wires bound, where a source or predicate resolves every name it can reference and a tuple’s own elements are layered in front as it is built. Nothing here needs the opening kernel beyond the snapshot. - program_
identity - Identity of the program an activation runs over, for callers that want to assert the one-program-per-position property.