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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

exists(continued) SpecialRules:Thestatementqualierisaselector.Theresultvariable typeoftheelementvariableidentiedintheselectormustbetheelementtypeoftable.Theentrytypestatefortheselectoristheentry<br />

typestateoftheforallstatement.Thetypestateonnormalexitfrom identiedinthatselectormustbeoftypepredefined!boolean<strong>and</strong> musthavetheinitattributeonnormalexitfromtheselector.The AppendixB.<strong>Hermes</strong>Operations169<br />

Description:Ifanyelementoftablesatisestheselectoridentiedin Qualier:selector false.Inparticular,iftableisempty,setresulttofalse. theinstructionqualier,thensetresulttotrue.Otherwisesetresultto theforallstatementiscomputedbyapplyingthepostconditionrules listedabovetothenormalexittypestateoftheselector,minusanyattributesinvolvingtheresultorelementvariable.SeeSectionfora<br />

exit() discussionofhowtypestatesarecomputedforselectors.<br />

TypeRules:None Preconditions:None SpecialRules:Theexitstatementcannotterminatenormally<strong>and</strong>thereforehasnonormalterminationtypestate.<br />

Exceptions:| Postconditions:SeeSpecialRules Seex11.6,p.110<br />

Description:Raiseanexitconditionfortheexitidentiedintheinstructionqualier.Controltransferstoappropriateh<strong>and</strong>lerintheinnermost<br />

Qualier:exit expression{block() TypeRules:None Preconditions:SeeSpecialRulesPostconditions:SeeSpecialRules containingblockthath<strong>and</strong>lesthisexitcondition.<br />

SpecialRules:Thetypestateonentrytotheexpressionclauseisidentical toentrytypestatefortheexpressionblockstatement.Theresultvariablemusthavetheinitattributeonexitfromtheexpressionclause.<br />

thenormalexittypestateoftheexpressionclause,minusanyattributes<br />

Exceptions:Depletion Seex11.3,p.101<br />

Thetypestateonnormalexitfromtheexpressionblockstatementis involvingvariablesdeclaredintheexpressionblockstatement.

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

Saved successfully!

Ooh no, something went wrong!