113
stringthatidentifiesthatchangewithrespecttoitsversion.ChangeIDsareappendedtothe
versionnumberfollowinga“#”character.Versionspecificationscanalsobeaddedtothe
header,andcanexplicitlyexcludeorincludeparticularchangesintotheirparticularversion.
ThisdifferssomewhatfromPalimpsestbecauseoperationsarealwaysspecifiedwithrespect
toabaseversion,directlysupportingthecommontree-structuredversioningstyle(and
makingotherstylessomewhathardertoimplement).
ItispossibletosimulatePalimpsestsemanticsforinsertionanddeletionbyusingVTML
inawaythatdoesnottakeadvantageofthebuilt-inversioningfacilitiesofVTML.Each
Palimpsestinsertionintoaparticularcontext(anotherinsertion)isaddedasasuccessorof
theversionofthatcontext.Thiscreatesaversiongraphwhoseinheritancerelationshipsdu-
plicatethecausalorderingofinsertionchanges.Successiveinsertionsintothesamecontext
createmultiplealternativesuccessorstotheversionofthatcontext(withonechangein
eachsuccessorversion).Nestedinsertionscreatechainsofrelatedversions.Palimpsestmove
andcopycannotproperlyberepresentedinVTML,becauseinsertionanddeletionoperations
canimplementonlyfrozenoperations,notdynamicones.
6.1.3 ExternalandInternalchanges
ThefirstportionofaVTMLfileconsistsofexternalchanges,whicharestoredseparately
fromthedatarepresentingallversions.Theexternalchangeformatisusefulinthedesignof
protocolsandsupportfordisconnectedworkforthesamereasonthatPalimpsestchangesare
useful.Theywrapupalltheinformationneededtodescribetheupdatesinaversioninone
place.Externalchangesneedtolocatethepointsonwhichoperationsshouldact,andfor
thisreasontheyneedtobelocationandtimeinvariant,likePalimpsestaddresses.VTMLad-
dressesareacombinationofaversionnumberandcharacteroffset.Versionsmustbeimmu-
table,andVTMLsemanticsrequiresomeexternalprotocolorservertosecureagreementasto
whichversionnumbersareactuallyselectedforanyversion.VTMLisdesigned,likemuchof
theWWW,toworkwithadocumentserverthatiscapableofhandlingalloperationsper-
114
tainingtothatdocument.AVTMLserverregistersandassignsfinalversionnumbers,main-
tainsthesharedstate(consistingofarepresentationofallversions),andintegratesthe
changessubmittedbycollaborators.
Therearethreeimportantvarietiesofexternalchange,externalinsertions,externaldele-
tionsandusrops.Externalinsertionsindicateaversioninwhichthechangetakeseffect,a
location(intheformofabaseversionandanoffset),andastringofbytestobeinsertedat
thatlocation.Externaldeletionsconsistoftwoaddressesdelimitedarangetobedeletedin
thedeletion’sversion.
TheusropdeclarationsinaVTMLfileprovideVTML’schangeorientation,byspecifying
additionalchangestobeexplicitlyincludedin,orremovedfrom,anyversioninwhichthey
apply.Usroptagsprovidetheabilitytoconstructarbitraryversionsfromindividualchanges.
VTMLimposesaconstraintsimilartoPalimpsest’snotionofcausalconsistency.Aninsertion
thatisaddedtoabaseversiononlytakeseffectifthecontextinwhichthatinsertionwas
insertedisalsopartoftheresultversion.
ThesecondportionofaPalimpsestfileconsistsofinternalchanges,storedinsequence
justliketheaddressspaceofachangesetcontainingonlyinsertanddeleteoperations.Each
insertionoperationisrepresentedbytwotagsthatopenandcloseitsregionofeffect.All
datainsertedbythatchangeappearsanywherebetweenitstags.Insertionsmaynestarbi-
trarily.Deletionsarealsorepresentedbystart-andend-tags,buttheyarenotconstrained
byanynestingrequirementasinsertionsare.Thetagsofdeletionsareco-indexedbythe
valueoftheirchangeIDattributes.
AveryshortexampleVTMLfileisshowninFigure6.1.Itrepresentsafilewith4ver-
sions.Version0.0isanullversioncreatedbymyprototypeVTMLeditorwhenthefileitself
wascreated.Version1.0containsthetext“Thisisasimpleexample.”Therearetwosucces-
sorversionstoversion1.0.Version2.0wascreatedfirstandnumericallysucceedsversion
1.0.Change2ofversion2.0isadeletionthatremovestheword“simple”fromthetext.
Previous Page Next Page