feat(language): a file says what it reads under one given key - #570
Closed
FabianHofmann wants to merge 1 commit into
Closed
FabianHofmann wants to merge 1 commit into
FabianHofmann wants to merge 1 commit into
Conversation
A model file declares the columns and row families it reads and does not build under `given: variables:` and `given: constraints:`. A given name is in the namespace, has a frame, typesets alone and reaches the program as `Program.given`. Advice gains the kind `given`. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
FabianHofmann
requested review from
FBumann and
brynpickering
as code owners
September 19, 2026 14:06
Documentation build overview
16 files changed ·
|
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.
Note
The following content was generated by AI.
PR 1 of 4 of the composition plan, rebuilt on
main(alpha.105) from the functional coverage of the stack #505 → #520. A file names the columns and row families it reads and does not build under one closed keygiven:, with two kinds:variables:(dims,description) andconstraints:(dims,description).dual()may name a given row family. A name given and built in one file is refused; the message names the rewrite.Program.given.variables/.constraintscarryGivenDeclaration(dims). Lowering does not refuse. A given column counts as a linking column inProgram.separability.advicegains the kindgiven, one note per declaration a consumer must bind. A dimension only a given declaration indexes counts as reached.Spec.variable_frames/Spec.constraint_framesare the one home of "built or given" for every lookup.sos:andpiecewise: activity:still refuse a given column, and the message now says why and names the rewrite.Decisions to flag
limits.mdgains a fourth kind of construct under How a new construct enters: a declaration of what the file reads. The composition section is swept from templates to fragments.file.md,index.mdrule 1 and theSpecdocstring say so.domainis not a field of a given variable, though the plan's F1 lists it. Nothing in the language read it: lowering dropped it and no consumer could see it. The owner holds domain like bounds and where. Three reviewers found this independently.advice'sgivenkind is a note, not a refusal.reading.mdtells a consumer with no host to refuse. Both open points from the plan stay as the plan states them.Departures from the plan
boundedness.pygained a guard: the unboundedness pass raisedKeyErroron an objective over a given column named by no constraint. A given column is excluded from that pass, since its bounds are the owner's.tests/test_reading_page.pypins the claim count onreading.md; it moved from 12 to 15 for the three executed lines in the new section. The plan said "no test change".mkdocs.ymlchanges: the nav label of the declarations page namesgiven. The plan said "Nav unchanged".errors.md's advice-kind table gains thegivenrow; it is the one home of the kind list.Verified:
pixi run ci(lint, 1346 tests,mkdocs build --strict, compile-tex, 30 documents) green on this tree. Schema regenerated withtools.schemaand the diff read: three new$defs, thegivenproperty, ten → eleven. Golden typesetter output regenerated: no diff. Not run:pixi run test-coverage.Mutation table: each guard deleted in turn, suite run, guard restored
_names_are_namesreachesgiven:constraints:refused_name_collisions_frame_dimensions_frame_dimensions_given()notes emittedgiven: constraints:Glossary('Given', …)given.variablesgiven.constraintsThe plan flagged the never-an-axis row as green in the stack; it is red here without its guard (
test_a_dimension_only_a_given_declaration_indexes_is_in_use).Review and coverage moves
Four reviewers (correctness, quality, types, tests) read the diff; twelve findings were applied, three declined: renaming
GivenTargets, removing__bool__(PR 2 and 3 call it), and rewordingFootprint.domains(true oncedomainis gone).Coverage moved: "every advice kind is produced" moved from
test_both_kinds_of_note_come_through_the_one_doortotest_every_kind_a_consumer_can_pin_against_is_produced_hereintests/test_advice.py, reading across two fixtures.Not in this PR, by plan:
composition.py,merge,override,examples/library, thefixtures.override → variedrename (PR 2), the folding sentences ondeclarations.md#given(PR 3).