/
Cupid commitments in relational algebra Cupid commitments in relational algebra

Cupid commitments in relational algebra - PDF document

natalia-silvester
natalia-silvester . @natalia-silvester
Follow
388 views
Uploaded On 2017-04-01

Cupid commitments in relational algebra - PPT Presentation

item dIDpIDitemEx6issafeandmoreexpressivethanEx5HerepIDanddIDuniquelyidentifyeachpaymentanddeliveryThekeypIDenablesexpressingdistinctcommitmentsforthesamepriceitempairFurthereverydelivere ID: 333812

!item( dIDpID item)))Ex.6issafeandmoreexpressivethanEx.5.HerepIDanddIDuniquelyidentifyeachpaymentanddelivery.ThekeypIDenablesexpressingdistinctcommitmentsforthesameprice-itempair.Further everydelivere

Share:

Link:

Embed:

Download Presentation from below link

Download Pdf The PPT/PDF document "Cupid commitments in relational algebra" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.


Presentation Transcript

Tracking.Tointeracteffectively,anagentshouldbeabletotrackthestatesofthecommitmentsinwhichitisin-volved.Doingsoisessentialforaccountability.Forexample,aresourceownerwouldtrackwhichresourcesitofferedtosharewithwhomanduntilwhen.Apa-tientwouldtrackwhichrecordsahospitalshouldshare,archive,ordestroy.Currentapproachesprovideinade-quatesupportfortrackingcommitmentinstances.Modelingguidance.First-ordercommitmentsmayfailtocapturewhattheirmodelersintended.Forinstance,vari-ablesmaybeinappropriatelyquantiÞed,whichcouldmeanthatcommitmentinstancesareimpossibletodis-charge.Or,speciÞcationofdeadlinesmaybesuchthatcommitmentinstancesareneverviolatedortheyneverex-pire,bothofwhichwouldbeundesirableinmanysettings. !item( dIDpID,item)))Ex.6issafeandmoreexpressivethanEx.5.HerepIDanddIDuniquelyidentifyeachpaymentanddelivery.ThekeypIDenablesexpressingdistinctcommitmentsforthesameprice-itempair.Further,everydeliveredeventreferstoapaideventviapID,whichidentiÞesthepaymentthedeliv-eryisfor:pIDisaforeignkeyindelivered.Thus,pIDiden-tiÞesthecommitment;anoccurrenceofdeliveredwiththatpIDdischargesthatcommitment.Ex.6demonstratestwodesirableproperties:properuseofquantiÞers(forsafety),anduseofkeystoidentifycommitments.Acommitmentmaybedischargedeveniftheantecedenthasnotbeenbroughtabout(YolumandSingh2002b).Forexample,amerchantcandischargeitscommitmentbyde-liveringbeforepaymentoccurs.ThecommitmentinEx.6rulesoutthispossibilityastheconsequentisdependentontheantecedentforinformation(bindingsforpIDanditem).Doesacommitmentbeingsafeentailthatacommitmentin-stancemustnotbedischargedbeforeitisdetached?Such !oID!price!item!pID"dID(C(o!ered(oID,item,price)#paid(pID,oID,price),delivered(dID, !oID!price!item!pID"dID(C(o!ered(oID,price,item)#paid(pID,oID,price),delivered(dID,,item)))Ex.9expressesthatthemerchantcommitstodelivertheitemonlyifthepaymentwereatleast90%ofthequotedprice.Further,Ex.9alsousesexpressionsfordeadline:thecommitmentexpireswithintendaysofmakingtheofferandisviolatedifmorethanÞvedayspasssincepayment(oDateandpDatearethetimestampsofo!eredandpaid).Ex.9!oID!price!item!oDate!pID!pDate"dID(C(o!ered(oID, %Expr|Expr&Expr|Exprwhere! ,andsoon.Oursemanticscomputesatimestampforcompositeevents.Timeinter-valsforanevent([Time,Time]inTable1)areinterpretedstrictly:theeventisrequiredtooccurafter(includingat)thelefttimepointbutbeforetherighttimepointoftheinterval.Whenthesamedebtorandcreditorapplyuniformlyinaformulation,weomitthemforbrevity.Thatis,wewritecommitment(c,r,u)insteadofcommitment(x,y,c,r,u).3.2SemanticsAninformationschemaisanonemptysetofevents,eachmodeledasarelationwithasuperkeyandadistinguishedtimestampcolumn.Baseeventsarematerializedrelations.Lifecycleeventsarecomputedviathesemanticsbelow.AmodelMofaninformationschemaspeciÞes,foreacheventschemaE,anextensionofthatschema isthepowersetofitsuniversere- modelofaninformationschemaisafunc-tionthatmapseachofits(Base)eventschemastoitsexten-sion,i.e.,amemberofitsintension.SpeciÞcally,M:ED/0+[E],.WetermM(E)theextensionofE ),project("),naturaljoin(#$),rename(%),union(&),intersection(1),Cartesianproduct(.),andcomplement(\)retaintheirusualmean-ings(ElmasriandNavathe1994).WereproducedeÞnitionsforsomeofthelesscommonones.Below,SingletonA,B={(null,...,null)}isthesingletonnullrelationwhoseat- Leftouterjoin(#$).R#$ Ethatoccurafter(includingat)cbutbefored.D2.[[E[F+c,d]]]=!t!+c!t([[E]] }isasingletonrelationwithasingleat-tributet.D9.[[ E[0,F+c]]].RisXsuchthatEoccurredtoosoon,thatis,beforef+c,wherefisthevalueofFÕstimestamp.¥SX ¥T={(d)}isasingletonrelationwithasingleat-tributet.ThedeÞnitionof[[X2E[c,F+ ,c]]].¥S=[[X]]!%t/t![[E[0,F+d]]] ¥S=[[X]]! X2Z)]].D13.[[X2(Y)Z Y2Z)]]=[[(X2Y))(X(Z)]].D15.[[created(c,r,u)]]=[[c]].Acommitmentiscreatedwhenitscreateeventoccurs.D IncontrastwithEx.10,Ex.12expressesacustomerÕscommitment.Thesameschemaunderliesbothcommit-ments.WehavethechoiceherebecausePaymentandShip-mentdonotdependuponeachother.WhichcommitmentismodeledisthemodelerÕschoice.Ex.12Listing4speciÞesthecustomerÕscommitmenttothemerchantthatiftheordereditemsareshippedwithinÞvedaysoforderplacement,thenpaymentforatleast90%of Bvalue.DeÞni-tion4usesthisnotiontocorrelateevents.DeÞnition4LetEandFbeevents.EdeterminesFiff¥thekeyofEfunctionallydeterminesthekeyofFinE,or¥thekeyofEfunctionallydeterminesthekeyofGinE,andGdetermines ifandonlyifdetached(X,X!,X!!)determinescreated(X,X!,X!!),anddischarged X,X!,X!!)isX;andthatofviolated(X,X!,X!!)isX!.Well-identiÞedcommitmentsarecrucialtocorrelatingtheeventsinvolvedasinglecommitmentinstance.Eachofthecommitmentsinthelistingsaboveiswell-identiÞed.Foranexampleofacommitmentthatisnotwell-identiÞed,con-sideranalternativeschemawherePaymentdoesnotrefer M|=discharged(X,X!,X!!).Theorem2givesasyntacticcriterionforidentifyingvac-uouscommitments,e.g.,toassistacommitmentmodeler.Theorem2Acommitmentthatisnotwell-identiÞedisvac-uous.ProofSketch.FollowsfromD16andD17.5.3Time-OrientedPropertiesIngeneral,modelerswouldnormallyprefertowritecommit-mentsthatoncecreatedareeitherdetachedordischargedoraresettoexpirewithinaÞniteamountoftime.DeÞnition9formalizesthisproperty.DeÞnition7A (X,X!,X!!)isviolablyspec-iÞediff(1)anyeventthatappearsintherighttime-pointofanyintervalspeciÞcationinX!!iseithercreated(X,X!,X!!)ordetached(X,X!,X!!),and(2)'X!!.Theorem4connectsDeÞnitions9and10.Theorem4Acommitment(X,X!,X solidation,andcompensationcanbehandledthroughasuit-abledesignofeventschemas(andtheirkeys);concessionre- Yolum,P.,andSingh,M.P.2002a.Commitmentmachines.InProceedingsofthe8thInternationalWorkshoponAgentTheories,Architectures,andLanguages(ATAL2001)