math_spec.dimensions
Static dim-set checking — a type system whose type is a set of dim names.
Every node's dim set is computable before any data is bound, so this pass runs
at load on the resolved tree. The per-node rules are the "Dim algebra" table in
docs/reference/language/expressions.md; a constraint's two sides together
must equal its dims, and a where or a bound may not exceed the frame.
check_schema(schema, program)
#
Check every declaration's dim rules, on the trees program holds for schema.
| RAISES | DESCRIPTION |
|---|---|
DimensionError
|
On the first declaration that breaks one. |
Source code in src/math_spec/dimensions.py
dims_of(node, schema, context)
#
The dim set of a resolved expression, checking every rule on the way.
| RAISES | DESCRIPTION |
|---|---|
DimensionError
|
On the first rule broken. |
Source code in src/math_spec/dimensions.py
pulled_back_dims(direction, inner, context, operand)
#
The dims inner has once at reads it through direction, an expression's or a predicate's alike.
| RAISES | DESCRIPTION |
|---|---|
DimensionError
|
operand does not carry a dim the read consumes or joins on, or already carries one it lands on. |