28.01.2015 Views

Hermes: A Tutorial and Reference Manual - Researcher - IBM

Hermes: A Tutorial and Reference Manual - Researcher - IBM

Hermes: A Tutorial and Reference Manual - Researcher - IBM

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

158B.4.PreconditionFunctions B.4.3ConditionalExceptions Thefollowingpreconditionstestwhethertheoperationiscapableofraising certainexceptionsinadditiontoitsst<strong>and</strong>ardset. rangeerror(source,result):Thispreconditionappearsonlywith orfor...inspectstatementwhosebodyincludesthecurrentoperation.<br />

uncopyable(oper<strong>and</strong>):Atypeispotentiallyuncopyableifitisan duplicatekey(table):Ifthetablehaskeys,thenaDuplicateKey inputportorcallmessagetype(whichareactuallyuncopyable),a exceptionispossible. conversionofeveryvalueinthedomainofsource,thenaRangeError<br />

theconvertoperation.Ifthedomainofresultdoesnotincludethe<br />

B.5PostconditionFunctions ablecomponenttypes,oratabletypewithapotentiallyuncopyable elementtype.Ifoper<strong>and</strong>isofapotentiallyuncopyabletype,thenthe polymorphtype,arecordorvarianttypewithpotentiallyuncopy-<br />

completionofanoperation.Eachfunctioncancauseattributestobeadded <strong>and</strong>/ordropped. Thefollowingfunctionsdeterminehowthetypestatechangesonnormal Uncopyableexceptionispossible.<br />

makeinit(oper<strong>and</strong>):Addtheattributeinit(oper<strong>and</strong>). makeuninit(oper<strong>and</strong>):Dropallattributesinvolvingoper<strong>and</strong>orits makefull(oper<strong>and</strong>):Addtheattributeinit(oper<strong>and</strong>).Inaddition, movets(source,destination):Foreachattributeinvolvingsourceora ifoper<strong>and</strong>isarecordorcallmessage,makeallitscomponentsrecursivelyfull.<br />

subcomponents. allotherattributesinvolvingdestinationvariableorasubcomponent. subcomponent. source,<strong>and</strong>addthesubstitutedattributeifnotalreadypresent.Drop subcomponent:(1)droptheattribute,(2)substitutedestinationfor Dropallconstraintattributesofvariablesofwhichdestinationisa

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!