Skip to main content

Module signature

Module signature 

Source
Expand description

Field-signature helpers for schema minimization (and isomorphism). Ported from ~/dev/omnist/omnist/ops/signature.py.

local_signature is the target-blind structural key used as the initial partition for minimize’s partition refinement: a key including ref target names would be too strong a starting point – records that turn out to be equivalent because their ref targets are themselves equivalent-but-differently-named would never even land in the same starting block. It captures a field’s label, cardinality, and scalar-or-ref shape, but excludes ref target names (those are compared by evolving block id during minimize’s refinement instead).

Enums§

ShapeKey
A field’s target-blind shape: Scalar(kind, nullable), Ref (the target record’s name is deliberately excluded – see the module doc comment), or Any.

Functions§

local_signature
Target-blind structural key for a record: fields sorted by label, each keyed by (label, min, max, shape).

Type Aliases§

FieldKey
One field’s signature entry: (label, min, max, shape).
LocalSignature
A record’s target-blind structural key: every field’s FieldKey, sorted by label.