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.

Thediscardstatementremovesthevaluefromthevariable.Discardingan initializedcallmessagereturnsthecallmessage;thecallerwillreceivethe simple{statement ::=discardvariable{name11.<strong>Hermes</strong>Operations95<br />

rstbeloweredtotheirminimumtypestate|thisconceptisdenedlater, callmessagetype.Discardedexception.Thecallmessagecomponentswill inthesectiononcallmessages.Discardingavaluecontainingcallmessages| forexampleaninputportholdingenqueuedcallmessages|discardsthe callmessages.Discardinganyothertypeofvaluejustthrowsthevalueaway.<br />

limitedresources.TheDepletionexceptionisraisedwheneverduetoaresourcelimitationoranimplementationrestriction,thecorrectresultcannoitylimits,integeroverow.Implementationsareencouragedtoavoidgiv-<br />

Anideal<strong>Hermes</strong>machinehasunlimitedresources.Realmachineshave 11.2TheDepletionException Mostoperationscanraisethisexception,soitisdescribedhereratherthan repeatedlyundereachoperation. becomputed. don'trequireallimplementationstobethissophisticated,sowereserve ingDepletionexceptionsratherthantorequireprogrammerstodevelop theirowncircumventions.Forexample,integerswhichdon'ttinahardwareregistercouldberepresentedbydynamic-precisionintegers.Butwe<br />

Examplesinclude:runningoutofaddressspace,exceedingdiskcapac-<br />

theDepletionexceptiontoinformtheuserthattheimplementationis inadequatetorunthisparticularexecution. <strong>Hermes</strong>implementationsmustguaranteethatstoragedepletioncannotoccurwhilediscardingorhidingavalue.<br />

Coercionoperations|e.g.discard|cannotfailwithanyexception.

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

Saved successfully!

Ooh no, something went wrong!