Skip to main content

equivalence_classes

Function equivalence_classes 

Source
pub fn equivalence_classes(s: &Schema) -> Vec<Vec<String>>
Expand description

Partitions s.env’s record names into structural-equivalence classes via MinimizeSA-style partition refinement (module doc comment, steps 2-3): an initial local_signature grouping refined to a fixpoint by which block each same-labeled ref field points to.

Operates on s.env exactly as given – it does not prune first, so unreachable or unsatisfiable records are still classified. normalize calls this after its own prune/is_empty steps; lint calls it on the raw schema so duplicates are reported as authored. Each returned block is a list of names; a block of length > 1 is a set of records with identical structure.