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.

170B.6.OperationDescriptions expression{block(continued) Description:Executetheinstructionscontainedinthescopeidentied Qualier:expressionblock extract(result,table) TypeRules: result2table computeavalueforaresultvariablealsoidentiedinthequalier. bytheinstructionqualier.Moduloexceptions,theeectwillbeto<br />

resulttable<br />

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

Preconditions: SpecialRules:Thestatementqualierisaselector.Theresultvariable SeealsoSpecialRules init(table) var(result) var(table) Postconditions:<br />

typeoftheelementvariableidentiedintheselectormustbetheelementtypeoftable.Theentrytypestatefortheselectoristheentry<br />

typestateoftheextractstatement.Thetypestateonnormalexitfrom listedabovetothenormalexittypestateoftheselector,minusanyat-<br />

theextractstatementiscomputedbyapplyingthepostconditionrules identiedinthatselectormustbeoftypepredefined!boolean<strong>and</strong> musthavetheinitattributeonnormalexitfromtheselector.The SeealsoSpecialRules killconstraints(table) makeinit(result)<br />

Description:Removealltheelementsfromtablethatsatisfytheselector Qualier:selector identiedintheinstructionqualier,assemblethemintoanewtable, resultwillappearinthesamerelativeorderasthedidintable. <strong>and</strong>storethenewtableinresult.Iftableisordered,theelementsof tributesinvolvingtheresultorelementvariable.SeeSectionfora discussionofhowtypestatesarecomputedforselectors.<br />

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

var(result) Postconditions: makeinit(result)

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

Saved successfully!

Ooh no, something went wrong!