Record every contract the catalog does not state - #43
Merged
Conversation
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.
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 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.pyholds both andGAP-LEDGER.mdis what the two generators write into it — 3948 rows from theflat 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_boxesis the shape no wrapper can express. The catalogstates it answers an array and
void *names no element, so the wrapper walkedthe answer at the pointer's own eight bytes while the same call's
boxsizeargument 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.nullablenames 72 parameters over 60functions 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_frameandgeopose_framesanswer aGeoPoseFrame *noemitted function accepts;
GBOXandLWGEOMhold anlwflags_tthe cataloggives no width, which is what leaves
STBox.toGboxdeferred;AFFINE,Match,MvtGeom,SpaceSplitandSpaceTimeSplitcross by value and state themselvesin no text the catalog names; and the object layer defers six members over the
five types
Numeric,GBOX,Jsonb **,text **andPCDimensionSpec *.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.