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.

assert(continued) Description:Evaluatetheconstraintidentiedintheinstructionqualier Qualier:constraintname withthegivenoper<strong>and</strong>s.Iftheconstraintfails,raiseConstraintError. Ifitraisesanexception,raiseConstraintFailure. AppendixB.<strong>Hermes</strong>Operations161<br />

attributename(result) TypeRules: Preconditions: result var(result) predefined!attribute--name Postconditions: makeinit(result) Exceptions:Depletion Seex11.11,p.132<br />

Description:Copytheattributenameobject(oftypepredefined!attributename) Qualier:attributename block() TypeRules:None Preconditions:None fromtheinstructionqualierintoresult.<br />

SpecialRules:Theentrytypestatetothemainclauseisidenticalto Postconditions:SeeSpecialRules Exceptions:Depletion Seex11.10,p.130<br />

theentrytypestateoftheblockstatement.Theentrytypestatefora<br />

Description:Executetheinstructionsinthescopeidentiedbytheinstructionqualier.Ifanexceptionorexitoccursthatisnoth<strong>and</strong>ledby<br />

acontainedblock,<strong>and</strong>ifthereisanapplicableh<strong>and</strong>lerlistedinthis block'squalier,executetheh<strong>and</strong>ler.Notethatexceptions<strong>and</strong>exits involvingvariablesdeclaredintheblockstatement. themeetofthenormalexittypestatesofallclauses(includingthemain clause<strong>and</strong>allh<strong>and</strong>lers)thatcanexitnormally,minusanyattributes exception.Thetypestateonnormalterminationofablockstatementis thatbranchtotheh<strong>and</strong>ler,alongwiththeappropriateexceptionexit typestatesofanystatementsthatcanbranchtotheh<strong>and</strong>lerduetoan h<strong>and</strong>lerclauseisthemeetoftheentrytypestatesofallexitstatements<br />

Qualier:block areonlyh<strong>and</strong>ledwhentheyoccurintheblock'smainclause(orcontainedsubclauses);exceptionsorexitsoccuringwithinah<strong>and</strong>lerare<br />

passedontotheoutercontainingblock. Seex11.3,p.96

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

Saved successfully!

Ooh no, something went wrong!