Repository navigation
Operator placement, indexed operand order, and the vocabulary tokens they need - #31
Merged
Merged
Conversation
Move the differentiated operand ahead of the coordinate index while retaining the fused internal operator representation. Parse the canonical surface form symmetrically and cover direct, nested, and protected composite expressions.
Update every affected expectation to place the operand before its coordinate index while preserving the fused transformation and operator tree. Accept directly registered fused operators in injected vocabularies and describe the covered mechanisms without external planning labels.
An indexed operator rendered its index before the thing being differentiated, so a name read as a coordinate followed by a quantity rather than a derivative of a quantity. The renderer and the parser now place the operand first and the index last, and they changed together so round-trip symmetry holds. Exposing the rule surfaced 29 assertions across seven files that pinned the old spelling, which is the evidence it reached the surface rather than passing vacuously. Every update is spelling-only: all 29 renderer-derived spellings were re-parsed and their intermediate representation is unchanged, with segments, units, dimension flags and operand trees untouched. The composite exemption is now recursive and tested. A ratio's operands stay where they are, closing a leak that had reordered a protected second operand.
Render ordinary unary operators adjacent to their base group when an of, at, or due-to tail is present. Preserve natural untailed readings and operator placement throughout composite operand trees, with parser symmetry and exact spelling coverage.
Register relative humidity, indexed Stokes components, and the named iron-core beta inclination. Preserve the shipped ordered strain-gauge carriers with round-trip and removal-sensitive coverage.
Add relative_humidity, beta_inclination and the Stokes s0-s3 component indices, with beta_inclination categorized as geometry and the generated enums regenerated. The strain-rosette measurement direction is deliberately absent: the shipped ordinal carrier pair already binds those six leaves.
Relocate an ordinary unary operator only when the name carries an of, at or due_to tail, preserve untailed readings byte-for-byte, and disable relocation recursively throughout composite operand trees, with parser symmetry.
Replace the undeclared power-flux-density token with the existing energy channel over the flux base. Verify the rendered target-load name through strict parsing, round-trip composition, and flat channel decomposition.
Replace the render-table example that constructed an undeclared power-flux-density token with energy_flux_maximum_at_inner_divertor_target, asserting the flux base and energy channel through a strict parse and round trip. No vocabulary or generated model changes: the shipped energy-flux identity already carries the meaning, so the token was rejected rather than added.
Remove the geometric beta_inclination token and regenerate the qualifier enum because beta denotes a plasma quantity. Drop only its vocabulary-gap assertions after confirming the shipped snapshot has no dependent name.
Beta is by definition a plasma quantity, and beta as a prefix for a geometric angle was already tried and retired here: beta_angle_of_ferritic_element and beta_angle_of_passive_loop are both superseded in favour of tilt_angle and vertical_angle spellings. No shipped name used the token, so the removal is clean.
Give every bare physical base in the closed vocabulary its sourced definition, so a bare base can be admitted by the semantic name gate when its description embeds the vocabulary definition of the token. The name-review gate scores a one-word name against its description at a 0.55 floor that a single token can never reach; with a definition as the name-side text the same population clears with a measured 0.771 minimum. physical_bases.yml gains 21 folded definition blocks (the 21 bases that live there) and geometry_carriers.yml gains 4 (normalized_poloidal_flux_coordinate, normalized_toroidal_flux_coordinate, radial_coordinate, toroidal_flux_coordinate are geometry carriers, not physical bases). The blocks are byte-identical to the reviewed and grounded Part-2 definitions from the name-gate calibration evidence. PhysicalBaseDef gains an optional definition field mirroring GeometryCarrierDef: empty by default, extra=forbid stays so an unknown key still raises. No token added, renamed, removed or reordered; aliases, kind, inherently_dimensional and constant_on_flux_surface untouched. The imas-codex consumer that reads these definitions lands separately.
The downstream catalog consumer resolves this package as an editable path install while declaring a pinned version, so it records a version that does not describe the code it ran. Thirteen commits carry the operator placement rule, the indexed operand order, and the thirty-one vocabulary tokens it needs. The chain is blocked on one contract test. A frozen digest hashes the whole physical-base vocabulary, so any added base moves it even when no existing base changes kind; the assertion that would have caught a real kind change is vacuous by construction. Pinning each baseline base by name measures what the test claims to.
The roster is per project, so dispatching release work here needs its own member rather than reusing the consumer project's.
Replace the growing-map digest with an explicit baseline that detects kind changes while allowing additional bases. Exercise rejection of an altered existing kind and acceptance of a synthetic addition.
A frozen digest over the whole vocabulary is replaced by an explicit baseline mapping measured from the loader, so an added base passes while a changed kind fails. The census the digest had hidden is now readable: 177 bases, 19 vectors, 16 of them established outside the three corrections. That figure also corrected the brief. The test asserts only three bases changed to vector, not that only three are vector, and the sixteen make the difference between those readings decisive.
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.
Four grammar corrections and the vocabulary additions they depend on, ahead of a release the downstream catalog consumer needs.
Operator placement
An ordinary unary operator now renders adjacent to its base group when an
of,at, ordue_totail is present. Untailed readings are unchanged, and placement is preserved recursively through composite operand trees, with matching parser symmetry.Two negative controls hold byte-identical:
accumulated_ammonia_count(untailed) andflux_surface_averaged_magnetic_field_magnitude, as does the recursive exemption controlflux_surface_averaged_ratio_of_square_of_toroidal_flux_coordinate_gradient_magnitude_to_square_of_major_radius. Twenty-two reparse pins cover nineteen retired-to-canonical pairs, the two controls, and one tailed operator inside a composite operand.Twenty existing assertions pinning retired spellings were updated. A twenty-first exposed a genuine parser ambiguity rather than a stale expectation: the suffix
exposure_time_derivativeadmitted two readings, and the parser now resolves it by testing the remaining registered operand.Indexed operators
An indexed operator renders its operand before its coordinate index, aligning the canonical spellings of indexed derivatives with the surrounding grammar.
Vocabulary
Twenty-five bare tokens the closed vocabulary was missing are now defined, plus six data-dictionary-backed tokens. The
betainclination qualifier is withdrawn: every data-dictionary leaf named exactlybetais the oblique-element inclination angle, so the token invited a collision with plasma beta.Verification
The grammar suite passes with zero failures at both ends: 1148 tests at the base and 1170 at this head, 22 added. A census over the live downstream catalog recorded 149 renderer changes across 2974 names with zero reparse failures and zero intermediate-representation mismatches.