85
Toformalizethisnotion,definethesetrefs(I)ofallchangesdirectlyreferencedbya
changecwithIDI.
Definition4.2:Forachangec,suchthatId(c) = I,
1. Ifcisaninsertion,I[a, s],thenrefs(I) = Ids(a).
2. Ifcisadeletion,D[a
1 , a
2 ],thenrefs(I) = Ids(a
1 Ids(a
2 ).
3. Ifcisamove,M[a
1 , a
2 , d],thenrefs(I) = Ids(a
1 ) ¨ Ids(a
2 ) ¨ Ids(d).
4. Ifcisacopy,C[a
1 , a
2 , d],thenrefs(I) = Ids(a
1 ) ¨ Ids(a
2 ) ¨ Ids(d).
Thetemporalorderingconstraintonchangecreationmeansthatinanimplementation,
eachchange(withIDI)iscreatedatsometimetandthatallchangesinrefs(I)musthave
beencreatedatsomeearliertimet’. Thisrequirementcanbeformalizedwithoutexplicitly
invokingthenotionoftemporalordering,bydefiningareferencerelationbetweenchanges.
Definition4.3:Therefersrelation<
r isdefinedasfollows:
1. Foranypairofchangesc
1 ,c
2 ,withIDsI
1 ,I
2 ,c
1 e refs(I
2 ) I
1 <
r I
2
2. Ifa <
r b,andb <
r c,thena <
r c.
Theconditionsthatneedtobeimposedonasetofchangesnowcorrespondtoproperties
of <
r .Themostimportanttypeofchangesetisacausalset.
Definition4.4:AcausalsetSisonewhere<
r isanirreflexivepartialorderovertheIDs
ofeverychangeinS,where¨
n (refs(I
n ) e S)isasubsetofS,andwhereScontainsaninser-
tionwhoseIDistheminimalelementunder<
r .
Allchangesinthesetarerelatedtotheminimalinsertion,directlyorindirectly.There
arealsono“missingchanges”referredto,butnotpresent,noranychangesthatreferindi-
rectlytothemselves.Animplementationcaneasilyensuretheseconditionsbyonlycreating
changesthatreferonlytoalreadyexistingchanges.Wewillrefertothegreatestlower
boundofasetSunder<
r asGLB
r (S).Foranycausalchangeset,suchalowerboundexists.
Theorem4.1:Theminimalelementofacausalsetunder<
r hasdestinationnil.
86
Proof:TheminimaladdressexistsbyDefinition4.4.Theresultisanobviousconse-
quenceofthefactthatnilistheonlyinsertionaddressforwhichRefsisthenullset. v
Therequirementthattheminimalchangeisaninsertioneliminatestheneedtoconsider
degeneratemoveandcopyoperationslikeM[nil, nil, nil].Therelation<
r canbethoughtof
asarelaxationofthenormaltotaltemporalorderingofchangestoonecapturingcausalde-
pendencyofchanges.Eachascendingchainin<
r correspondstoapossiblesequenceofop-
erations,eachofwhichdependsontheexistenceofdatafromthepreviousoperation.Some
oftheotherconditionsonchangesetsdependonthenotionsofthetargetaddress,ordes-
tination,wherethedataaffectedbyachangeisinsertedintothesequence.
Definition4.5:Thefunctiondest(c)ofachangecreturnsthedestinationofachange
andisdefinedasfollows:
1. Dest(I[a, s]) = a
2. Dest(M[s1, s2, d]) = d
3. Dest(C[s1, s2, d]) = d
4. Dest(D[a
1 , a
2 ]) = ^
Thespecialvalue^ representsanundefinedresult.Wewillneverneedtorefertothe
destinationofaDeletion.Achangesetthatcontainstwochangesc
1 ,c
2 ,with
Dest(c
1 ) = Dest(c
2 ) ^iscalledconflicted,whileonethatdoesnotiscalledunconflicted.An
unconflicted,causalchangesetwillbecalledminimallyconsistent.Acausalchangesetthat
isconflictedwillbecalledconflictedconsistent.Minimalconsistencyandconflictedconsis-
tencyarevarietiesof“syntacticconsistency”asdefinedin(Dourish1996;Dourish1996).
The“conflict”inaconflictedchangesetisthatsuchasethastwooperationstryingtoplace
dataatexactlythesameplaceinthesequence,thuscreatingambiguityintheorderingof
addresses.Theterm“minimallyconsistent”isusedtodifferentiatethisnotionfromtheno-
tionofapplicationconsistency.
Previous Page Next Page