96
Definition4.14.Clause7eliminatesanyrangethatisoverlappedbyanymoveintheset
beingconsidered.Clause6definesthecontentofthedestinationofamove,m,intermsof
thecontentofitssource,consideredinachangesetthatremovestheeffectsofmandall
lowerprioritymoveoperations.Thisrecursivecheckoftherangewillnotcontainanydata
inthesourceofahigherprioritymove(becauseofclause7).Clause7willnoteliminatedata
becauseofbeingthesourceofmorthelowerprioritymoveoperations.Onefinalobserva-
tionisthatforanydatathatisthesourceofseveralmoves,onlyonewillhavethehighest
priority,andthatdatawilloccuronlyatthedestinationofthatmove.
Claim4istrivial.Notethat A’(S ¨ c)isnotnecessarilyunconflicted.Inorderforthatto
betrue,theremustbenoc’ e SwithDest(c’) = Dest(c).
Claim5isaconsequenceofthefactthattheonlyclauseof
Definition4.14thatactuallyreturnsanythingotherthanthenullsequenceisclause4.
Clause4alwaysreturnsexactly1elementofaninsertion’scontent.
Claim6istruebecauseeveryelementofaninsertionstartsoffwithanaddresstoits
rightanditsleft,andneitherofthoseaddressesisthetargetofanyoperation.Addinga
change,insertion,move,orcopy,does“remove”anaddressbymakingitadestination.
However,eventheinsertionofanullrangewillcreateanewaddress,immediatelybounding
thesequenceelementstoitsleftanditsright.Forlongerinsertedsequences,theleftmost
newaddressformstherightboundaryofthesequenceitemtotheleft,andrightmostnew
addressformstheleftboundaryofthesequenceitemtotheright.v
Theseclaimsprovidethebasisformodelingsystemactivitieslikeversionmanagement
andundo.
Claim1meansthataddressesdonotvanishwhenchangesareadded.
Claim2meansthattherelativeorderingofaddressesispreservedwhenchangesare
addedtoaset.
97
Claim3showsthatevenconflictingmoveoperationswillonlyrearrange,neverdelete,
data.Thisprovidesthemostsensibleresultsforconflictingmoves(asidentifiedinSec-
tion3.3.3).
Claim4showsthatconflictdetectionissimple,andthatanynon-conflictingchangecan
beaddedtoaminimallyconsistentchangesettoproduceanewminimallyconsistent
changeset.
Claim5showsthattheaddressingmechanismofP-sequencesisfine-grainedenoughto
addresseveryelementofasequenceindividually,aswellasreinforcingthenotionthat
noteveryrangeofaddressesactuallycontainsanon-emptysubsequence.
Claim6showsthatthereisalwaysanaddressforeverygapinthestaterepresentedbya
P-sequence.Thisensuresthatitisalwayspossibletocreateanon-conflictingchangefor
agivenchangeset.
Theorem4.4:ForaP-sequenceX
S ,I e S,andDeleted(Dest(I)),thenC
X (a
1 , a
2 , S) = L,if:
1. Change(I) = I[a,s],and b
1 = (I,
0) £
SA a
1 anda
2 £
SA b
2 = (I,Length(s))
.
2. Change(I) = M[x
1 , x
2 , d],x
1 = (I’
1 …I’
n ,i),x
2 = (I’’
1 …I’’
n ,j), b
1 = (I
I’
1 …I’
n ,i) £
SA a
1
anda
2 £
SA b
1 = (I
I’’
1 …I’’
n ,j).
3. Change(I) = C[x
1 , x
2 , d],x
1 = (I’
1 …I’
n ,i),x
2 = (I’’
1 …I’’
n ,j), b
1 = (I
I’
1 …I’
n ,i) £
SA a
1 and
a
2 £
SA b
1 = (I
I’’
1 …I’’
n ,j).
Proof:BystraightforwardapplicationofDefinition4.8,Deleted(b
1 , b
2 ).Sincea
1 anda
2 are
containedinthesameinterval,theytooaredeleted.v
Thislemmaisimportantforimplementersasitallowsanimplementationtoignoreany
addressescreatedbyachangeifitsdestinationisdeleted.
Theorem4.5:AssumethereisaP-sequenceX
S ,witha
1 = (I…I’
n , I),a
2 = (I…I’’
n ,j),I e S,
andChange(I) = M[s, e, d].Iftherearetwoaddresses,aandb,witha £
SA Dest(I) £
SA b,and
Moved(a, b, S RecessiveMoves(I,S)), thenC
X (a
1 , a
2 , S)) = L.
Previous Page Next Page