You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Make QuantitySignature construction independent of caller ordering #1946
This content was written by an AI agent and must be verified by a human developer. After human verification, this alert may be removed.
Summary
QuantitySignature is only correct if callers call check_quantity_param for every parameter in order on both the built-in and extern paths. This relies on the caller following a protocol, against the project rule that invariants are enforced by the API.
Current state
FunctionSignature::try_new already guarantees each dimension variable is bound before use.
The remaining internal-error site is in tir/dim_check/builtins.rs (the QuantitySignature walk shared with plugin extern signatures).
Proposed direction
Re-encode monomials over binder slots when FunctionSignature is validated, so a QuantitySignature can only be constructed through one validated walk, and the per-parameter call order no longer matters.
Activity