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.

168B.6.OperationDescriptions every(continued) Preconditions: SpecialRules:Thestatementqualierisaselector.Theresultvariable init(table) uncopyable(table) var(result) SeealsoSpecialRules Postconditions:<br />

typeoftheelementvariableidentiedintheselectormustbetheelementtypeoftable.Theentrytypestatefortheselectoristheentry<br />

theeverystatementiscomputedbyapplyingthepostconditionrules listedabovetothenormalexittypestateoftheselector,minusanyattributesinvolvingtheresultorelementvariable.SeeSectionfora<br />

typestateoftheeverystatement.Thetypestateonnormalexitfrom identiedinthatselectormustbeoftypepredefined!boolean<strong>and</strong> musthavetheinitattributeonnormalexitfromtheselector.The SeealsoSpecialRules makeinit(result)<br />

Description:Createanewtablecontainingacopyofeveryelementof Qualier:selector <strong>and</strong>storethenewtableinresult.Iftableisordered,theelementsin tablethatsatisestheselectoridentiedintheinstructionqualier, resultappearinthesamerelativeorderastheydointable. discussionofhowtypestatesarecomputedforselectors.<br />

exists(result,table) TypeRules: Preconditions: result2boolean table2table Exceptions:Depletion Seex11.6,p.110<br />

init(table) SeealsoSpecialRules var(result) Postconditions: SeealsoSpecialRules makeinit(result)

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

Saved successfully!

Ooh no, something went wrong!