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.
98
Proof:Wecanshowthata
1 anda
2 liebetweenaandbjustaswedidintheproofofcases
2and3ofTheorem4.4.ItremainstoshowthatifMoved(a, b, S RecessiveMoves(I,S)),
thenC
X (a
1 , a
2 , S)) = L.ThevalueofanyrangewithpathsstartingwithIwillbedetermined
byclause6of
Definition4.14,andthatcontentswillbedeterminedrelativetothechangeset
S RecessiveMoves(I,S).Howeverthatrangewillsatisfyclause7,andthevaluewillbeL.v
4.5 Summary
ThischapterhaspresentedtheP-sequence,arepresentationforthebehavioroffreely
combininginsert,delete,move,andcopychanges,andhasexploredsomeofitsproperties.
TheP-sequenceprovidesaprecisedefinitionofastructuremeetingtherequirements(and
makingthecompromises)examinedinChapter3.
TheP-sequenceisversion-completefordynamic,permutationalchangesasdescribedin
Table2.1.Whileothersetsofdynamicpermutationaloperationsarepossible,theycannot
representanymorestatesthanPalimpsest’ssetdoes(asdiscussedinChapter3).Since
change-completenessisessentiallyavariablenotion(permittingthemaximumnumberof
usefulmergeandundobehaviors),Ihavenotattemptedtodefinelevelsofchange-
completeness;theyareessentiallyapplicationdependent.Someotherdefinitionsmightbe
morechange-completethanPalimpsest,forsomeapplications.Webrieflyexaminedtheex-
tensionofthedefinitionoftheaddressorderingtohandleconflictedchangesets,andsaw
thattheoneeffectofconflictedchangesetsistobreaktheordering<
SA .Resultsarestated
intermsofunconflictedchangesets,buttheycanbetriviallyextendedtoconflictedchange
sets.Whenconsideringmodelsofapplicationssuchasreal-timeediting,whereconflictde-
tectionisaburdenandnotanadvantage,useoftheextendedmodelwillbeassumed.
AppendixApresentsadirectPrologimplementationofthesequenceorderingdefinitions
presentedinthischapter.ThefunctionspresentedthereallowconcreteinstancesofPalimp-
Previous Page Next Page