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.

192B.6.OperationDescriptions unwrap(result,polymorph) TypeRules: Preconditions: polymorph2polymorph Exceptions:Depletion,<br />

Description:Movethevaluewrappedinsidepolymorphtoresult,leaving init(polymorph) var(result) Postconditions: polymorphts(result) makeuninit(polymorph) PolymorphMismatch<br />

Qualier:wrap while() TypeRules:None typestatetothatgivenbytheinstructionqualier. polymorphuninitialized<strong>and</strong>coercingresultasrequiredtolowerits<br />

Preconditions:None SpecialRules:Theresultvariableidentiedinthestatementqualier Postconditions:SeeSpecialRules Seex11.9,p.126<br />

stateonentrytothetestclauseisthemeetoftheentrytypestateof onnormalexitfromthetestclauseidentiedinthequalier.Thetype-<br />

mustbeoftypepredefined!boolean<strong>and</strong>musthavetheinitattribute Exceptions:|<br />

Description:Repeatedlyexecutethestatementsintheclauseidentied malexittypestateofthetestclause(aniterativesolutionisrequired forthis,asdescribedinSection). normalexittypestateforthewhilestatement,areidenticaltothenor-<br />

repeatedclause.Thetypestateonentrytotherepeatedclause,<strong>and</strong>the thewhilestatement<strong>and</strong>thetypestateonnormalterminationofthe<br />

Qualier:while iseverfalse,terminateexecutionofthewhileoperationimmediately (withoutperformingthecurrentiteration). forthetestresultvariable(identiedinthequalier).Ifthetestresult mentsinthetestclause(alsoidentiedinthequalier)toyieldavalue intheinstructionqualier.Priortoeachiteration,executethestate-<br />

wrap(polymorph,source) TypeRules: polymorph2polymorph Exceptions:Depletion Seex11.3,p.97

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

Saved successfully!

Ooh no, something went wrong!