69
space,labeledwiththecontentsatthatpointinthespace.Struck-throughitemsarenot
actuallypartoftheresultingsequence,butareshownbecausetheiraddressesstillexist.
Grayedtextistextthatiscopiedfromsomeotherlocation.Implicitinthediagramisthe
existenceofachange,notshown,whichinsertedtheoriginalstring“ABCDEF”beforethe
otheredits.Thereasontotracktheseaddressesisthattheyprovidetheneededinformation
toforwardtheeffectsofachangethatmayhavebeenmadeindependentlyoftherear-
rangementinquestion.
Eachlocationintheglobaladdressspaceisidentifiedintermsoftheoperationsthat
haveaffectedit.Beforepursuingthedetailsofconflictresolutionandwhataddressesshould
bepreferredinachievingmeaningfulresults,itmayhelptolookatafewexamplesofwhat
addresseslooklike.AssumingthattheoriginalstringinFigure3.2wascreatedbyasingle
insertionwithIDI1,therewouldbe7addressesdefinedonaccountoftheexistenceofI1:
(I1,0),…,(I1,6) .TheadditionofthecopyoperationC2wouldcreate4morenewad-
dresses:(C2.I1,0),…,(C2.I1,3) .Eachaddressisspecifiedintermsofthechangesthatdi-
rectlyaffectitscontent.
3.4.2 Theinteractionofoperationtypesandaddressingstructure
Thebasicideaofkeepingasupra-temporalrecordoftheevolutionofanentiredata
structureandselectingrelevantpartsofitshistoryondemandisanoldone(atleastforse-
quentialfilesmodifiedbyinsertionanddeletionoperations).Thisisthemainimplementa-
tionstrategyusedinSCCS(Rochkind1975),oneoftheearliestmodernconfigurationsys-
tems.Buttheintroductionofoperationslikemoveandcopythatrearrangeandduplicate
datacreatesanewproblem:howtoaddressdatathatmaylogicallyappearinmorethanone
place(depending,ofcourse,onuserchoicesofviewandversion).Considerthesimpleopera-
tionsinFigure3.2.Thesubsequence“ABC”appearstwiceintheaddressspaceunderlying
eachstringinthefigure.Oneimportantquestioniswhichofthetwopossibleaddressesfor
eachpositionwithinthatsubsequenceshouldbeusedinrepresentingotheroperations.
70
Thedecisionhasimplicationsfortheresultsofmergingchangesets,andthusinfluences
theextenttowhichtheresultingsystemattainsthegoalofoperationcompletenessbypro-
vidingthemostusefulresultforasetofoperations.Thebasicaddressingissueisthecontrol
ofdatadependenciesbetweendifferentoperationsandthequestionofwhatresultsaremost
useful.
Brieflyconsiderthedynamiccopy(clone)operationinFigure3.2.Sometimesclonedtext
isboilerplatematerialthatneedstobemodifiedtobesuitableforitsfinaldestination.At
othertimes,thedynamicupdatepropagationprovidedbyupdatingthesourceofadynamic
copyoperationisneededtoenforceconsistency(afterall,thisisaprimaryreasonforusing
adynamiccopy).Soweseethatwereallyneedtwoaddressesthataffectthe“samedata”:
onetoindicatethesourceofaclonedcopysotheupdatewillpropagatetoeachinstance,
andtheothertoindicateindividualcopiessotheycanbeupdatedwithoutchangingthe
source.Onethingtonoticeisthatanychangesthatrefertodestinationaddresseswillhave
noeffectinversionsthatdonotincludethecopychangeC2thatcreatesthedestination.
Forinstance,changestotheclonedinstanceofthestring“ABC”wouldhavenoeffectin
versionsthatdonotcontainthecopychange(C2)thatcreatedthatstring.
Giventhatitissometimesusefultohaveseparate“before”and“after”addresseswhen
dealingwithmoveandcopy,thequestioniswhetheritisalwaysuseful(andnecessary),or
whethertherearecaseswherethiscomplexitycanbeforegone.Thefollowingdiscussionex-
aminesthesequestionsformoveandcopy,withrespecttobothpointandrangeanchors.
Thefinalmodelwillinfactprovidealltheseformsofaddressevenforthefewcaseswhere
thevalueseemsslight,becauseitkeepsthemodelmoreuniform.However,theseissuesare
importantevenwheretheydon’tdirectlyimpactthetheory,sincetheyprovideimportant
insightintowhatpoliciesshouldbeprovidedasdefaultsforapplications.
Togainafullunderstandingoftheimplicationsoftheseinteractions,weneedtocon-
siderhowtheregionsaffectedbyanoperationrelatetothesourceanddestinationofmove
Previous Page Next Page