Skip to content

Record every contract the catalog does not state - #43

Merged
estebanzimanyi merged 2 commits into
MobilityDB:mainfrom
estebanzimanyi:gen/gap-ledger
Sep 7, 2026
Merged

Record every contract the catalog does not state#43
estebanzimanyi merged 2 commits into
MobilityDB:mainfrom
estebanzimanyi:gen/gap-ledger

Conversation

@estebanzimanyi

Copy link
Copy Markdown
Member

A generator reading a catalog meets facts the catalog does not carry, and it has
two honest answers: emit the surface without the fact, or emit nothing where the
shape cannot be expressed at all. tools/gapledger.py holds both and
GAP-LEDGER.md is what the two generators write into it — 3948 rows from the
flat surface and 6 from the object layer, at MobilityDB
d64dcffecee20e939ab227a4dbf8943b551030f4. A class with no rows prints too, so an
empty one reads as a site that was watched rather than one nobody looked at.

bbox_temporal_split_boxes is the shape no wrapper can express. The catalog
states it answers an array and void * names no element, so the wrapper walked
the answer at the pointer's own eight bytes while the same call's boxsize
argument told MEOS how wide an element really is: it read the array's own bytes,
eight at a time, as addresses. It is a stub carrying that reason, and the stub
stands where the wrapper stood, so a reader of the surface finds the answer in
the place they are already looking.

The largest class is nullability. shape.nullable names 72 parameters over 60
functions and no field states that a parameter is required, so 3936 functions
take a pointer whose contract nothing states — the wrapper takes it, and nothing
says whether zero is an argument or a fault. The other classes are small enough
to name: geopose_frame and geopose_frames answer a GeoPoseFrame * no
emitted function accepts; GBOX and LWGEOM hold an lwflags_t the catalog
gives no width, which is what leaves STBox.toGbox deferred; AFFINE, Match,
MvtGeom, SpaceSplit and SpaceTimeSplit cross by value and state themselves
in no text the catalog names; and the object layer defers six members over the
five types Numeric, GBOX, Jsonb **, text ** and PCDimensionSpec *.

Nothing here is filled in on this side. A row's fix is upstream in MEOS or
MEOS-API, where every binding inherits it, so the ledger states the gap and
stops. The build takes 0 warnings and the suite passes 67 of 67 with none
skipped; a second run of both generators reproduces the ledger byte for byte.

The generated surface is the catalog's projection at MobilityDB
d64dcffecee20e939ab227a4dbf8943b551030f4 through MEOS-API 5311fdbf0. The raster
value family — `raster_value`, `raster_at_value`, `raster_minus_value`,
`eraster_value` and `araster_value` — reads a trajectory, a raster and a band,
which is what MEOS declares for it. `geo_is_planar_areal`,
`geo_every_part_bounds_area` and `stbox_nad` join the surface.

`mindistance_tgeo_tgeo` leaves it. MEOS declares it in no header and
`libmeos.so` defines no such symbol — `mindistance_tcbuffer_tcbuffer` and
`mindistance_tgeoarr_tgeoarr` are the two the library exports — so a wrapper
naming it resolves nothing at load and the caller learns that only when the call
is made.

4686 functions across 26 headers, 8 by-value structs, and 150 vendored
declarations left to their own project; the object layer emits 1355 methods over
115 classes with 6 deferred. The build takes 0 warnings and the suite passes 67
of 67 with none skipped.
A generator reading a catalog meets facts the catalog does not carry, and it has
two honest answers: emit the surface without the fact, or emit nothing where the
shape cannot be expressed at all. `tools/gapledger.py` holds both and
`GAP-LEDGER.md` is what the two generators write into it — 3948 rows from the
flat surface and 6 from the object layer, at MobilityDB
d64dcffecee20e939ab227a4dbf8943b551030f4. A class with no rows prints too, so an
empty one reads as a site that was watched rather than one nobody looked at.

`bbox_temporal_split_boxes` is the shape no wrapper can express. The catalog
states it answers an array and `void *` names no element, so the wrapper walked
the answer at the pointer's own eight bytes while the same call's `boxsize`
argument told MEOS how wide an element really is: it read the array's own bytes,
eight at a time, as addresses. It is a stub carrying that reason, and the stub
stands where the wrapper stood, so a reader of the surface finds the answer in
the place they are already looking.

The largest class is nullability. `shape.nullable` names 72 parameters over 60
functions and no field states that a parameter is required, so 3936 functions
take a pointer whose contract nothing states — the wrapper takes it, and nothing
says whether zero is an argument or a fault. The other classes are small enough
to name: `geopose_frame` and `geopose_frames` answer a `GeoPoseFrame *` no
emitted function accepts; `GBOX` and `LWGEOM` hold an `lwflags_t` the catalog
gives no width, which is what leaves `STBox.toGbox` deferred; `AFFINE`, `Match`,
`MvtGeom`, `SpaceSplit` and `SpaceTimeSplit` cross by value and state themselves
in no text the catalog names; and the object layer defers six members over the
five types `Numeric`, `GBOX`, `Jsonb **`, `text **` and `PCDimensionSpec *`.

Nothing here is filled in on this side. A row's fix is upstream in MEOS or
MEOS-API, where every binding inherits it, so the ledger states the gap and
stops. The build takes 0 warnings and the suite passes 67 of 67 with none
skipped; a second run of both generators reproduces the ledger byte for byte.
@estebanzimanyi
estebanzimanyi merged commit 300e7e1 into MobilityDB:main Sep 7, 2026
1 check passed
@estebanzimanyi
estebanzimanyi deleted the gen/gap-ledger branch September 7, 2026 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant