Repository navigation
feat(language): a bound reads a member's parameter - #1013
Draft
FabianHofmann wants to merge 10 commits into
Draft
FabianHofmann wants to merge 10 commits into
FabianHofmann wants to merge 10 commits into
Conversation
`bounds.lower` and `bounds.upper` take `at(parameter, by=relation[column])` beside a number and a parameter name. The lookup resolves as `at` does in an expression. Its dims must lie within the variable's dims, or mathspec refuses it at load with a rewrite. All three typesetters print it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01F4nx8HNM3uZTJUHnUs1cr9
FabianHofmann
requested review from
FBumann and
brynpickering
as code owners
November 16, 2026 11:13
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01F4nx8HNM3uZTJUHnUs1cr9
Documentation build overview
55 files changed ·
|
FabianHofmann
marked this pull request as draft
November 16, 2026 11:16
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01F4nx8HNM3uZTJUHnUs1cr9
A binary's `bounds:` are resolved and dim-checked again, as before the lookup landed, though the program still holds 0 and 1. A bound over dims from both the parameter and the relation key names both rewrites, joined by "and". A bound that does not parse gets the parser's message. `footprint.kinds` walks variable bounds, so a lookup only in a bound is visible to an engine. The docs say a `missing: absent` relation leaves a looked-up bound open where it has no row.
This was referenced Nov 16, 2026
This was referenced Nov 16, 2026
This branch has not been deployed
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.
A variable's bound reads a parameter through a relation with
at. PR 2 of 3 for #1011; stacked on #1012.Method, gate output, alternatives
at(<parameter>, by=<relation>[<column>]). Sameatresolution as an expression; the program holds aJoinover aParameterReferencetests/test_validation.py/tests/test_dimensions.py:Declare 'cht' without ['t'](parameter),look 'capacity' up through a relation keyed by the variable's dims(relation key)at(2 * ch, …),sum(c):bounds take a number, a parameter name or at(parameter, by=relation[column]), not an expression …Cannot parse the expression …, not "not an expression"at(<variable>, …),at(…, by=<unknown relation>[…]): the existing messagesdomain: binaryvariable: itsbounds:are still resolved and dim-checked, as on the base, though the program holds 0 and 1missing: absenton the relation: a key with no row has no bound on that side, as undermissing: absenton a parameter. Ansos:linking row multiplying by it is absent there. Documented inabsence.mdand the new subsection; pinned intests/test_sos.pyprogram.footprint.kindsnow walks variable bounds too, so aJoinonly in a bound is visible to an engine. Docstrings ofFootprint.kindsandProgram.footprintsay sonotation.mdregenerated; diff only adds thebus_outlines. Schema regenerated (BoundsSpecdocstring)sos:member with a looked-up bound:p <= at(ch, by=lk[h]) * (pick_seg), intests/test_sos.pynode.name == 'at'check: 1 failed (a-bound-that-calls-another-operator)a-bound-that-looks-up-an-expression)a-looked-up-bound-over-*)bound-parameter-dim-outside-dims-on-a-binary). Base of this fix (8fe6a43) also faileda-binary-bound-that-looks-up-through-no-relationoutside - kept: 1 failed (…-a-dim-both-the-parameter-and-the-relation-key-carry)…-a-parameter-dim-and-a-relation-key-…,…-both-…)a-bound-that-does-not-parse)test_a_lookup_in_a_bound_alone_is_in_the_footprint)test_each_entry_is_resolved_once_however_many_readerslistsVariable 'p' bounds.upper, because a named bound now goes throughresolve_expressionparameters-variables-constraints.md(new subsection, new message),expressions.md(name-resolution table),absence.md(bound set only where the data has one),piecewise.md(sos member bound).limits.mdunchanged: no limit movedVariable.lower/uppermay now be aJoin. An engine that reads onlyConstant/ParameterReferencethere must evaluate the join. No linopy change herepixi run lintandpixi run ci(lint, test 4226 passed / 1 skipped, docs-build, compile-tex 59 documents) pass locally on cb5243fover:exemption (PR 3),atunstack,mathspec checkadviceGenerated by Claude Code