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
71
andcopychanges.Theessentialcasesaretheinteractionsofmoveandcopywithbothpoint
andrangelocationsofeffect.AswesawinSection3.3,pointsonlydesignatelocations
wherenewdataisinserted,butrangescanhavetwopossibleeffects:tocopydata,ortode-
leteitfromitscontextofoccurrence(arangecanbothcopydata,anddeleteit,asinmove,
butweneednotconsiderthisseparately).
Forthecopyoperation,wehavealreadyseenthatanychangemayneedtoberecorded
ateitherthesourceorthedestinationofacopyoperation,becauseacopyessentiallycre-
atestwoseparate(butcoupled)instancesofsomecommondata;eachinstancemayneedto
beedited.Therefore,forcopyoperations,allsortsofaddressesaresensibleatbothsource
andtarget.
3.4.2a Addressinginthepresenceofmove
Thecaseofmoveisratherdifferent,sinceitisrarelysensibletomakechangesata
move’sdestinationratherthanitssource.Suchchangesareconditional,becausetheycan
applyonlywhenthemoveisactive.Suchconditionaloperationsarenotgenerallyuseful,
since,foramoveoperation,whetheractiveornot,therewillbeonlyonecopyofthemoved
data;change-completenessisenhancedwhenchangestothatdatacancombinewithother
changeswithmaximalfreedom,inotherwords:regardlessofwhetherthedatawasmoved.
Formove,thetypicalapplicationwillprobablywanttodeterminetheoriginallocationsof
thedataandrecordthechangesdirectlyatthoselocations.Ifcopydidnotrequireessen-
tiallythesamemachinerytohandleseparatemodificationstooriginals,andcopies,the
moveoperation’sinteractionswouldnotprovidesufficientwarrantforit.
Forinsertionpointsinamove,theforgoingargumentisessentiallyairtight.Recording
insertionsatthedestinationofthemoveratherthanatthesource,onlyhastheeffectof
limitingapplicationanduserchoices,notenhancingthem.Theeffectofrecordinganinser-
tionatthedestinationofamoveisessentiallytocoupletheinsertiontothemove,sothat
itseffectwilloccuronlyinstatesthatincludethemoveoperation.However,thisonlyim-
Previous Page Next Page