The association conventions #
This file defines the universal conventions that associate the melodic elements of a tier with the slots of a template, as [McC81] states them after [CF79]. First, the unassociated melodic elements associate one to one, from left to right, with the free slots. Second, a single unassociated melodic element that remains associates with every free slot. Third, a slot still free takes the melodic element on the nearest slot to its left. A slot with a line from any tier is unavailable to every other tier, the prohibition against many-to-one association. A language-particular rule that erases a line is followed by the conventions again, which restore or respread it.
Main definitions #
Morphology.TemplateMatch.associateOneToOne,associateRemaining,spread: the three conventions on one tier.Morphology.TemplateMatch.associate: the three in order.
Main results #
Morphology.TemplateMatch.associate_map: the conventions never look at the melodic elements, so they commute with relabeling them.
References #
The slots that bear a tier's melody: the V-slots for the vocalism, the C-slots for the root and the affixes.
Equations
Instances For
Whether some line reaches a slot, from any tier.
Equations
- m.IsFilled i = m.associations.any fun (x : Morphology.Association) => x.slotIndex == i
Instances For
Whether some line leaves a melodic element of a tier.
Equations
- m.IsAssociated s k = m.associations.any fun (a : Morphology.Association) => a.source == s && a.melodyIndex == k
Instances For
The unassociated elements of a tier, left to right.
Equations
- m.unassociated s = List.filter (fun (x : ℕ) => !m.IsAssociated s x) (List.range (m.melody s).length)
Instances For
The free slots that bear a tier's melody, left to right: a slot with a line from any tier is unavailable.
Equations
- m.freeBearers s = List.filter (fun (x : ℕ) => !m.IsFilled x) (m.bearers s)
Instances For
The match with some lines added.
Equations
Instances For
The line of a tier on the nearest slot left of i that has one.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The first convention: the unassociated melodic elements associate one to one, from left to right, with the free slots.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The second convention: a single unassociated melodic element associates with every free slot. After the first convention no element is left with a free slot, so this changes only a match the first has not been applied to.
Equations
- m.associateRemaining s = match m.unassociated s with | [k] => m.link (List.map (fun (i : ℕ) => { source := s, melodyIndex := k, slotIndex := i }) (m.freeBearers s)) | x => m
Instances For
The third convention: a free slot takes the melodic element of the tier on the nearest slot to its left.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The three conventions, in order.
Equations
- m.associate s = ((m.associateOneToOne s).associateRemaining s).spread s
Instances For
Relabeling #
The conventions never look at the melodic elements.