Expand description
Metadata algebra — spec §10.7.
Every well-formed comprehension AST node carries a four-field
Metadata bundle computed bottom-up from its children’s
metadata and its own scalar parameters. The bundle is a
monoid: propagation composes under composition, and every
field is either a closed enum (capability bit) or a
closed-form numeric/symbolic descriptor.
This module owns:
Metadata— the four-field bundle.IndexFn— closed-form addressing schemes (six variants covering cartesian, zip Strict/Truncate, zip Cycle, union, continuous, hybrid).NaturalOrder— how a node enumerates by default.Materialization— streaming or sized-barrier classification (spec §6.2).Comprehension::metadata— propagation entry point.
The propagation rules are total, constant-time per node, and
cannot fail. Dependent-source cartesians produce
index_addressable = None; this is the only place
metadata propagation consults child-internal information
beyond the published bundles — and it does so at the
cartesian node, by walking the children’s source expressions
for back-references to earlier-axis names.
Structs§
- Metadata
- The metadata bundle carried by every well-formed AST node.
Enums§
- IndexFn
- Closed-form addressing schemes — spec §10.7.1.
- Materialization
- Streaming-vs-barrier classification per spec §6.2.
- Natural
Order - Natural enumeration order — spec §10.7.1.