19.4 Character identity, moves and aliased extractions
Why extraction intervals may alias
Information-preserving closure under merge requires an operation to retain several deletes or moves that reference the same effects characters. Their extraction intervals therefore occupy the same document span. This is called aliasing.
Characters are aliased only at post-operation locations. The extraction of the enabled move itself does not alias another extraction that still describes the character at an earlier location; such an extraction must track to the character's new location.
Chained moves
Let Da, Db and Dc be three locations for the same contiguous
range. Let O1 move it from Da to Db, and let O2
subsequently move it from Db to Dc. The merged operation moves directly from
Da to Dc.
The merge still preserves two distinct move identities, but its internal representation is not a
time-ordered sequence. The extraction of O2 is exclusion-transformed backward through
O1, causing both moves to alias the original extraction location Da. Their
e values record which destination is enabled.
Why aliasing cannot be avoided
Let O1, O2 and O3 concurrently move the same character to
different locations, with increasing operation identifiers. Let
O3'=IT(O3,O2). Merge the serial sequence [O2,O3'], then transform that
composite against O1. The result must retain two disabled move extractions, and both must
track to the destination selected by O1. One extraction interval cannot preserve both move
identities. Therefore information-preserving merge requires aliased extraction intervals.
Working and effects characters
Identity sets and mappings
S, E(S) is the set of all e-characters across all effects
documents, and W(S) is the set of all w-characters present in S, including
those marked as deleted.
e, wchar(e) is its associated w-character.
w, ecreate(w) is the unique e-character at which
w was originally inserted by a create operation.
w in W(S), echar(S,w) is the unique e-character associated
with the current position of w in state S.
e1 and e2, write e1 ~ e2 when
wchar(e1)=wchar(e2). This is an equivalence relation over e-characters representing the
same w-character.
Declarative extraction rule
Let operation O be applied to state S, and let w be involved in
one or more moves or deletions recorded by O. Every extraction for w must refer
to the same well-defined e-character:
if w is in W(S): x(S,w) = echar(S,w) otherwise: x(S,w) = ecreate(w)
Thus an operation may contain several extraction intervals for one w-character, but they alias one effects location. Transformation tracking preserves this rule when a concurrent enabled move changes that location. Merge applies it to remove chains of moves.
Ordering competing moves
Aliased move extractions are sorted by strictly increasing e. When concurrent groups are
transformed, equal e positions are ordered by site identifier. When serial groups are
merged or transposed, their causal order determines the equality case. This total order makes the
first interval the unique possible winner and permits a linear merge-like algorithm.
Representation invariants
Partial aliasing is not a valid stored form. Transformations split intervals until overlapping spans are exactly equal or disjoint.
- Document identifiers and positions are non-negative; every interval is non-empty.
- Every list head has a null previous link and every adjacent pair has reciprocal links.
- In a document-map entry for
doc, every deletion hasxdoc=doc, every move insertion hasidoc=doc, and every move extraction hasxdoc=doc. The entry itself supplies the destination document of each creation. CandIare ordered and non-overlapping.DandXare ordered and their overlaps are exact aliases.- Deletion aliases have equal strings and non-decreasing site identifiers.
- Move aliases have equal strings and strictly increasing
evalues. - Every move object appears once through
Ilinks and once throughXlinks.