Derive the base-to-collection type-relation registry#73
Merged
estebanzimanyi merged 1 commit intoJul 23, 2026
Merged
Conversation
A base type T parameterises four independent template classes — Temporal<T>, Set<T>, Span<T> and SpanSet<T>. Resolving the concrete collection type of a value-domain result (SpanSet<float> is floatspanset) is a static type-system fact, needed at generation time by every binding, but it lives only in the positional catalog arrays of meos_catalog.c. Parse those arrays (MEOS_SETTYPE_CATALOG, MEOS_SPANTYPE_CATALOG, MEOS_SPANSETTYPE_CATALOG, MEOS_TEMPTYPE_CATALOG) and MEOS_TYPE_NAMES, invert them, and attach idl["typeRelations"].byBase: for each base type name, the names of its set, span, span set and temporal types (absent when the base has none, so text carries no span). A binding projects the concrete collection wrapper from this registry rather than hard-coding the mapping. The parse degrades to no attachment when the source tree is unavailable, never a fabricated map.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A base type
Tparameterises four independent template classes —Temporal<T>,Set<T>,Span<T>andSpanSet<T>. Resolving the concrete collection type of a value-domain result (SpanSet<float>isfloatspanset) is a static type-system fact, needed at generation time by every binding, but it lives only in the positional catalog arrays ofmeos_catalog.c.This parses those arrays (
MEOS_SETTYPE_CATALOG,MEOS_SPANTYPE_CATALOG,MEOS_SPANSETTYPE_CATALOG,MEOS_TEMPTYPE_CATALOG) andMEOS_TYPE_NAMES, inverts them, and attachesidl["typeRelations"].byBase: for each base type name, the names of its set, span, span set and temporal types — absent when the base has none, sotextcarries no span andgeometryno span set.A binding projects the concrete collection wrapper from this registry rather than hard-coding the mapping — for all present and future bindings, with no new public MEOS API surface. The parse degrades to no attachment (never a fabricated map) when the source tree is unavailable. A unit test covers the parse and inversion (hermetic fixture) plus the canonical numeric mappings against the live source.